Skip to content

Instantly share code, notes, and snippets.

@jailbirt
Created April 18, 2023 20:00
Show Gist options
  • Save jailbirt/d62489ecf5a9cc181c1d6ae7c12599f0 to your computer and use it in GitHub Desktop.
Save jailbirt/d62489ecf5a9cc181c1d6ae7c12599f0 to your computer and use it in GitHub Desktop.
Move AWS Launch Templates from one region to another.
#!/bin/bash
if [ -z $1 ];then
echo please provide the launch template to copy from
exit 0
fi
aws ec2 describe-launch-template-versions --launch-template-id $1 > $1.json
echo old template was saved as $1.json modify it and create the new one by running:
echo aws ec2 create-launch-template --launch-template-name MyNewLaunchTemplateName --version-description "Initial version" --cli-input-json file://$1.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment