joseph-holland / lambda-graffiti-monkey

An AWS Lambda function to run Graffiti Monkey
Apache License 2.0
15 stars 8 forks source link

Multi-region support #4

Closed vin4git closed 7 years ago

vin4git commented 7 years ago

Hi Joseph,

Looks like this works only for one region at a time in an account.

Thanks.

joseph-holland commented 7 years ago

Hi @vin4git ,

You should be able to run the function against a different region by setting the REGION environment variable to the other region.

The only drawback to doing it this way is if you require Graffiti Monkey to be ran against multiple regions you would need to create separate functions for each region and then specify the different REGION environment variable for each. Does this make sense?

For example you could have 3 Lambda Graffiti Monkey function deployed to eu-west-1, running against eu-west-1, us-east-1 and us-west-2.

I may add real multi-region support in the future where the REGION environment variable could accept multiple values and then Graffiti Monkey could be run against each, but (big but here) then I suspect we may hit issues with the Lambda max running time of 5 minutes. So a separate function per region may actually be better. Also probably better for logging and debugging this way too. Lambda can be a pain with that so separating each region per function is probably best.

Question, opinions?? Let me know if you get it working anyway.

Joe

vin4git commented 7 years ago

Hello Joseph,

I completely agree with your points. Regarding the opinions, I wish it would be good to include a code related to SNS so whenever the lambda triggers (by scheduled cloudwatch events) it should sent a notification to users on that (Might be there should be one environment variable to put the SNS Topic ARN).

Thanks.

joseph-holland commented 7 years ago

Thanks for your feedback. I'll look at adding notifications to the application work flow.

Did you get a chance to test the multi region setup with multiple functions? Any issues?

vin4git commented 7 years ago

Yes it is working great !!! 😃

On 12-Jul-2017 2:13 PM, "Joseph Holland" notifications@github.com wrote:

Thanks for your feedback. I'll look at adding notifications to the application work flow.

Did you get a chance to test the multi region setup with multiple functions? Any issues?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/joseph-holland/lambda-graffiti-monkey/issues/4#issuecomment-314696931, or mute the thread https://github.com/notifications/unsubscribe-auth/AbZVuyOksReXx-APEzZtPfMPzI6LDSvgks5sNIctgaJpZM4OSuQJ .

joseph-holland commented 7 years ago

Hi @vin4git , I've created a Kanban board to track development work on this project and added you SNS suggestion to the backlog. Thanks!