Under what conditions will `errors` array in `RequestMapping` log type be populated?ģ. Is this working as expected so the `$util.error(message)` will never show up in CloudWatch logs?Ģ. When I do the same thing with response mapping template then everything works as expected (errors array contains `$util.error(message)` and outErrors array contains `$util.appendError(message)` messages.ġ. "message": "append request mapping error 1" Then the appended error appears in the `RequestMapping` log type but the `errors` array is still empty: $util.appendError("append request mapping error 1") When I add `$util.appendError("append request mapping error 1")` to the request mapping template so it looks like this: The error is not completely lost because I can see this error in the query response: The API has logging configured to be as verbose as possible yet I cannot see this `request mapping error 1` from my CloudWatch logs in `RequestMapping` log type: The resolver has request mapping template enabled and it is configured as follows: This function always throws an error (to test out logging). I have a simple resolver that has a simple Lambda function as a data source. ![]() Re-post from my question on StackOverflow: Why is my ```mysampleapi2``` not picking the HTTP call? If I run them in separate template files using different ports, then it works. 18:21:46,733 | Invalid lambda response received: Lambda response must be valid json 18:21:46,733 | No response from invoke container for mysampleapi1 18:21:46,732 | Cleaning all decompressed code dirs 18:21:05,484 | Function 'mysampleapi1' timed out after 30 seconds 18:20:35,481 | Starting a timer for 30 seconds for function 'mysampleapi1' 18:2:34,953 | Mounting /home/mathieu_auclair/Documents/Project/repositories/server as /var/task:ro,delegated inside runtime container Sam local start-api -port 3001 -log-file /tmp/server-output.log -profile personal -debug Here's what's happening in the logs using the startup command When I send a HTTP request for ```mysampleapi2``` ![]() Handler: packages/mysampleapi2/dist/index.handler Handler: packages/mysampleapi1/dist/index.handler I have 2 REST API Gateway, and it seems like since they both bind on the same endpoint, the first one will recieve the call that the second one should handle. I've debugged my application, and identified a problem. Here is the code I use to create the endpoint:Ĭonst marketing = Ĭonst typeAction = Ĭonst endpointAddress = Ĭonst valueAction = Ĭonst endpointID = generateEndpointID(20) Ĭonst pinpointRes = await pinpoint.updateEndpoint(params).promise().catch(er=> ) I setup the all users to have an active endpoint but literaly after a few minutes of creation every user's endpoint becomes INACTIVE. I call the Lambda via GraphQL when a user is created so that the user gets an endpoint on creation. I have an AWS Lambda which has logic that creates an endpoints. I am using the AWS JavaScript SDK to create endpoints.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |