I am using AWS API Gateway that triggers a Lambda function (integration request type is LAMBDA_PROXY
).
I am trying to add logs for the gateway’s activities via Cloud Watch.
After following this documentation, it is still not working.
The log role have the AmazonAPIGatewayPushToCloudWatchLogs
permission and is set in the settings tab under CloudWatch log role ARN
.
The stage have the following configurations under Logs/Tracing
:
The logs group have the following configurations:
I am testing via postman and the Lambda is being triggered normally.
2
Answers
The issue was caused by one of the logging role's permission boundaries.
Configuring the necessary boundaries for my case solved the problem.
First thing to check, there is a global setting which is placed in Settings from your API Gateway console that you should have checked.
Check if you have input your IAM Role ARN that have the sufficient permissions into this place yet.
Second thing to check, you should double-check that IAM role trust relationship value. Here is mine:
Third thing to check, you should re-check your Access Logs format. Try using a sample one to check if it works or not?
References: