AWS lambda question

Soldato
Joined
18 May 2010
Posts
22,784
Location
London
Daily we shut down our environments using lambda.

Is it possible to send an email prior with a clickable link that when clicked would cancel the execution of this shutdown event?

I'm thinking API gateway might have a role to play but I doubt it's possible to cancel a scheduled lambda.

What about if it polls an sqs queue or something which if it contains a certain message it will not run the lambda.

The message in the sqs would obviously be there by virtue of the clickable link in the email.
 
depending on the environment setup, you could automate it a bit more as well.

If it looks something like
API Gateway > EC2

Then you can inspect Cloudwatch logs for recent traffic, if there's none and it's passed 6pm then shutdown environment. If people are still hitting the servers then make Lambda fire in another 30 minutes

Yea that's not a bad idea.

The initial idea was for an email to go out to people telling them that the servers will be shut down at 7pm. And if they want to postpone this click the link in the email.

But I couldn't see how a link in an email would cancel a scheduled lambda.

I suppose monitoring for activity isn't a bad idea.

I need to think.

Thanks
 
Back
Top Bottom