Skip to content

Conversation

athewsey
Copy link
Contributor

Issue #, if available: N/A

Rationale:

As we think about expanding the sample towards a more "platform"y approach, I suggest to aim for a monorepo-like structure in which 1/ having multiple agents would make sense, and 2/ individual packages/projects are clearly self-contained.

Since it seems like terraform-provider-aws are gearing up towards launching resources for AgentCore including runtime (presumably after the service goes GA), I also wanted to explore how much of the agent ECR+deployment we could already support from Terraform side.

Description of changes:

This PR proposes to:

  1. Move infra for the cx agent under its cx-agent-backend project folder, instead of the central /infra folder for the shared platform
  2. Push the container build & deployment to ECR within the Terraform deploy process itself via local script provider pattern and the terraform_data resource
    • AFAIK build+deploying images within Terraform is not universally popular - some would argue (e.g. here) that tooling for it should be separated
    • ...But assuming we'd like to deploy downstream infrastructure like the Agent Runtime via TF later, we'd need to implement a proper pipeline to handle the multiple steps - ideally CICD-ified. Until we have something more extensive in place, smushing it into one Terraform deploy seemed like a nice way to keep the solution technologically consistent and faster to set up 🤷‍♂️

👷 It's currently incomplete:

  • Only working with finch at the moment, not figured out how to smartly toggle between finch & docker yet
  • I started towards bringing IAM role infra into the agent project itself, but didn't actually delete it from the main project yet so at the moment it's just duplicating
  • Haven't updated deployment docs or notebook

...But putting out there to get some initial feedback and understand if folks are on board with the general direction


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Initial draft to push agent infrastructure (ECR repository + image,
IAM execution role) within the agent package itself, in preparation
for expanding the repo with multiple example agents.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant