Send notifications on fileupload
An example on how to set up a S3 bucket to send a notification event to a SQS queue when a file was uploaded.
Getting Started
These instructions will get you a copy of the project up and running on AWS.
Prerequisites
What things you need to install the software and how to install them
brew install terraform awscli
Run the following command and complete the wizard with your info.
aws configure
Run the following command replacing bucket_name
with your bucket name:
terraform apply -var bucket_name=REPLACE-ME
Checking notifications on file upload
- Upload a new file to the bucket
aws s3 cp upload.me s3://REPLACE-ME
- Run the following command to consume the notification from SQS:
go run ReceiveMessage.go -q sqs-for-REPLACE-ME-WITH-BUCKET_NAME
Tearing down
After you are done, remove all AWS resources by running the following command:
terraform destroy -var bucket_name=REPLACE-ME
License
This project is licensed under the MIT License - see the LICENSE.md file for details