Reputation: 449
I have a requirement to run a runnable jar from AWS lambda. One option is to create a docker and use ECS to achieve the desired result. I am looking for an alternative approach using EC2. Is it possible to deploy a runnable jar in EC2 and then invoke it from AWS Lambda?
Upvotes: 0
Views: 692
Reputation: 9837
Yes it's possible using EC2 Run Commands. You could use your favorite AWS SDK flavor (Java, Python, etc) to run a command on your EC2 instance from your Lambda function. Here's a good tutorial: http://docs.aws.amazon.com/systems-manager/latest/userguide/run-command.html
Upvotes: 1