S3 event trigger/notification which will run a python script in ECS/EC2 (without using Lambda)

Has anyone successfully created and/or used a s3 event trigger/notification (once an object is uploaded to the s3 bucket) to run a script in ECS/EC2?

The architecture for this is S3 --> Trigger —> SQS —> ECS/EC2 Instance.

I used the resource “aws_sqs_queue” “queue” found at https://www.terraform.io/docs/providers/aws/r/s3_bucket_notification.html. Then I created my ECS and EC2 instance(s).

I created permissions so the ECS will have access to the trigger (once the object is PUT into the S3 bucket). However, the python script I am trying to run is not running.

Any pointers would help. I am quite new to terraform.