- Newest
- Most votes
- Most comments
Hello.
Even if you subscribe your email address and send notifications via email, a similar JSON will be sent to you.
https://docs.aws.amazon.com/waf/latest/developerguide/waf-using-managed-rule-groups-sns-topic.html
Therefore, you will need to devise a way to notify Lambda, process the message, and send the email again via SNS.
Since it is possible to subscribe to Lambda in eu-central-1 from the SNS subscription in us-east1, how about processing messages with Lambda?
Thanks @Riku!
It is indeed working with this solution: [AWS managed SNS topic in us-east-1] -> [Lambda in my account in eu-central-1] -> [SNS topic in my account in eu-central-1]
If someone has the same issue:
- I created a Lambda function using the blueprint “Process messages pushed to an SNS topic”
- As trigger, I added [AWS managed SNS topic in us-east-1]
- As Lambda code, I added
import boto3 print('Loading message function...') def lambda_handler(event, context): sns = boto3.client('sns') sns.publish( TopicArn="[SNS TopicArn in my account in eu-central-1]", Subject=event['Records'][0]['Sns']['Subject'], Message=event['Records'][0]['Sns']['Message'] ) return ('SNS sent to the network team reg. new AWS managed WAF rule notification')
Received emails are now as expected!
AWS supports subscribe SQS in one region to SNS topic in another region - https://docs.aws.amazon.com/sns/latest/dg/sns-cross-region-delivery.html
Relevant content
- asked 3 months ago