Skip to content

Why doesn't my Amazon Q Developer receive messages from Amazon SNS?

6 minute read
0

I subscribed Amazon Q Developer in chat applications (previously AWS Chatbot) to my Amazon Simple Notification Service (Amazon SNS) topic. However, notifications from my Amazon SNS topic didn't reach the Amazon Q Developer.

Short description

Your Amazon SNS topic's notifications didn't reach Amazon Q Developer because of one of the following reasons:

  • The communication channel between Amazon Q Developer and the Slack channel is misconfigured.
  • The communication channel between the SNS topic and Amazon Q Developer is misconfigured.

Resolution

Activate CloudWatch Logs for Amazon Q Developer

If you haven't already done so, activate Amazon CloudWatch Logs for Amazon Q Developer in chat applications to review error messages.

Verify that you correctly configured the communication channel between Amazon Q Developer and the Slack channel

Make sure that the Slack channel isn't archived or deleted

If you deleted or archived a Slack channel, then the channel can't receive messages and Slack deactivates all apps.

To unarchive a channel, see Archive or delete a channel on the Slack website.

Note: You can't restore a deleted Slack channel. If the subscribed Slack channel is deleted, then create a new Slack channel and configure it to receive notifications from your topic.

Verify that you installed the chat application on your Slack workspace

Review your chat applications CloudWatch Logs for the "account_inactive" error. If you find the "account_inactive" error, then your chat application didn't install on your Slack workspace.

To install the chat application on your Slack workspace, follow the instructions in Tutorial: Get started with Slack.

(For private Slack channels only) Verify that you added the chat application to the Slack channel

Review your chat applications CloudWatch Logs for the "channel_not_found" error. If you didn't add your chat application to the private channel, then this error occurs.

To add Amazon Q Developer to a private Slack channel, run the /invite @Amazon Q command in the private channel.

For Slack, Amazon Chime, and Microsoft Teams

Verify that you correctly configured the communication channel between the SNS topic and Amazon Q Developer.

Verify that you subscribed Amazon Q Developer to your Amazon SNS topic

Complete the following steps:

  1. Open the Amazon Q Developer console.
  2. In the navigation pane, under Configured clients, choose Slack, Amazon Chime, or Microsoft Teams.
  3. Select your Slack channel in the Slack workspace configuration, webhook in the Amazon Chime webhooks list, or your Microsoft Teams channel.
  4. Choose Edit.
  5. In the Details pane, under Topics, look for your SNS topic. If the topic isn't listed, then subscribe your SNS topic to Amazon Q Developer.

Verify that you listed the Amazon Q Developer endpoint as a topic subscription for your Amazon SNS topic

Complete the following steps:

  1. Open the Amazon SNS console.
  2. In the navigation pane, choose Topics, and then select the name of your SNS topic.
  3. Under Subscriptions, look for the following Amazon Q Developer endpoint: https://global.sns-api.chatbot.amazonaws.com. If the Amazon Q Developer endpoint isn't listed as a topic subscription, then you must subscribe your SNS topic to Amazon Q Developer.
    Note: Use your Amazon Q Developer configuration to send a test notification.

Make sure that you don't manually publish messages in an unsupported format

Amazon Q Developer supports manually published messages to an SNS topic. However, the format of the message must be compatible for Amazon Q Developer. Any AWS service configured to send messages must send Amazon SNS notifications to Amazon Q Developer only through the services that Amazon Q Developer supports.

Verify that Amazon Q Developer supports the AWS service messages published

Review your chat applications CloudWatch Logs for the "Event Received is not supported" error. If you see an "Event Received is not supported" error, then Amazon Q Developer doesn't support the service message published to your topic.

For a list of services that Amazon Q Developer supports, see Monitoring AWS services using Amazon Q Developer in chat applications.

Make sure that your Amazon SNS topic grants the required permissions for another AWS service to publish messages

Complete the following steps:

  1. Open the Amazon SNS console.
  2. In the navigation pane, choose Topics.
  3. Select the SNS topic that you subscribed Amazon Q Developer to.
  4. Choose the Access policy tab.
  5. Review the Statement section of the access policy. Make sure that the policy allows the correct service to run the SNS:Publish API action.
  6. If your Amazon SNS access policy doesn't allow the correct service to publish events to your topic, then update the policy. In the Details section of your topic page, choose Edit. Expand the Access policy section, and then add the correct access control.
    Note: For examples of Amazon SNS access policies, see Configure Amazon SNS topics for notifications.

Verify that your Amazon SNS topic doesn't have raw message delivery activated

Amazon Q Developer doesn't accept raw message delivery. To verify that your SNS topic doesn't have raw message delivery activated, complete the following steps:

  1. Open the Amazon SNS console.
  2. In the navigation pane, choose Topics, and then select the name of your SNS topic.
  3. In the Details pane, for Raw message delivery, check whether the status is enabled or disabled.
  4. If the status is enabled, then take the following actions: Choose Edit. Clear Enable raw message delivery to turn off raw message delivery. Choose Save changes.

Make sure that you include the required AWS KMS key policy permissions

Note: This check is only applicable for SNS topics with server-side encryption activated.

Your AWS Key Management Service (AWS KMS) key policy must allow the service that sends messages to publish to your encrypted SNS topics.

Your AWS KMS key policy must include the following section:

{  "Sid": "Allow CWE to use the key",  "Effect": "Allow",  "Principal": {    "Service": "service.amazonaws.com"  },  "Action": [    "kms:Decrypt",    "kms:GenerateDataKey"  ],  "Resource": "*"}

Important: Replace events.amazonaws.com with the AWS service principal for the service that publishes your encrypted SNS topics.

Verify that AWS services don't publish messages to your Amazon SNS topic at a rate higher than 10 notifications per second

Amazon Q Developer allows 10 events per second. Amazon Q Developer throttles additional messages when it receives more than 10 events per second.

To check whether you have throttled events, review the CloudWatch metric- EventsThrottled in you CloudWatch Metrics for Amazon Q Developer.

(For Amazon EventBridge) Make sure that EventBridge supports the event notifications that AWS services send to your Amazon Q Developer client destination

Use an EventBridge input transformer to generate custom notifications, and then forward the notifications to an SNS topic. Monitor the SNS topic and deliver notifications to the configured Microsoft Teams, Amazon Chime, or Slack channels with Amazon Q Developer. The Amazon Q Developer custom notifications must follow the event schema format.

For more information, see Supported services for Amazon Q Developer in chat applications.

Related information

Troubleshooting Amazon Q Developer in chat applications

How do I use webhooks to publish Amazon SNS messages to Amazon Chime, Slack, or Microsoft Teams?