I'm trying to create SNS Subscription filter policy. I want this filter policy to send the message to user only when cloudformation Resource status is "CREATE_IN_PROGRESS" for s3 bucket and all the other cloudformation resource creation events shouldn't be sent to user. Can anyone with experience with creating SNS Subscription filter policy for Cloudformation events please assist on this.I just want user to receive only notification when ResourceStatus='CREATE_IN_PROGRESS' for ResourceType='AWS::S3::Bucket' and the bucket is Logical Resource Id='TestBucket'
'
I don't think that will work.
From Amazon SNS subscription filter policies - Amazon Simple Notification Service:
When AWS CloudFormation sends events, they are sent as a block of JSON. Individual elements (eg Status, Bucket name) are not sent as Amazon SNS Message Attributes. Thus, the rules will not be able to detect these values.
An alternative would be to write an AWS Lambda function that can parse the message and respond accordingly.