I am trying to enable cloudwatch logs for AWS API Gateway via cloudformation template but it does not enables. I have tried setting up logginglevel to INFO in both Stage description and also Method settings. Any idea on what am I missing?
When I manually enable logging through UI, it works. Not working when I try to enable through cloudformation template as below -
Note: I am just using plain cloudformation template and I have already added role ARN that has permissions to API Gateway in my account to log cloudwatch
TestDeployment:
Type: AWS::ApiGateway::Deployment
Properties:
Description: API Deployment
RestApiId: testApi
StageName: 'dev'
StageDescription:
Description: Stage - DEV
LoggingLevel: INFO
MethodSettings:
- ResourcePath: "/testresource"
HttpMethod: "POST"
LoggingLevel: INFO