We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ed9e3a9 commit ea234b5Copy full SHA for ea234b5
1 file changed
contrib/distribute-amis.sh
@@ -0,0 +1,20 @@
1
+#!/bin/bash
2
+#
3
+# Distribute AMIs across regions using EC2 CLI tools
4
5
+
6
+if [ -z $2 ] ; then
7
+ echo usage: $0 [src-region] [src-ami]
8
+ exit 1
9
+fi
10
11
+set -ex
12
13
+src_region=$1
14
+src_ami=$2
15
16
+# copy the ami to every other region
17
+for region in ap-northeast-1 ap-southeast-1 ap-southeast-2 eu-west-1 sa-east-1 us-east-1 us-west-1 us-west-2; do
18
+ [ $region = $src_region ] && continue
19
+ ec2-copy-image -r $src_region -s $src_ami --region $region
20
+done
0 commit comments