Created
October 8, 2025 20:57
-
-
Save managedkaos/77c9ef2c0e4aa85417c2c3bab427317c 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
| Resources: | |
| ImagesBucket: | |
| Type: AWS::S3::Bucket | |
| ResizeQueue: | |
| Type: AWS::SQS::Queue | |
| S3ToSQS: | |
| Type: AWS::S3::Bucket | |
| Properties: | |
| NotificationConfiguration: | |
| QueueConfigurations: | |
| - Event: s3:ObjectCreated:* | |
| Queue: !GetAtt ResizeQueue.Arn | |
| DependsOn: ImagesBucket # wire notifications to the same bucket | |
| # (In practice, attach this config to ImagesBucket; shown split for brevity) | |
| ImageResizer: | |
| Type: AWS::Serverless::Function | |
| Properties: | |
| Runtime: python3.11 | |
| Handler: app.handler | |
| Events: | |
| FromQueue: | |
| Type: SQS | |
| Properties: | |
| Queue: !GetAtt ResizeQueue.Arn | |
| Policies: | |
| - S3ReadPolicy: | |
| BucketName: !Ref ImagesBucket | |
| - S3WritePolicy: | |
| BucketName: !Ref ImagesBucket |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment