1
votes

This is the first time i am working with AWS. I am trying to create a CICD Pipeline for a basic hello world python code.

Git hub integration, change detection is working fine in AWS Code Pipeline but during the build stage, i am getting this error again and again.

ERROR: Unable to upload artifact . referenced by CodeUri parameter of app resource.An error occurred (AccessDenied) when calling the PutObject operation: Access Denied

Here are the details with respect to my project.

Github (for Python Code, buildspec.yaml and template.yaml files) - https://github.com/prahamurali/awscicd.git

Error Message

IAM Roles

Pipeline

S3 Permissions

1

1 Answers

1
votes

From your question it is unclear which role is shown in IAM Roles. However, it seems to be the role not associated with CodeBuild.

If this is the case, then you need to add S3 access permissions to the role of your CodeBuild project, not CodePipeline nor CloudFormation. The reason is that CodeBuild is the service that will be actually uploading your objects to S3, thus it needs such permissions.