We have a pipeline that send our website build to a S3 bucket to serve files through CloudFront.
Today we tried to update our pipeline script to aws-s3-deploy 1.0 but this break the pipeline without a meaninful error.
Reverting to 0.5.0 fix the issue.
Here there is the interesting part of our pipeline script:
develop:
- step:
name: Build
caches:
- node
script:
- npm install
- npm run build:devel
artifacts:
- home/**
- step:
name: Deploy to S3
deployment: Development
script:
- pipe: atlassian/aws-s3-deploy:1.0.0
variables:
S3_BUCKET: ${S3_BUCKET}/home
LOCAL_PATH: 'home'
ACL: 'public-read'
EXTRA_ARGS: '--exclude=*.html'
- pipe: atlassian/aws-s3-deploy:1.0.0
variables:
S3_BUCKET: ${S3_BUCKET}/home
LOCAL_PATH: 'home'
ACL: 'public-read'
CACHE_CONTROL: 'max-age=600'
EXTRA_ARGS: '--exclude=* --include=*.html'
- pipe: atlassian/aws-s3-deploy:1.0.0
variables:
S3_BUCKET: ${S3_BUCKET}
LOCAL_PATH: 'home'
ACL: 'public-read'
CACHE_CONTROL: 'max-age=600'
EXTRA_ARGS: '--exclude=* --include=index.html'And the IAM policy attached to the user on AWS:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:ListBucket"
],
"Resource": [
"arn:aws:s3:::${S3_BUCKET}"
]
},
{
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:GetObjectAcl",
"s3:GetObjectTagging",
"s3:HeadObject",
"s3:PutObject",
"s3:PutObjectTagging",
"s3:PutObjectAcl",
"s3:DeleteObject"
],
"Resource": [
"arn:aws:s3:::${S3_BUCKET}/*"
]
}
]
}Here (on Dropbox due to post characters limit) there is a full log of the upload step that fails with DEBUG: 'true' option set:
https://www.dropbox.com/s/aogfbqw86vy3su2/pipelineLog-3.txt?dl=0