We have a requirement to trigger a python script that is on AWS EC2 instance when a file arrives in a S3 bucket. we were told not to use AWS Lambda. Please share the options available to trigger.
How to trigger a python script on a AWS EC2 instance when a file is placed in S3 bucket? (No Lambda)
1
-
2Does your EC2 instance run an HTTP(S) server? If so, you can configure S3 to publish events to an SNS topic and you can configure SNS to send notification messages to one or more HTTP or HTTPS endpoints.jarmod– jarmod2018-06-28 21:06:13 +00:00Commented Jun 28, 2018 at 21:06
Add a comment
|
1 Answer
Take a look at How Do I Enable and Configure Event Notifications for an S3 Bucket? for all S3 event options.
You can trigger SNS, SQS, or Lambda. You'll have to consider what approach you want to take with SNS or SQS. Try something like long polling SQS from a process running on your EC2 instance.
1 Comment
Arshanvit
Should i have to schedule python script having boto library which can check if message has came in SQS or not.After reading does message destroy itself in queue or have to manually remove it as i want new messages always and also is there retention period of message in sqs?