From a549468853461653779f6f3a405a88fd75d75083 Mon Sep 17 00:00:00 2001 From: Justin Santa Barbara Date: Thu, 27 Nov 2014 17:24:58 -0800 Subject: [PATCH] Specify AWS_DEFAULT_REGION to match configured region The AWS CLI is configured with a default region, but it might not match the configured Kubernetes region. Specify the region to be sure. --- cluster/aws/util.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cluster/aws/util.sh b/cluster/aws/util.sh index c69a967a4fc..32c656ff5e9 100644 --- a/cluster/aws/util.sh +++ b/cluster/aws/util.sh @@ -20,6 +20,7 @@ # config-default.sh. source $(dirname ${BASH_SOURCE})/${KUBE_CONFIG_FILE-"config-default.sh"} +export AWS_DEFAULT_REGION=${ZONE} AWS_CMD="aws --output json ec2" function json_val { @@ -421,7 +422,6 @@ EOF } function kube-down { - AWS_CMD="aws --output json ec2" instance_ids=$($AWS_CMD describe-instances | get_instance_ids) $AWS_CMD terminate-instances --instance-ids $instance_ids > /dev/null echo "Waiting for instances deleted"