Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws_ses_identity: can't unset *_notifications topic #150

Closed
drzraf opened this issue Jul 22, 2020 · 4 comments · Fixed by #1730
Closed

aws_ses_identity: can't unset *_notifications topic #150

drzraf opened this issue Jul 22, 2020 · 4 comments · Fixed by #1730
Labels
affects_2.10 bug This issue/PR relates to a bug module module

Comments

@drzraf
Copy link

drzraf commented Jul 22, 2020

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 drzraf changed the title aws_ses_identity: can't unset complaint_notifications: aws_ses_identity: can't unset *_notifications topic Jul 22, 2020
@tremble
Copy link
Contributor

tremble commented Jul 22, 2020

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.

@ansibullbot
Copy link

@ansibullbot ansibullbot added affects_2.10 bug This issue/PR relates to a bug module module labels Aug 19, 2020
@otteydw
Copy link

otteydw commented Sep 15, 2021

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.

@ansibullbot
Copy link

alinabuzachis pushed a commit to alinabuzachis/community.aws that referenced this issue May 25, 2022
…nsible-collections#150)

According to Amazon's documentation [1] the error code returned
when no tag set can be found is NoSuchTagSetError rather than
NoSuchTagSet and this is how Ceph's S3 implementation behaves.
However AWS S3 actually returns NoSuchTagSet.

Associated error with Ceph:

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: botocore.exceptions.ClientError: An error occurred (NoSuchTagSetError) when calling the GetBucketTagging operation: Unknown
fatal: [abc]: FAILED! => changed=false
  boto3_version: 1.14.49
  botocore_version: 1.17.49
  error:
    bucket_name: abc
    code: NoSuchTagSetError
  msg: 'Failed to get bucket tags: An error occurred (NoSuchTagSetError) when calling the GetBucketTagging operation: Unknown'
  response_metadata:
    host_id: ''
    http_headers:
      accept-ranges: bytes
      content-length: '229'
      content-type: application/xml
      date: Thu, 27 Aug 2020 07:11:11 GMT
      strict-transport-security: max-age=31536000; includeSubDomains
      x-amz-request-id: tx0000000000000003aaad6-005f475c8f-36fd35b6f-rma1
    http_status_code: 404
    request_id: tx0000000000000003aaad6-005f475c8f-36fd35b6f-rma1
    retry_attempts: 0

[1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketTagging.html
softwarefactory-project-zuul bot pushed a commit that referenced this issue Mar 14, 2023
ses: fix clearing notification topic

SUMMARY

Fixes #150. As per the docs, the SnsTopic parameter has to be omitted from the request in order to clear the notification setting.
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
ses_identity

Reviewed-by: Alina Buzachis
Reviewed-by: Mark Chappell
Reviewed-by: Kamil Turek <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects_2.10 bug This issue/PR relates to a bug module module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants