Bug: SAM pipeline bootstrap fails with "Bucket cannot have ACLs set with ObjectOwnership's BucketOwnerEnforced setting" when using AWS Quick Start Pipeline Templates.
Description:
SAM pipeline bootstrap fails with "Bucket cannot have ACLs set with ObjectOwnership's BucketOwnerEnforced setting" when using AWS Quick Start Pipeline Templates.
The error is related to the recent S3 service update per https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-bucket-faq.html.
Steps to reproduce:
$ sam pipeline init --bootstrap
sam pipeline init generates a pipeline configuration file that your CI/CD system can use to deploy serverless applications using AWS SAM. We will guide you through the process to bootstrap resources for each stage, then walk through the details necessary for creating the pipeline config file.
Please ensure you are in the root folder of your SAM application before you begin.
Select a pipeline template to get started: 1 - AWS Quick Start Pipeline Templates 2 - Custom Pipeline Template Location Choice: 1
Cloning from https://github.com/aws/aws-sam-cli-pipeline-init-templates.git (process may take a moment) Select CI/CD system 1 - Jenkins 2 - GitLab CI/CD 3 - GitHub Actions 4 - Bitbucket Pipelines 5 - AWS CodePipeline Choice: 2 .. Setting everything default after this. ..
Observed result:
A CloudFormation stack creation is initiated with name "aws-sam-cli-managed-dev-pipeline-resources" and this fails with error - "Bucket cannot have ACLs set with ObjectOwnership's BucketOwnerEnforced setting"
Expected result:
Bootstrap completes by creating the SAM artifact logging S3 bucket excluding AccessControl configuration.
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
- OS: Linux
sam --version: SAM CLI, version 1.81.0- AWS region: us-east-1
# Paste the output of `sam --info` here
Add --debug flag to command you are running
@xazhao : https://github.com/aws/aws-sam-cli/pull/5078 is this related?
I am very certain it is the same issue. I have been having this issue for 48 hours and from the information I got from the AWS support I am very lucky because this change has been rolling out since April and I did a workshop about sam pipelines (which luckily worked fine) 4 days ago.
@sriram-mv Yes https://github.com/aws/aws-sam-cli/pull/5078 is the fix to this bug.
Am also experiencing this issue currently.. when should I expect a new release?
Patch is released in v1.83.0. Closing
I can confirm that this issue is fixed on v1.83.0. Thank you to everyone that worked on this issue!