Get SES config from VCAP_SERVICES

This commit is contained in:
Ryan Ahearn
2023-01-31 17:27:17 -05:00
parent 74566b733d
commit d1c03e5e8c
7 changed files with 57 additions and 11 deletions

View File

@@ -39,8 +39,7 @@ def get_certificate(url):
def validate_arn(sns_payload):
if VALIDATE_SNS_TOPICS:
arn = sns_payload.get('TopicArn')
topic_name = arn.split(':')[5]
if topic_name not in VALID_SNS_TOPICS:
if arn not in VALID_SNS_TOPICS:
raise ValidationError("Invalid Topic Name")