Configuring AWS S3 Storage policy permissions for Bamboo

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Problem

After configuring Amazon S3 artifact storage the job which generates the artifacts successfully uploads the artifacts to S3 but the job which consumes that artifacts displays the error: 

Forbidden (Service: Amazon S3; Status Code: 403; Error Code: 403 Forbidden; Request ID: B5872XXXXXXXXXXD)
expand for an error log example...

simple 17-Jun-2015 15:37:14 Preparing artifact 'scripts' for use at scripts
error 17-Jun-2015 15:37:14 Forbidden (Service: Amazon S3; Status Code: 403; Error Code: 403 Forbidden; Request ID: A589241301BC17EB)
simple 17-Jun-2015 15:37:14 Failure in artifact preparation phase during processing of: Subscription for Shared artifact: [scripts], pattern: [*]anchored at: [scripts], destination: [scripts]
error 17-Jun-2015 15:37:14 1 error(s) found when performing pre-build actions.

Cause

AWS credentials used for Elastic Bamboo configuration require S3 permissions in Amazon S3.

Resolution

Add or modify policies in your AWS management console by following this example of a Bamboo IAM account policy configuration:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "Stmt1434671502112",
      "Action": [
        "s3:DeleteObject",
        "s3:DeleteObjectVersion",
        "s3:GetBucketLocation",
        "s3:GetObject",
        "s3:GetObjectAcl",
        "s3:GetObjectVersion",
        "s3:GetObjectVersionAcl",
        "s3:ListBucket",
        "s3:PutObject",
        "s3:PutObjectAcl",
        "s3:PutObjectVersionAcl"
      ],
      "Effect": "Allow",
      "Resource": "arn:aws:s3:::atlassian-net-bamboo-artifacts"
    }
  ]
}

using AWS Policy Generator

Last modified on Apr 24, 2023

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.