Making public s3 artifacts from AWS code build

ranjjose

How to make the artifacts uploaded to s3 as part of an aws code build public by default? I'm experimenting build automation. At present the build is successful; however, the artifact created isn't public and hence I can't share the link (as part of a mail). By default, the server side encryption is set at Using AWS KMS master key: aws/s3 (default). When tried removing the encryption key from the advanced settings section of the aws code build config, it gave an error. I'm planning to run an aws lambda function that will send a mail with link of the artifact at the end of the build as part of the aws code pipeline.

Edit: I tried adding the following as the permission but it didn't help:

{
  "Version":"2012-10-17",
  "Statement":[
   {
    "Sid":"AddPerm",
    "Effect":"Allow",
    "Principal": "*",
    "Action":["s3:GetObject"],
    "Resource":["arn:aws:s3:::examplebucket/*"]
   }
  ]
}

as mentioned here

From S3 if I manually go and select none as the encryption, the link does become downloadable. However I need a programmatic way to do this as I'm trying to automate the entire process as part of the build automation. So far I'm not able to achieve this via boto3 too.

Thanks in advance!

ranjjose

OK! I got a reply in aws developer forum as follows:

Thank you for this feature request, I have passed it to the team for further review. Your feedback is very much appreciated.

Which means the feature is probably not present now.

This is the link to the AWS dev forum. Anyways, there's a workaround for the time being. You can see that too in the same link or here with more details.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Error while making the call to AWS S3 bucket from Pyspark . AWS Error Code: null, AWS Error Message: Bad Request

Use AWS Elastic Transcoder and S3 to stream HLSv4 without making everything public?

Make AWS CodeBuild artifacts public

How to add files from S3 bucket to output artifacts in AWS CodePipeline? (NodeJS)

AWS - How to send S3 artifacts from codebuild to EC2 instance

AWS CodePipeline Doesn't upload artifacts to AWS S3

Making a folder inside AWS EC2 accessible from public

Delete object from AWS S3 bucket (not in code)

Code build artifacts are not packed correctly

AWS Codebuild puting all artifacts in root of S3 bucket

Download file/folder from Public AWS S3 with Python, no credentials

How to access a public S3 bucket from another AWS account?

How to setup aws-sdk to get file content from a public file in s3 bucket?

How to insert public url from image stored in AWS S3 into JSX component?

How can I extract file from the public AWS S3 bucket with Python

Access Denied making image public on s3 bucket

Want to make public my AWS S3 bucket public?

AWS S3: Can't get non-owned objects from bucket with public access (through non authenticated means)

Code Build Access denied while downloading artifact from S3

AWS S3 - Allow public to view HTML files

How to upload files to AWS S3 with public access granted?

Read the file count in a public AWS S3 bucket

Upload a file to AWS S3 with public access granted

AWS S3 putobject with public read permissions - .Net SDK

Allow public access for images only in AWS S3

AWS S3 make public via ACL disabled?

AWS code build with env variables from build-spec.yml

How to create an AWS codecommit repo using Cloudformation from code in an S3 bucket

Importing libraries in AWS Lambda function code from S3 bucket