serverless-patterns icon indicating copy to clipboard operation
serverless-patterns copied to clipboard

New pattern submission: SNS to Lambda CDK

Open heltonh2r opened this issue 5 years ago • 1 comments

To submit a template to the Serverless Patterns Collection, submit an issue with the following information.

To learn more about submitting a pattern, read the publishing guidelines page.

Use the model template located at https://github.com/aws-samples/serverless-patterns/tree/main/_pattern-model to set up a README, template and any associated code.

Description (mid-length e.g. "Create a Lambda function that sends events to EventBridge.")

Create a Lambda function that subscribes to a SNS topic

Language: (optional e.g. "Python", if you have a Lambda function in your example)

Python

YouTube videoId (optional e.g. "VI79XQW4dIM")

N/A

Framework (currently we support SAM or CDK)

CDK

Services from/to (e.g. "Lambda to EventBridge)

SNS to Lambda

Description (this must include a throughout explanation of the pattern together with details of IAM permissioning)

This pattern contains a sample AWS CDK stack to create a Lambda Function, a SNS Topic and the IAM permissions required to run the application. SNS invokes the Lambda function when new messages are available. When messages are sent to the SNS topic, they are delivered as a JSON event payload to the Lambda function.

Deployment commands

cdk deploy

GitHub PR for template:

160

Payload example (e.g. Lambda event payload from source service).

Text message: "Hello world!"

Additional resources (optional: link and anchor text, up to 5 resources)

Author bio

Name: Helton Henrique Ribeiro Photo URL: https://phonetool.amazon.com/users/ribeih LinkedIn: https://www.linkedin.com/in/heltonribeiro/ Description (up to 255 chars): Helton is a Cloud Application Architect at AWS.

heltonh2r avatar Oct 18 '21 01:10 heltonh2r

Thanks for your contribution - this is now live at https://serverlessland.com/patterns/sns-lambda-cdk.

Please can you update your testing section of the GitHub ReadMe to remove the SAM references.

jbesw avatar Oct 22 '21 14:10 jbesw