Search code examples
amazon-web-servicesaws-cloudformationamazon-cloudwatch

AWS Cloudformation logs


I am using AWS CDK to subscribe Lambda function for Create events from S3. I receive this kind of error.

Error: An error occurred (InvalidArgument) when calling the PutBucketNotificationConfiguration operation: Unable to validate the following destination configurations. See the details in CloudWatch Log 
Stream: 2023/11/13/[$LATEST]b53fbfb27fc4405082109cabad91f3ce (RequestId: 1b65e732-7a5e-476e-9494-9ddde24654f0)

The same error I see in the Cloudformation stack. The problem is in CloudWatch. I cannot find the log group related to the Cloudformation. Do you know how to find it? What is its name pattern? Can it be configured somewhere in the Cloudformation settings? We have hundreds of groups, so I cannot go through the list and check every single one

I tried to search that log group using different patterns but no success. I just need those logs to understand what's wrong with my stack and fix the issue.


Solution

  • Yor issue is probably related to the missing Lambda Invocation Parmissions. Check yor template for AWS::Lambda::Permission https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-permission.html

    Make sure (I have no idea how to do it with CDK) that Permission is granted before PutBucketNotificationConfiguration operation.

    BTW, Cloudformation logs are available in Cloudformation stack in events Tab.