January 2019
Intermediate to advanced
690 pages
16h
English
The AWS::Serverless::Function resource type is used to define and create Lambda functions and it's associated event source mappings which trigger the function.
Consider the flowing example snippet for creating a simple Lambda function using SAM:
Handler: index.js
Runtime: nodejs4.3
CodeUri: 's3://myS3Bucket/function.zip'
Description: A simple function for demonstrating SAM
MemorySize: 128
Timeout: 15
Policies:
- LambdaFunctionExecutePolicy
- Version: '2012-10-17'
Statement:
- Effect: Allow
Action:
- s3:GetObject
- s3:GetObjectACL
Resource: 'arn:aws:s3:::myS3Bucket/*'
Environment:
Variables:
key1: Hello
key2: World
From the following snippet, most of the properties should be well known by now, including the Handler ...
Read now
Unlock full access