- 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!
Relevant content
- Accepted Answerasked 2 years ago
- Accepted Answerasked 10 days ago
- Accepted Answerasked 2 years ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated 4 months ago