Skip to content
This repository has been archived by the owner on Jul 28, 2021. It is now read-only.

How can you deploy to a region other than us-east-1? #36

Open
LewS opened this issue Jun 13, 2017 · 4 comments
Open

How can you deploy to a region other than us-east-1? #36

LewS opened this issue Jun 13, 2017 · 4 comments

Comments

@LewS
Copy link

LewS commented Jun 13, 2017

deploy.py does not utilise the specified DEFAULT_REGION when creating the s3 bucket.
from what I can gather the script only works by virtue of the default bucket region being us-east-1, which ostensibly means it can only be deployed in us-east-1 as lambda can only utilise a bucket from the same region.
Would be nice of we could specify the region (as appears to have been designed for), tried to fiddle with the CreateBucketConfiguration={'LocationConstraint': DEFAULT_REGION} within the s3_client.create_bucket section; which sort of works if the bucket does not exist, but will fail updates where it does.

@martinb3
Copy link
Contributor

Hello! As you've figured out already, we typically deploy the script only in a known region, so we tend to override everything with 'us-east-1'. The deploy feature originally was a separate script, hence it's somewhat separated from the rest of the code and not respecting the override (that's definitely a bug!).

  -t [CONF_TOOLREGION], --tool_region [CONF_TOOLREGION]
                        dynamodb & SNS region used by ebs-snapper (us-east-1
                        is default)

It seems like this will need some further testing to figure out the right syntax to land a bucket in a different region (likely the params will need tweaking in create_bucket...).

@LewS
Copy link
Author

LewS commented Jun 13, 2017

Something permanent so as to avoid the need to ebs-snapper -t region each time seems ideal.
All appears to be working pretty well so far with the bucket hacked into place ;-)
Let me know if you need any assistance testing.

@martinb3
Copy link
Contributor

@LewS -- would you mind trying the alternate_regions branch? It seems like CloudFormation doesn't like looking in an alternate S3 region for its Lambda functions, especially if there used to be a bucket by that name in us-east-1. Otherwise, I think I have that branch doing what you need for deployment. Thanks!

@martinb3
Copy link
Contributor

It seems like you gave that branch a try -- is it working okay now for you, once the S3 buckets/naming was worked out?

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