Generating s3 public artifacts from AWS code assembly

How do I make artifacts uploaded to s3 as part aws code build

of the default public ? I am experimenting with build automation. The build is currently successful; however the artifact generated is not publicly available and therefore I cannot share the link (as part of the mail). By default, server side encryption is set to Using AWS KMS master key: aws/s3 (default).

. When tried to remove the aws code encryption key

from advanced settings

the build config section it gave an error. I am planning to run an aws lambda function that will send mail with an artifact link 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 navigate and select none

as encryption, the link becomes downloadable. However, I need a programmatic way to do this as I am trying to automate the whole process as part of build automation. So far, I have not been able to achieve this through boto3

.

Thanks in advance!

+3


source to share


1 answer


OK! I got a response on the aws developer forum like this:

Thanks for this feature request, I have submitted it to the team for further review. Your feedback is greatly appreciated.



This means the feature is probably missing right now.

This is a link to the AWS dev forum. There is a workaround anyway . You can see it in the same link or here with more details.

0


source







All Articles