Yandex Cloud
Documentation
PresentationContact UsTry it for free
© 2026 Direct Cursus Technology L.L.C.
Yandex Cloud Notification Service
    • Overview
    • Getting started with mobile push notifications
    • Getting started with in-browser push notifications
    • Getting started with SMS
    • Getting started with topics
    • All guides
      • Creating a topic
      • Creating a subscription to a topic
      • Sending a notification to a topic
      • Managing a topic
      • Managing a subscription
    • Configuring logging
    • Overview
    • Mobile push notifications
    • In-browser push notifications
    • SMS
    • Topics
    • Quotas and limits
    • All tools
    • AWS CLI
    • AWS SDK for C++
    • AWS SDK for Go
    • AWS SDK for Java
    • AWS SDK for JavaScript
    • AWS SDK for Kotlin
    • AWS SDK for .NET
    • AWS SDK for PHP
    • AWS SDK for Python (boto3)
  • Pricing policy
  • Access management
  • Audit Trails events
  • Metrics Monitoring
  • Logs Cloud Logging
  • Release notes

In this article:

  • Updating a topic
  • Deleting a topic
  1. Step-by-step guides
  2. Topics
  3. Managing a topic

Managing a topic

Written by
Yandex Cloud
Updated at November 5, 2026
View in Markdown
  • Updating a topic
  • Deleting a topic

Updating a topicUpdating a topic

Management console
AWS CLI
AWS SDK for Python
  1. In the management console, select the folder containing the topic.
  2. Navigate to Cloud Notification Service.
  3. Select Topics on the left.
  4. Select the topic.
  5. At the top right, click Edit.
  6. Edit the topic name. It must be unique within Cloud Notification Service.
  7. Under Logging, enable or disable Write logs.
  8. Update the existing log group or create a new one.
  9. Enable or disable Yandex Message Queue.
  10. Click Save changes.
  1. If you do not have the AWS CLI yet, install and configure it.

  2. Run this command:

    aws sns set-topic-attributes \
     --topic-arn <topic_ARN> <attributes>
    

    To unlink a service account from the topic and ban sending messages to the Message Queue queue, provide an empty string in --attribute-value:

    aws sns set-topic-attributes \
     --topic-arn <topic_ARN> \
     --attribute-value ""
    
  3. View the new topic settings:

    aws sns get-topic-attributes \
     --topic-arn <topic_ARN>
    

For more on commands, see these AWS guides: set-topic-attributes and get-topic-attributes.

  1. If you do not have the AWS SDK for Python (boto3) yet, install and configure it.

  2. To update a topic, use the code below:

    try:
        response = client.set_topic_attributes(
            TopicArn="<topic_ARN>",
            AttributeName="<attribute_name>",
            AttributeValue="<attribute_value>",
        )
        print("Response metadata:", response['ResponseMetadata'])
    except botocore.exceptions.ClientError as error:
        print(f"Error: {error}")
    

    To unlink a service account from the topic and ban sending messages to the Message Queue queue, provide an empty string in AttributeValue:

    response = client.set_topic_attributes(
        TopicArn="<topic_ARN>",
        AttributeName="SQSServiceAccountId",
        AttributeValue="",
    )
    

Deleting a topicDeleting a topic

Management console
AWS CLI
AWS SDK for Python
  1. In the management console, select the folder containing the topic.
  2. Navigate to Cloud Notification Service.
  3. Select Topics on the left.
  4. Click next to the topic of interest and select Delete.
  5. Confirm the deletion.

Run this command:

aws sns delete-topic --topic-arn <topic_ARN>

Learn more about the aws sns delete-topic command in this AWS guide.

Use the following code:

@staticmethod
  def delete_topic(topic):

      try:
          topic.delete()
          logger.info("Deleted topic %s.", topic.arn)
      except ClientError:
          logger.exception("Couldn't delete topic %s.", topic.arn)
          raise

Deleting a topic will also delete all its subscriptions. The endpoints associated with the subscriptions will remain. Topic deletion may take a while. You cannot create a new topic with the same name while the topic is being deleted.

Was the article helpful?

Previous
Sending a notification to a topic
Next
Managing a subscription
© 2026 Direct Cursus Technology L.L.C.