-
Notifications
You must be signed in to change notification settings - Fork 818
Closed as not planned
Labels
functionsIssues tied to the functions categoryIssues tied to the functions categorypending-responseIssue is pending response from the issue authorIssue is pending response from the issue authorpending-triageIssue is pending triageIssue is pending triage
Description
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
18.12.0
Amplify CLI Version
12.8.2
What operating system are you using?
Window
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
Created a lambda function and im using axios call of curl operation on dynamodb using appsync graphql api.
Describe the bug
On peak time on lambda, axios call gives ECONNRESET on calling appsync graphql api
Expected behavior
It should perform action like update, delete or create
Reproduction steps
- created lambda by amplify cli
- add axios package
- use axios post call for updating or getting record by using appsync graphql api
- some time axios gives ECONNRESET error
Project Identifier
Log output
Details
# Put your logs below this line
Additional information
Using Node 18x Commonjs in lambda and axios 1.6.8v
here is my sample code
const axiosInstance = axios.create({
baseURL:process.env.API_CATHERD_GRAPHQLAPIENDPOINTOUTPUT,
headers: {
Authorization: "MY_TOKENXXX",
},
method: "post"
});
const updateDrDeck = async (actionInfo, _input, _num_attempt = 0 ) => {
console.log('_input',_input)
try {
if(_input?.cat?.includes("CT#") && _input?.id?.includes("CT#")){
logEvent({...actionInfo, ActionType: 1001, ActionInfo: JSON.stringify(actionInfo)},
process.env.STORAGE_PDEVENTS_NAME)
}
let response = await axiosInstance({
data: {
query: print(
gql`
${updateCatHerd}
`
),
variables: {
input: _input,
},
},
});
console.log('DD Updation response', response?.data, response?.errors);
if (response?.data?.data) console.log("Solution: ", response.data.data);
else console.log("Unable to update object", _input);
} catch (err) {
console.log("Error Updating DrDeck", err);
return err;
}
};
Before submitting, please confirm:
- I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
- I have removed any sensitive information from my code snippets and submission.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
functionsIssues tied to the functions categoryIssues tied to the functions categorypending-responseIssue is pending response from the issue authorIssue is pending response from the issue authorpending-triageIssue is pending triageIssue is pending triage