Skip to content

hogarthww-labs/amplify-category-sqs-lambda

Repository files navigation

Amplify SQS lambda trigger Template

An easy way to add CloudFormation SQS lambda trigger templates to your Amplify Project

Installation

This plugin assumes that the Amplify CLI is already installed. For installation help, please see step 2 of the getting-started docs.

To install, simply enter the following command in your terminal:

npm i -g hogarthww-labs/amplify-sqs-lambda-template (install directly from this repo)

npm i -g amplify-sqs-lambda-template (in the future when deployed to npm registry)

Important

This plugin has not been tested. Use as a blueprint/template.

Usage

Command Description
amplify add sqs-function Adds an SQS triggered function resource template to your project.
amplify remove sqs-function Removes a specified SQS triggered function resource template from your project.

Usage notes

Note that you can apply this template on an existing function generated via amplify. The resource will assume the function codes can be found in ./src relative to the template, typically in ./src/index.js

SQS usage

You can use the sqs-utils module to facilitate working with SQS, including Producer and Consumer.

Runtimes

Lambda runtime values

dotnetcore1.0 | dotnetcore2.0 | dotnetcore2.1 | dotnetcore3.1 | go1.x | java11 | java8 | java8.al2 | nodejs | nodejs10.x | nodejs12.x | nodejs4.3 | nodejs4.3-edge | nodejs6.10 | nodejs8.10 | provided | provided.al2 | python2.7 | python3.6 | python3.7 | python3.8 | ruby2.5 | ruby2.7

Currently the CLI only supports the following values:

  • nodejs12.x
  • python3.8
  • python3.7
  • python2.7

You can manually edit the generated template, searching for runtime and substitute as needed.

Timeout

You can specify the timeout for the lambda. The default is 60 for 60 seconds (1 minute)

About

Amplify SQS triggered lambda function template plugin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published