UNPKG

serverless

Version:

Serverless Framework - Build web, mobile and IoT applications with serverless architectures using AWS Lambda, Azure Functions, Google CloudFunctions & more

81 lines (77 loc) 1.94 kB
service: CHANGE_TO_UNIQUE_PER_RUN provider: name: aws runtime: nodejs12.x versionFunctions: false s3: customBucket: name: CHANGE_TO_UNIQUE_PER_RUN publicAccessBlockConfiguration: BlockPublicAcls: true BlockPublicPolicy: true IgnorePublicAcls: true RestrictPublicBuckets: true functions: minimal: handler: core.minimal events: - s3: CHANGE_TO_UNIQUE_PER_RUN extended: handler: core.extended events: - s3: bucket: CHANGE_TO_UNIQUE_PER_RUN event: s3:ObjectRemoved:* rules: - prefix: photos/ - suffix: .jpg custom: handler: core.custom events: - s3: bucket: customBucket existing: handler: core.existing events: - s3: bucket: CHANGE_TO_UNIQUE_PER_RUN event: s3:ObjectCreated:* rules: - prefix: Files/ - suffix: .TXT existing: true # testing if two functions share one bucket with multiple bucket configs existingCreated: handler: core.existingCreated events: - s3: bucket: CHANGE_TO_UNIQUE_PER_RUN event: s3:ObjectCreated:* rules: - prefix: photos - suffix: .jpg existing: true - s3: bucket: CHANGE_TO_UNIQUE_PER_RUN event: s3:ObjectCreated:* rules: - prefix: photos - suffix: .png existing: true existingRemoved: handler: core.existingRemoved events: - s3: bucket: CHANGE_TO_UNIQUE_PER_RUN event: s3:ObjectRemoved:* rules: - prefix: photos - suffix: .jpg existing: true - s3: bucket: CHANGE_TO_UNIQUE_PER_RUN event: s3:ObjectRemoved:* rules: - prefix: photos - suffix: .png existing: true