ThoughtWorksStudios / eb_deployer

AWS Elastic Beanstalk blue-green deployment automation from ThoughtWorks Mingle Team
MIT License
400 stars 94 forks source link

Deploy fails when deploying project in multiple regions due to s3 bucket errors #15

Closed Yanchek99 closed 10 years ago

Yanchek99 commented 10 years ago

When deploying a project in a new region (given it is also deployed in a different region) the eb:deployed fails to deploy because the s3 bucket that stores the packages is in a different region. Basically the api responds with a PermanentRedirect error and supplies a new endpoint to access the s3 bucket from. The eb_deployer needs to handle this error.

Steps to reproduce:

  1. package and deploy the application to region A (ex. us-west-1)
  2. ensure the deployment completes and is successful
  3. package and deploy the application to a new region B (ex. us-west-2)
  4. Build will fail with the following output:
rake aborted!
AWS::S3::Errors::PermanentRedirect: The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.
xli commented 10 years ago

Hi @Yanchek99 , could it actually work when you use same elasticbeanstalk application name cross region? Because elasticbeanstalk uses (app name + stack name) as subdomain name, so (app name + stack name) should be uniq cross the region anyway, right? So, I think you'd better just use different application name cross region, so that you can have same stack name.