Build Image with Failure Cleanup
A 3-step recipe with Amazon EC2 Image Builder. We can help you get access.
Recipe · 3 steps
Build Image with Failure Cleanup
Build an image, poll to a terminal state, and delete it when the build did not succeed.
- Start a new image build whose outcome will determine whether cleanup runs.
- Poll the image build version until it reaches a terminal state, then branch on the outcome.
- Delete the failed or cancelled image build version resource so it does not clutter the account.
What you'll need to have ready
- imageRecipeArn: The ARN of the image recipe to build.
- infrastructureConfigurationArn: The ARN of the infrastructure configuration used to build and test the image.
- clientToken: An idempotency token for the create request.
For your developer
Arazzo workflow amazon-ec2-image-builder:build-image-with-failure-cleanup, 3 operations: CreateImage → GetImage → DeleteImage. Specs on APIs.io.