Blog

Migrating AWS Lex to Bedrock AgentCore: A Hackathon Journey

Written by Nathan Wilkerson, VP of Engineering | Oct 23, 2025 8:01:11 PM

Metal Toad recently engaged in our 2nd hackathon of the year. This hackathon’s theme was application transformation/modernization with generative AI. The goal was to take an existing application and use Generative AI to move it to another technology or update its version in some way. 

For those that don’t know, a hackathon is when we break into teams to work on a timeboxed project and see what you can do quickly. 

My Team decided that we wanted to migrate our internal Slack Chat bot ,Toadbot off of AWS Lex/Lambda to Amazon Bedrock AgentCore. This would allow us to learn the new AWS service, practice transforming an application, and fix some bugs we’ve had in our chatbot.

Based on a few previous tests I knew that Amazon Q Developer didn’t know about AgentCore. This is a known weakness of LLMs that might not have knowledge of things released after it was trained. To compensate we download an AWS Lab repo from github. Next we  exported the AWS Lex Config and our Lambda source code. Finally we crafted the below prompt. 

In the Original Directory you will find an exported AWS Lex config for a chat bot that connects to Slack. You will also find a lambda that it uses.

An example is a download lab for AWS Bedrock AgentCore using Strands. AgentCore is new enough that you may not know about it and will need this directory. 

I would like to rewrite the original chat bot to run using agentcore. 

Outline a plan for the migration. Include how to update the connection with Slack. After we review the plan we'll execute it step by step. 

We will want to change the below functionality.

  1. Be able to give shoutouts to multiple people. 
  2. Improve error handling
  3. Not allow the bot to respond or trigger when a comment is added in a slack thread. 
  4. Be able to add Easter Egg functions based on different emojis being applied. 

Keep records of the recommendations and changes in a markdown file called toadbot_migration.md

This allowed Amazon Q Developer to generate an execution plan for Toadbot. The plan looked good so we went through it step by step. The code generated was good at an architectural level but we needed to do some tweaks and refinement around some of the features. These were a combination of Lack of knowledge of AgentCore and poor instructions in the initial response. 

At the end of 2 days we were able to get it fully migrated and add the new functionality. Some problems we ran into:

  1. Getting AgentCore Identity provider to work with Slack was a problem and we fell back to traditional API access to complete during the hackathon. 
  2. Amazon Q Developer could make some bad decisions if you weren’t watching carefully.
  3. Amazon AgentCore would deploy in 2-3 minutes but took up to 10 minutes to be ready to get requests. So we got the container working locally to speed up development. 

Over the 2 day hackathon everyone on the team learned new stuff about AgentCore or transformation. My favorite thing however was getting a member of our HR team and a project manager to use AgenticAI to add an easter egg feature. It actually took longer to get a development environment configured then it did for them to create a prompt that created functional code. 

Overall I would call this hackathon a huge success. Both because we were able to achieve the original goal and we learned a lot about Agentic Development and new Bedrock AgentCore.