AWS Machine Learning Blog→ original

AWS showed how to connect Amazon Bedrock AgentCore to Slack via CDK and Lambda

AWS broke down a practical integration of Amazon Bedrock AgentCore with Slack. The example uses AWS CDK, three specialized Lambda functions, and an SQS queue…

AI-processed from AWS Machine Learning Blog; edited by Hamidun News
AWS showed how to connect Amazon Bedrock AgentCore to Slack via CDK and Lambda
Source: AWS Machine Learning Blog. Collage: Hamidun News.
◐ Listen to article

AWS showed how to embed Amazon Bedrock AgentCore directly into Slack without writing integration from scratch for each new agent. The company breaks down a ready-made AWS CDK template that covers webhook verification, asynchronous message processing, and conversation context preservation.

How the scheme works

The solution is divided into two parts. The first is the infrastructure layer between Slack and the agent: API Gateway receives webhooks, AWS Lambda processes events, Secrets Manager stores tokens, and Amazon SQS helps separate request reception from actual processing. The second is the agent itself in Amazon Bedrock AgentCore Runtime. In the demonstration, this is a weather bot built on Strands Agents SDK, but AWS emphasizes that this layer can be replaced with any business logic without reworking the Slack integration.

Deployment happens through three CDK stacks. One builds and publishes the agent's container image, the second spins up Runtime, Gateway, and Memory, the third creates Slack infrastructure with API Gateway and Lambda functions. According to AWS, a full deployment takes approximately 10–15 minutes. After that, you just need to plug the webhook URL into Slack app settings, enable event subscriptions, and reinstall the app in your workspace. This is not a diagram-level concept, but a working template that can be repeated almost step-by-step.

Why three Lambdas

The key issue here is not the model, but Slack's limitations. The platform expects a quick response to an incoming webhook and gives about three seconds for it. If the agent needs to pull up conversation history, call tools, and wait for the model's response, this window is often not enough. That's why AWS moves processing to an asynchronous scheme through a queue and divides responsibilities among three separate functions. This approach reduces the risk of timeouts and makes integration behavior more predictable as load grows.

  • Verification Lambda checks Slack's signature, retrieves secrets from Secrets Manager, and immediately returns 200 OK.
  • SQS Integration Lambda filters events, ignores bot messages, sends the user an intermediate response, and puts the task in a FIFO queue.
  • Agent Integration Lambda receives the message from the queue, calls AgentCore Runtime, and updates the thread with the final answer.

As a result, the user first sees a short service message like "Processing your request…", and then it is replaced with the agent's final answer. This is an important detail: UX remains fast, even though the main work happens in the background. At the same time, this pattern protects the system from loops, because the intermediate layer can drop messages from the bot itself. For corporate chats, this is especially useful: the integration doesn't turn into a fragile webhook script that breaks at the first more complex scenario.

Memory and sessions

AWS separately shows a neat way to store conversation context. Instead of an external state store with its own keys, the session is built directly from Slack's structure: the timestamp of the thread becomes the identifier, and actor_id is the user's ID. All responses within one branch automatically fall into one memory session, and adjacent threads remain isolated. This simplifies the architecture and removes an extra synchronization layer that usually has to be written when integrating agents into messengers and helpdesk interfaces.

Inside Runtime, AgentCore Memory is responsible for memory, tool access goes through AgentCore Gateway, and tool calls are executed via MCP. In the example, the Amazon Nova Pro model decides when an additional tool call is needed and continues the response with its result. AWS separately notes that the integration layer can be reused without changes: it's enough to replace weather tools with your own — knowledge base search, internal regulations, CRM actions, or service operations. If you need access on behalf of a specific employee, AgentCore also supports custom authorization scenarios through corporate IdP.

What this means

For teams looking to put an AI agent in Slack, AWS essentially provides a reference architecture instead of a collection of scattered advice. The key in it is not just Bedrock, but a reusable framework: secure event verification, bypassing Slack's timeout, and proper conversation memory. This reduces time to launch new agents and removes part of routine infrastructure work.

ZK
Hamidun News
AI news without noise. Daily editorial selection from 400+ sources. A product by Zhemal Khamidun, Head of AI at Alpina Digital.

Want to stop reading about AI and start using it?

AI News is a curated feed of AI/tech news. Hamidun Academy teaches you to use AI systematically in your work.

What do you think?
Loading comments…