July 2018
Intermediate to advanced
350 pages
8h 47m
English
The following SAM template creates three AWS Lambda functions that generate different resolutions for the photo that was uploaded to the S3 bucket. If you look at the template, all three AWS Lambda function events are configured to the same Amazon SNS topic:
ThumbNailGenerationFunction: Type: AWS::Serverless::Function Properties: CodeUri: . Handler: index.handler Runtime: nodejs8.10 Policies: - AmazonS3FullAccessPolicy Events: SNS1: Type: SNS Properties: Topic: Ref: PhotoUploadTopic IconGenerationFunction: Type: AWS::Serverless::Function Properties: CodeUri: . Handler: index.handler Runtime: nodejs8.10 Policies: - AmazonS3FullAccessPolicy Events: SNS1: Type: SNS Properties: Topic: Ref: PhotoUploadTopic HighResolutionGenerationFunction: ...