Billing and stored artifacts

0

My site is a Jekyll generated static html site, and looking at the billing console for the month of July so far under Amplify I see:

$0.023 per GB build artifacts stored - 8.313 GigaBytes - $0.19

The total size of the generated site should be well under 8.3gb, it's really just html and images. Not that it's a huge bill currently, but I definitely don't want it to pile up over time for no good reason. This is only two days into the month (last actual build was in June).

Are we storing artifacts from previous builds? Is there a way to delete the older builds so I'm not being charged for it? Since there's no way to view the actual contents of S3 is there any way to get some kind of visibility into what this is?

pettazz
asked 5 years ago435 views
2 Answers
0

All build artifacts are historically preserved, you can delete artifacts from old builds to remove them from your build artifact storage bill by using the AWS CLI. The following amplify command would delete the artifact history for jobs 1-3, copy/paste this in your command line:

for i in {1..3}; do aws amplify delete-job --app-id add your app id here --branch-name add your branch name here --job-id $i; done

You can get your app's Id and branch name by clicking on your hosted domain in the Amplify Console, the URL will start with: branchName.appId

You can get a build's job Id by clicking on a branch and then clicking the "View build history" button in the upper right, the job Id is the build number, like 1, 2, 3, etc. Update the command's {1..3} with {startingJob..endingJob}, this will delete all build artifacts in that range.

answered 5 years ago
0

That makes sense. Are the old builds kept indefinitely, or are they cleaned up after some amount of time?

pettazz
answered 5 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions