Created
December 1, 2020 17:16
-
-
Save mhart/fa8e16458965063a74a4ffb8f77fcf37 to your computer and use it in GitHub Desktop.
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 | |
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