community.aws icon indicating copy to clipboard operation
community.aws copied to clipboard

aws_ses_identity: can't unset *_notifications topic

Open drzraf opened this issue 3 years ago • 4 comments

SUMMARY

Once a SNS topic is set for a domain's notification, there no known way to remove it.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

aws_ses_identity

ANSIBLE VERSION
ansible 2.9.9
CONFIGURATION
python version = 3.8.2
OS / ENVIRONMENT
boto3_version "1.14.23"
botocore_version "1.17.23
STEPS TO REPRODUCE

I tried any null, empty-string, empty object variations of the below dict:

  aws_ses_identity:
    identity: foo.com
    state: present
    complaint_notifications:
      topic: null
    bounce_notifications:
      topic: null
    feedback_forwarding: True
EXPECTED RESULTS

The existing topic is unset (See None in Amazon UI)

ACTUAL RESULTS
  • Failed to set identity notification topic for foo.com Bounce: Parameter validation failed:\nInvalid type for parameter SnsTopic, value: None, type: <class 'NoneType'>, valid types: <class 'str'>"
  • Failed to set identity notification topic for foo.com Bounce: An error occurred (InvalidParameterValue) when calling the SetIdentityNotificationTopic operation: SNS topic is invalid.

drzraf avatar Jul 22 '20 03:07 drzraf

Relevant excerpt from the Amazon Docs:
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ses.html#SES.Client.set_identity_notification_topic

SnsTopic (string) -- The Amazon Resource Name (ARN) of the Amazon SNS topic. If the parameter is omitted from the request or a null value is passed, SnsTopic is cleared and publishing is disabled.

tremble avatar Jul 22 '20 05:07 tremble

cc @jillr @orthanc @s-hertel @wimnat click here for bot help

ansibullbot avatar Aug 19 '20 23:08 ansibullbot

Interested in a fix for this, as I just stumbled upon this defect in my environment.

I had to manually remove the topic from my SES config.

otteydw avatar Sep 15 '21 18:09 otteydw

cc @markuman click here for bot help

ansibullbot avatar Sep 15 '21 18:09 ansibullbot