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
已提问 5 年前449 查看次数
2 回答
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.

已回答 5 年前
0

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

pettazz
已回答 5 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则