andsens/ec2debian-build-ami — Issue #5: Ec2 regions issue
Author: mpastor
Created: 2012-02-23 17:38:18+00:00
State: open

Script doesn't work at all when using e.g. EBS in EU location even if parameter "--region" is used because default is always US location so API commands will fail. It would be better to work in one location:

diff --git a/ec2debian-build-ami b/ec2debian-build-ami
index 6e49d2d..07623ac 100755
--- a/ec2debian-build-ami
+++ b/ec2debian-build-ami
@@ -208,6 +208,8 @@ if [ ! -f $EC2_PRIVATE_KEY ]; then
die "$0: AWS private key file not found: $EC2_PRIVATE_KEY"
fi

+export EC2_URL="https://$region.ec2.amazonaws.com"
+
if [ -z "$ebs" ]; then