An open API service indexing awesome lists of open source software.

https://github.com/kizza/serverless-marco-polo

A basic call-response using queues in serverless
https://github.com/kizza/serverless-marco-polo

Last synced: 2 months ago
JSON representation

A basic call-response using queues in serverless

Awesome Lists containing this project

README

        

# Serverless Marco Polo

An example of the serverless framework deploying a lambda to publish a message to an SNS topic ("Marco"), which is in
turn put on a SQS queue, and read by a second lambda ("Polo").

## Usage

Populate `.env` and `.env.prod` files as per the `.env.example`.
Deploy to various stages with the following:

```
yarn deploy --stage dev
yarn deploy --stage prod
```

Hit the endpoint provided for the `/marco` lambda, then check the polo logs (via Cloudwatch or `yarn logs --function polo`

## Discussion

Uses `serverless-esbuild` with config file `config.esbuild.js` for greater flexibility over the inbuilt `esbuild`.
This implementation uses es module bundles and implements `dotenv` variables.