Tony Montana
Tony Montana

Reputation: 23

How to run docker image one time in aws on some event and shut down it after that?

I need to know how can I run docker image in aws one time on some event(file upload).

For example: I uploaded files to S3 and then I need to run my docker image one time. I know that I can do something like that with ESC tasks, but in this case I will have constantly running EC2, it's too expensive.

How to run docker image once on every file upload and shutdown it after its running?

P.S. docker image should have at least 8GB memory for working

Upvotes: 2

Views: 668

Answers (1)

Balu Vyamajala
Balu Vyamajala

Reputation: 10393

Two major announcements for Lambdas in ReInvent 2020 solves your usecase.

you can easily trigger a Lambda function from S3 Upload, Here is a tutorial


Older approach: Triggering an ECS task from Cloudwatch Event Rule, Here is a tutorial

Upvotes: 0

Related Questions