Created
April 2, 2022 16:24
-
-
Save percybolmer/01ad0deb7c79007b05b937e5f232d8b4 to your computer and use it in GitHub Desktop.
Sam with SQS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWSTemplateFormatVersion: '2010-09-09' | |
Transform: AWS::Serverless-2016-10-31 | |
Description: > | |
demo | |
Sample SAM Template for demo | |
# More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst | |
Globals: | |
Function: | |
Timeout: 5 | |
Resources: | |
HelloGopher: # Here we set a Resource Name, You can set anything you want. | |
Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction | |
Properties: | |
CodeUri: ./ # This is the path to the Code, in our case we are bad and store it in root | |
Handler: hello-gopher | |
Runtime: go1.x | |
Environment: | |
Variables: | |
my-cool-variable: "maybe-not-so-cool" | |
Architectures: | |
- x86_64 | |
Events: | |
HelloEndpoint: | |
Type: Api | |
Properties: | |
Path: '/api/hellogopher' | |
Method: post | |
SQSLambda: # Here we set a Resource Name, You can set anything you want. | |
Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction | |
Properties: | |
CodeUri: ./sqslambda # This is the path to the Code, in our case we are bad and store it in root | |
Handler: sqs-lambda | |
Runtime: go1.x | |
Architectures: | |
- x86_64 | |
Events: | |
SqsEvents: # Set any name, this identifies our Resource, in this case its the Eventhandler | |
Type: SQS # Set SQS as the Source for the event triggers | |
Properties: | |
Queue: "my-awesome-queue" # The queue to listen on |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment