Created
November 24, 2018 10:06
-
-
Save mrserverless/f439ee1c77ba37703d0e4911f5e34160 to your computer and use it in GitHub Desktop.
Adding Lambda S3 Event Trigger from separate CloudFormation template
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
Resources: | |
OriginalBucket: | |
Type: AWS::S3::Bucket | |
Properties: | |
BucketName: !Sub ${Realm}-{Env}-original-bucket | |
BucketEncryption: | |
ServerSideEncryptionConfiguration: | |
- ServerSideEncryptionByDefault: | |
SSEAlgorithm: AES256 | |
NotificationConfiguration: | |
LambdaConfigurations: | |
- Event: s3:ObjectCreated:* | |
Function: | |
Fn::ImportValue: | |
!Sub ${Realm}-${Env}-SeparateBucketTriggerArn |
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
Resources: | |
SeparateBucketTrigger: | |
Type: 'AWS::Serverless::Function' | |
Outputs: | |
SeparateBucketTriggerArn: | |
Export: | |
Name: !Sub ${Realm}-${Env}-SeparateBucketTriggerArn | |
Value: | |
!GetAtt SeparateBucketTrigger.Arn |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment