Following S3 Simple event definition I have created serverless deployment
functions:
convert:
handler: handler.convert
events:
- s3:
bucket: dev.domain.com
event: s3:ObjectCreated:*
rules:
- prefix: assets/images/
- suffix: .jpg
existing: true
- s3:
bucket: dev.domain.com
event: s3:ObjectCreated:*
rules:
- prefix: assets/images/
- suffix: .png
existing: true
But at the time of deployment I am getting following error
An error occurred: ConvertCustomS31 - Failed to create resource. Configuration is ambiguously defined. Cannot have overlapping suffixes in two rules if the prefixes are overlapping for the same event type. See details in CloudWatch Log: 2020/08/25/[$LATEST]47c58153b46f4aaf9ec08eacabbac2b2.
any idea what I am missing here ?
Also what I supposed to use here event: s3:ObjectCreated:* If I want triggers only for S3 PUT events. I tried event: s3:ObjectCreatedByPut:* which gave me
An error occurred: ConvertCustomS31 - Failed to create resource. The event is not supported for notifications See details in CloudWatch Log: 2020/08/25/[$LATEST]f50070907c60405085c3b03ab0183514.