I am trying to create an event rule that is triggered by a change in a file in S3 bucket in different AWS account. Detail description is here
So far the rule works fine with exact file names, but I need to make it work with filename prefixes. In the working example, the file name is an exact string in the non-working example the file name is a wildcard. Does CloudWatch Events Rule JSON pattern supports wildcards?
Working configuration:
{
"source": ["aws.s3"],
"account": ["1111111xxxxx"],
"detail": {
"eventSource": ["s3.amazonaws.com"],
"eventName": ["PutObject"],
"requestParameters": { "bucketName": ["mybucket"], "key": ["myfile-20180301.csv"] }
}
}
Non-working configuration:
{
"source": ["aws.s3"],
"account": ["1111111xxxxx"],
"detail": {
"eventSource": ["s3.amazonaws.com"],
"eventName": ["PutObject"],
"requestParameters": { "bucketName": ["mybucket"], "key": ["myfile-*"] }
}
}