Does S3 Filtering allow wildcards for prefixes in SQS event notifications

0

I have a central logging bucket which has VPC Flow Logs, CloudTrail, Config logs from all the accounts in an organization. I have to setup Event notifications to send messages to various SQS queues based on the log type,

I am not able to make the below notification configuration work, is there an alternative?

NotificationConfiguration:
    QueueConfigurations:
      - Event: s3:ObjectCreated:Put
        Queue: !GetAtt MyQueue.Arn
        Filter:
          S3Key:
            Rules:
            - Name: prefix
              Value: AWSLogs/*/CloudTrail/
1 Answer
0
Accepted Answer

Because the wildcard asterisk character (*) is a valid character that can be used in object key names, Amazon S3 literally interprets the asterisk as a prefix or suffix filter. You can't use the wildcard character to represent multiple characters for the prefix or suffix object key name filter. Instead, you must configure multiple event notifications to match the object key names.

AWS
EXPERT
answered 4 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions