Skip to content

Instantly share code, notes, and snippets.

@mhart
Created December 1, 2020 17:16
Show Gist options
  • Save mhart/fa8e16458965063a74a4ffb8f77fcf37 to your computer and use it in GitHub Desktop.
Save mhart/fa8e16458965063a74a4ffb8f77fcf37 to your computer and use it in GitHub Desktop.
AWSTemplateFormatVersion: "2010-09-09"
Transform: AWS::Serverless-2016-10-31
Parameters:
ImageUri:
Type: String
Resources:
ConversionFunction:
Type: AWS::Serverless::Function
Properties:
PackageType: Image
MemorySize: 3008
Timeout: 30
ImageUri: !Ref ImageUri
Policies:
- S3CrudPolicy:
BucketName: !Sub ${AWS::StackName}-${AWS::AccountId}
Events:
CreatePdfEvent:
Type: S3
Properties:
Bucket: !Ref MediaBucket
Events: s3:ObjectCreated:*
Filter:
S3Key:
Rules:
- Name: prefix
Value: upload/
MediaBucket:
Type: AWS::S3::Bucket
Properties:
BucketName: !Sub ${AWS::StackName}-${AWS::AccountId}
Outputs:
MediaBucket:
Value: !Ref MediaBucket
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment