Guide: AgentCore POC Deployment via Terraform
AI Agents are powerful software systems that leverage the power of Artificial Intelligence and the flexibility and scalability of software systems. They have become the system of choice for many companies for improving efficiency and creating new processes and opportunities. Their versatile nature makes them suitable for solving a broad range of tasks across many verticals.
Tech 42 wants to make it easier for you to build a customized agent. Last month we released a free AI Agent starter pack on Marketplace. This consists of an AWS Strands Agent with basic functionality. With it, we released a complete CloudFormation deployment guide that includes video and written instructions to walk you through the process. Since Terraform is our Infra-As-Code of choice, we wanted to release another guide to deploying our AgentCore Starter Pack for those who prefer Terraform.
This is a foundational Terraform stack that can be deployed with a few commands. It consists of:
- AgentCore Runtime Agent
- AgentCore Short-term memory
- Agent Bedrock Guardrail
- Agent Observability through ADOT or LangFuse
- A local FrontEnd to test the agent
- A notebook with examples on how to use the Agent
Let’s walk through it together.
Step 1: Download or clone the repository
From there, follow the steps in the README file.
Step 2: Subscribe to Tech 42’s Free AgentCore Starter Pack in AWS Marketplace
Go to our AWS Marketplace offering and hit “Subscribe.”
Step 3: Get the container URI
- Sign into your AWS account.
- Go to “AWS Marketplace” in your AWS account console.
- Go to “Manage subscriptions” on the left.
- Find the subscription by searching for “AI Agent Starter Pack”.
- Click on "Launch" under Actions.
- Setup via “Amazon Bedrock AgentCore”
- Click on "Pull container image"
- Copy the container image URI. Note: If you prefer LangFuse for observability, choose a version with “langfuse” in the version tag.
You can follow through step Step 2.1.a in our CloufFormation deployment guide if needed.
Step 4: Edit the Terraform stack
- Go back to the cloned github repo.
- Open the file ./terraform/terraform.tfvars
- Fill in the required information:
- Paste the Container URI from step 3 in “container_image”
- Fill in a project_name
- Edit the system prompt
- Optional based on your observability needs: Add LangFuse observability information and set disable_adot_observability to true
Step 5: Deploy the stack
Step 6: Deploy the front end locally for testing
Open http://localhost:8501 in your browser and chat with the agent!
This stack is meant to be a starter pack to help you in deploying your own agents. Though simple, this stack can be extended to include browser integration, code interpreter, long-term memory, reasoning and all that AWS AgentCore can offer. Take a look at the agentcore_tutroial notebook in the repo to find example code to integrate the agent into your application.
Tech 42 aims to empower clients to be as independent as possible on their agentic journey, so we’ve made these. The tools are free. If you need advice on how to extend your agent or how to productionize it, contact us at support@tech42consulting.com.
And if you’re interested in seeing more examples of what it costs to run an AI agent with AgentCore, we have a couple of pre-built examples on our AgentCore Cost Calculator, or you can customize to your own use case.
[[agentcore-accelerate-1]]
