Hi. I’d like to create an event that triggers a lambda when the CloudFormation stack is successfully deployed to AWS. Can this be done with Serverless? I’ve tried looking at the events documentation here, and tried something similar to
functions:
hello:
handler: src/handler.hello
world:
handler: src/handler.world
events:
- cloudwatchEvent:
event:
source:
- "aws.cloudformation"
detail:
state:
"complete"
In the above code, I was hoping the function world
would be invoked when the stack has completed updating. I could probably write a script that manually calls serverless invoke --function world
after the deploy succeeds, but that just seems weird.
Any help would be appreciated