简体   繁体   中英

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?

PS docker image should have at least 8GB memory for working

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM