Skip to content
This repository has been archived by the owner on Mar 16, 2019. It is now read-only.

Chapter 5, p134: can't create elasticbeanstalk application version if region != us-east-1 #8

Open
knguyen0105 opened this issue Mar 17, 2017 · 3 comments

Comments

@knguyen0105
Copy link

Hi,

I config my aws at ap-southeast-2, when I run the command to create an application version

$ aws elasticbeanstalk create-application-version --application-name etherpad --version-label 1.5.2 --source-bundle S3Bucket=awsinaction,S3Key=code/chapter5/etherpad.zip An error occurred (InvalidParameterCombination) when calling the CreateApplicationVersion operation: Unable to download from S3 location (Bucket: awsinaction Key: code/chapter5/etherpad.zip). Reason: The bucket is in this region: us-east-1. Please use this region to retry the request

I tried adding '--region ap-southeast-2' or '--region us-northeast-1' but both didn't work. I'm confused about the error. What do I have to modify to work? Thanks.

@michaelwittig
Copy link
Contributor

You need to use the region us-east-1. The book assumes (and also mentions) that you use this region.

Two possibilities:

run aws configure and set the default region to us-east-1.

Alternatively, you can append --region us-east-1 to every CLI command.

Let me know if it works.

@knguyen0105
Copy link
Author

Sorry that I wasn't being clear. What I meant to ask is how to use the command if my region is ap-southeast-2? Does it mean elasticbeanstalk command lines only work for 'us-east-1'?

As noted above, I tried adding '--region ap-southeast-2' and '--region ap-east-1' but none worked.

@michaelwittig
Copy link
Contributor

Hi!
The problem ist that we used us-east-1 as the region for the bucket containing the app. Elastic beanstalk and the s3 bucket must be in the same region. What you could do:

  1. download the etherpad.zip from https://github.com/AWSinAction/code/blob/master/chapter5/etherpad.zip
  2. create a s3 bucket in the region you like to use
  3. upload etherpad.zip
  4. modify S3Bucket and S3Key accordingly in the command

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants