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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠