0

I am looking for a solution to make a POST Request to an External API when the state of an EC2 Instance changes. I want to use Cloudwatch so that I can pass the InstanceId to the API with the Input Transformer option.

Is there a way to do this without involving Lambda? (upstream requirement) Perhaps with an SSM Automation?

  • Have a look here at lifecycle scripts. Lambda is likely the easiest way, but using scripts on the instance might work if the instance is up / available. – Tim Jan 29 '19 at 18:14
0

You can send the CloudWatch events to SNS Topic or SQS Queue and have a subscriber somewhere that will do the API call when the event happens. However you still need to host the subscriber somewhere, give it the permissions to subscribe to the topic / queue, etc.

It would be much easier to use Lambda with a simple IAM Role. Can you elaborate why it isn't an option? Why would you not use the best suited tool for the job at hand?

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.