Search code examples
amazon-web-servicesamazon-snsaws-app-config

AWS AppConfig flags with SNS Topics


I've set up an AWS SNS Service that sends an email to a specific address and calls a webhook to notify an external application that a job is completed.

I've been asked to enable/disable one of the two subscriptions based on a flag that I've set inside AWS AppConfig. I've googled around but have found no way of conditioning the execution of such subscription based on the value of the flag, is this possible?

Should I use a lambda as a subscription endpoint then send the webhook/mail based on AWS config flag value?


Solution

  • You cannot directly tie a SNS subscription status to a flag in AppConfig.

    What you can do is either to read the flag before publishing the message to SNS or, as you said, replace the subscription with a Lambda that checks the flag after receiving a message from the SNS topic.