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!