-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multi-region operation #7
Comments
It should be doable, but in general it's good to keep each region as independent as possible, avoiding things like configuration changes in one region impacting another. We've realised that the code is small enough to embed in the CloudFormation template (via the ZipFile property), and combined with a solution for #5, it should make at least the code deployment part pretty quick. What's the main pain point for you at the moment when setting it up for multiple regions? |
I'd argue that running lambda it each region separately has some advantages:
We've made chaos lambda part of our automated deployments scoped to a region (along with other region-specific resources, such as SNS topics), and it's working quite well. |
My use case is that I have an application running in 6 regions, and I would prefer to only run and configure it once to work against all those regions, instead of running it in each and every of those regions. This doesn't need to be the default behavior, I would just like to have this available as a configuration option. |
Another use case I saw yesterday is the support for regions where Lambda is not yet supported, such as California, Brazil or Mumbai. A multi-region model would allow a Lambda function deployed in Virginia to randomly terminate instances there. |
A regions.txt file can now be added to the lambda to specify a list of regions it should target. This file, if present, should list one or more regions separated by newlines. Any whitespace surrounding a line is ignored, as are blank lines, and if the file is missing, empty, or only contains whitespace, the lambda defaults to region it was started in. (ref GitHub issue #7)
While we'd still recommend using a different instance of the lambda per region you're right that some regions don't yet support running lambda functions at all, so the latest version should now optionally be able to target ASGs in other regions. Details are in README.md under the "Regions" heading, but basically: create a regions.txt file in the src/ folder with a newline-separated list of regions, bundle that up with the code ( Slightly convoluted, but there doesn't seem to be a more direct way to trigger a lambda with arbitrary configuration values? |
The stack should only need to be deployed in a single region, and it should be able to trigger instance terminations is any other region, because I would like to only set it up once, not once per region.
The text was updated successfully, but these errors were encountered: