aws-solutions / aws-control-tower-customizations

The Customizations for AWS Control Tower solution combines AWS Control Tower and other highly-available, trusted AWS services to help customers more quickly set up a secure, multi-account AWS environment using AWS best practices.
https://docs.aws.amazon.com/controltower/latest/userguide/cfct-overview.html
Apache License 2.0
353 stars 205 forks source link

CloudFormation Lambda S3 Error #188

Open 4claps opened 4 months ago

4claps commented 4 months ago

Describe the bug Resource handler returned message: "Error occurred while GetObject. S3 Error Code: NoSuchBucket. S3 Error Message: The specified bucket does not exist (Service: Lambda, Status Code: 400, Request ID: d5091597-a0ff-4160-8c4a-551414fb91cc)" (RequestToken: 833066cd-d1f7-a380-c414-6578f32d62c5, HandlerErrorCode: InvalidRequest)

To Reproduce It appears that when the "custom-control-tower-initiation.template" is creating a bucket with random letters in the back, but the lambda function is looking for ${AWS::Region}.

I originally assumed that the script did not give enough time for the S3 bucket to build. but every time you run the script it names it cfctest(Stack Name)-customcontroltowercloudtraildataeventbucke(Bucket Name from Template)-ebvht6sthyzz(Random Characters) so ever if I delete the stack and run it again, the characters at the end change so it get the same error. Please advise on how to move forward.

snebhu3 commented 4 months ago

@4claps thanks for reaching out. Please may you provide more details for the error?