Skip to content

Instantly share code, notes, and snippets.

@mike-carey
Created August 9, 2020 19:15
Show Gist options
  • Save mike-carey/0f67cd550a1b860783dc78f5b041fb28 to your computer and use it in GitHub Desktop.
Save mike-carey/0f67cd550a1b860783dc78f5b041fb28 to your computer and use it in GitHub Desktop.
When attempting to create an ImageBuilder Recipe, sending duplicates results in a 500 Internal Server Error when passing duplicate components.
Resources:
ImageBuildRecipe:
Type: AWS::ImageBuilder::ImageRecipe
UpdateReplacePolicy: Retain
Properties:
Name: cause-500-error
Version: 1.0.0
Description: Causes a 500 Internal Server Error because there are duplicate components.
Components:
- ComponentArn: "arn:aws:imagebuilder:us-east-1:aws:component/update-linux/1.0.0"
- ComponentArn: "arn:aws:imagebuilder:us-east-1:aws:component/update-linux/1.0.0"
ParentImage: "arn:aws:imagebuilder:us-east-1:aws:image/ubuntu-server-18-lts-x86/2020.7.30"
Tags: {}
Outputs:
RecipeArn:
Description: ARN of the created component
Value: !Ref "ImageBuildRecipe"
#!/usr/bin/env bash
# This runs the stack using the file locally
aws cloudformation create-stack \
--stack-name create-500-error-stack \
--template-body "$(cat cloudformation.yml)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment