Created
November 3, 2023 20:57
-
-
Save em-shea/c549a9aef65f469f1ec3c3f9e32216b2 to your computer and use it in GitHub Desktop.
S3 Lambda example
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: | |
SourceBucket: | |
Type: AWS::S3::Bucket | |
DestinationBucket: | |
Type: AWS::S3::Bucket | |
Function: | |
Type: AWS::Serverless::Function | |
Properties: | |
CodeUri: src/Function | |
Handler: handler.handler | |
Runtime: python3.11 | |
Policies: | |
- S3ReadPolicy: | |
BucketName: !Ref SourceBucket | |
- S3WritePolicy: | |
BucketName: !Ref DestinationBucket | |
Events: | |
SourceBucket: | |
Type: S3 | |
Properties: | |
Bucket: !Ref SourceBucket | |
Events: | |
- s3:ObjectCreated:* | |
Environment: | |
Variables: | |
DESTINATION_BUCKET_NAME: !Ref DestinationBucket |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment