Skip to content

Example on how to create a AWS Lambda triggered by SQS and SQS subscribe to SNS in Terraform

Notifications You must be signed in to change notification settings

javiergoni/aws-localstack-terraform-sns-sqs-lambda

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

aws-localstack-terraform-sns-sqs-lambda

Example on how to create a AWS Lambda triggered by SQS and SQS subscribe to SNS by Terraform

Flow

Flow Diagram

Usage

Localstack

$ docker-compose up -d

Terraform

$ cd terraform
$ terraform init
$ terraform apply

List SNS

$ docker-compose exec localstack bash -c "awslocal sns list-topics"

List SQS

$ docker-compose exec localstack bash -c "awslocal sqs list-queues"

List Lambda

$ docker-compose exec localstack bash -c "awslocal lambda list-functions"

Publish

$ docker-compose exec localstack bash -c "awslocal sns publish --topic-arn $(terraform output test-sns-arn) --message 'hola'"

About

Example on how to create a AWS Lambda triggered by SQS and SQS subscribe to SNS in Terraform

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 60.2%
  • HCL 39.8%