AWS

You would like to run an AWS Fargate task every time a file is uploaded to a certain S3 bucket. How would you achieve that?

Difficulty: unrated

Source: bregman-arie/devops-exercises by Arie Bregman

Answer

Use Amazon EventBridge so every time a file is uploaded to an S3 bucket (event) it will run an ECS task.

Such task should have an ECS Task Role so it can get the object from the S3 bucket (and possibly other permissions if it needs to update the DB for example).