Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

aws-s3-deploy fails - Feels like not deleting all S3 files before upload.

This is an intermittant issue, but it does look like it occurs more often when redeploying (uploading from bitbucket pipeline to S3) an older build over the top of a newer build.

 

It looks like the files are not fully or properly being deleted in the S3 bucket before the upload occurs and I often find the files in the s3 bucket are not accurate with the build

The aws-s3-deploy:1.1.0 config I am using is

```

- pipe: atlassian/aws-s3-deploy:1.1.0
    variables:
        AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
        AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
        AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION
        S3_BUCKET: $AWS_PROD_S3_BUCKET
        LOCAL_PATH: "output"
        DELETE_FLAG: "true"

```

 

As mention, the issues dont seem to occur when incrementally deploying later builds, or at least much much less often, the issue seems to occur when deploying a later build, then redeploying an earlier build later on.

When the issue occurs, to resolve it, I login to AWS and manually delete all the files, then do the deployment and everything works as expected.

Is anyone else experiencing this issue or does someone know what I might be doing wrong?

1 answer

0 votes
Igor Stoyanov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Mar 17, 2023

@Jason Redwood hi . Thanks for your question. This pipe based on aws s3 sync where DELETE_FLAG is option:
`
--delete (boolean) Files that exist in the destination but not in the source are deleted during sync`. 
To test your case you could try directly call `aws s3 sync` command inside pipelines script, and investigate the behaviour.

Regards, Igor

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events