No matter how open an IAM policy I give to my CodePipeline role, my CodeBuild step always fails with Access Denied in the DOWNLOAD_SOURCE phase. The build works fine when I run manually from CodeBuild.
I have literally granted this policy to the CodePipeline service role, and the pipeline still fails:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"*"
],
"Resource": [
"*"
]
}
]
}
Has anyone else encountered a similar problem? Where should I be looking to fix this?
The first place I'd look is your CodeBuild service role, make sure it has something like the following in the policy:
{
"Sid": "S3GetObjectPolicy",
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:GetObjectVersion"
],
"Resource": [
"*"
]
},
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With