I have a task on ec2 that will be triggered every time a file gets uploaded to an s3 bucket. It seems like for each file uploaded, an instance will start to run the job. The thing is, our vendor likes to upload a bunch of files at the same time and this triggers a bunch of instances to start which we don't have sufficient CPU for, so some of the files just never get processed.
Is there a way to limit the number of the containers starting? or even better, is there a way to trigger containers per time of upload instead of per number of files?