Skip to content

Instantly share code, notes, and snippets.

@xximjasonxx
Created September 2, 2019 15:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xximjasonxx/11c8490b1de7513036254fc1f83a5e08 to your computer and use it in GitHub Desktop.
Save xximjasonxx/11c8490b1de7513036254fc1f83a5e08 to your computer and use it in GitHub Desktop.
AWSTemplateFormatVersion: 2010-09-09
Description: "Creates infrastructure for Thumnbail Creator"
Parameters:
RawBucketName:
Type: String
Default: rawimages
Description: Enter the name of the Raw Images Bucket
ThumbnailBucketName:
Type: String
Default: thumbnailimages
Description: Enter the name of the Thumbnail Images Bucket
CreateThumbnailLambdaVersionFile:
Type: String
Description: The file containing the compiled contents for the Lambda
AnalyzeImageLambdaVersionFile:
Type: String
Description: The file containing the compiled contents for the Lambda
Resources:
CreateThumbnailFunction:
Type: AWS::Lambda::Function
Properties:
Code:
S3Bucket: thumbnailcreator-artifacts
S3Key: !Ref CreateThumbnailLambdaVersionFile
Handler: CreateThumbnailFunction::Functions.CreateThumbnailFunction::ExecuteAsync
Runtime: dotnetcore2.1
Role: !GetAtt AppRole.Arn
TracingConfig:
Mode: Active
Timeout: 300
Environment:
Variables:
ThumbnailBucketName: !Ref ThumbnailBucketName
AnalyzeImageFunction:
Type: AWS::Lambda::Function
Properties:
Code:
S3Bucket: thumbnailcreator-artifacts
S3Key: !Ref AnalyzeImageLambdaVersionFile
Handler: AnalyzeImageFunction::Functions.AnalyzeImageFunction::ExecuteAsync
Runtime: dotnetcore2.1
Role: !GetAtt AppRole.Arn
TracingConfig:
Mode: Active
Timeout: 600
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment