-
Bug
-
Resolution: Timed out
-
Low
-
None
-
None
-
2
-
Severity 3 - Minor
-
Summary
During Artifact Expiry, logs show multiple 403 "Access Denied" errors accessing AWS S3, even if the S3 Handler is not used.
Steps to Reproduce
- Setup Elastic agents with valid AWS credentials
- Enable S3 Artifact Handler
- Immediately disable S3 Artifact Handler
- Run build expiry/deletion jobs
Expected Results
No error 403 connecting to S3 as it was not used for any artifacts
Actual Results
The below exception is thrown in the atlassian-bamboo.log file:
2018-03-30 17:48:08,475 ERROR [DelayedDeletionThread] [BambooPluginUtils] class com.atlassian.bamboo.build.artifact.S3ArtifactHandler was unable to delete artifacts for PROJ-PLAN-JOB com.amazonaws.services.s3.model.AmazonS3Exception: Access Denied (Service: Amazon S3; Status Code: 403; Error Code: AccessDenied; Request ID: <id-hash>; S3 Extended Request ID: <ext-id-hash>), S3 Extended Request ID: <ext-id-hash> at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleErrorResponse(AmazonHttpClient.java:1639) ... (truncated)
Workaround
Remove the S3 Bucket Name from the Bandana table:
- Stop Bamboo
- Backup the database
- Find the Artifact Handler Configurations
select SERIALIZED_DATA from BANDANA where BANDANA_KEY = 'artifactHandlersConfiguration';
- Find the S3 Artifact Handler bucketName value
<entry> <string>custom.artifactHandlers.comAtlassianBambooPluginArtifactHandlerRemote:S3ArtifactHandler:bucketName</string> <string>bucket-name-here</string> </entry>
- Remove the bucket-name-here string, so that section is:
<entry> <string>custom.artifactHandlers.comAtlassianBambooPluginArtifactHandlerRemote:S3ArtifactHandler:bucketName</string> <string>bucket-name-here</string> </entry>
- Start Bamboo