notify-sns

command
v0.0.0-...-ad5e4c0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 17, 2021 License: MIT Imports: 6 Imported by: 0

README

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
Configure your AWS CLI

Run the following command and complete the wizard with your info.

aws configure
Creating AWS resources with Terraform

Run the following command replacing bucket_name with your bucket name:

terraform apply -var bucket_name=REPLACE-ME
Checking notifications on file upload
  1. Upload a new file to the bucket
    aws s3 cp upload.me s3://REPLACE-ME
    
  2. 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

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳