Created
August 5, 2019 17:36
-
-
Save iDVB/d8d5e2a5818ea5bd2650b794dec74887 to your computer and use it in GitHub Desktop.
Dynamically named S3 Bucket Trigger
This file contains 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
Transform: AWS::Serverless-2016-10-31 | |
Resources: | |
Lambda: | |
Type: AWS::Serverless::Function | |
Properties: | |
Runtime: nodejs8.10 | |
InlineCode: | | |
exports.handler = (event, ctx, cb) => { | |
console.log(JSON.stringify(event)); | |
cb(null, 'SUCCESS'); | |
}; | |
Handler: index.handler | |
Events: | |
PhotoUpload: | |
Type: S3 | |
Properties: | |
Bucket: !Ref S3Bucket | |
Events: s3:ObjectCreated:* | |
S3Bucket: | |
Type: AWS::S3::Bucket | |
# No Properties here at all. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment