0

I need to trigger execution of an AWS Lambda function from within an EC2 instance. Or in parlance of AWS Lambda, my event source is code running inside EC2 instance.

The list of supported event sources does not quite tell me how to use an event inside an EC2 instance to trigger a lambda function.

I basically want to do something like provisioning a new instance when an application parameter exceeds watermark level.

Yogesh Devi

1
  • 5
    Yes, you can invoke Lambda functions from within EC2 as long as the instance has appropriate permissions (via IAM role). However, it looks like you are basically trying to create your own Auto Scaling solution. Why not just use Auto Scaling (with your custom CloudWatch metric)? Commented Mar 30, 2018 at 15:49

1 Answer 1

1

Application code running anywhere on the Internet (including an Amazon EC2 instance) can call the lambda Invoke command to trigger a Lambda function.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.