deploy

command
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 2, 2026 License: MIT Imports: 16 Imported by: 0

README

deploy

Deploy to AWS AgentCore with a single command.

Installation

go install github.com/plexusone/agentkit-aws-cdk/cmd/deploy@latest

Usage

Run from your CDK project directory (where config.json and main.go are located):

deploy [flags]
Flags
Flag Default Description
--region AWS_REGION or us-east-1 AWS region
--env auto-detect Path to .env file for secrets
--prefix stats-agent Secret name prefix
--project auto-detect Project name for ~/.plexusone/projects/{project}/ lookup
--dry-run false Preview changes without deploying
--skip-secrets false Skip pushing secrets to Secrets Manager
--skip-bootstrap false Skip CDK bootstrap
--verbose false Show verbose output
Env File Auto-Detection

If --env is not specified, the tool searches in order:

  1. .env (current directory)
  2. ../.env (parent directory)
  3. ~/.plexusone/projects/{project}/.env (project-specific)
  4. ~/.plexusone/.env (global fallback)

Project is auto-detected from config.json stackName, or can be specified with --project.

Examples
# Full deployment from CDK directory
cd myproject/cdk
deploy

# Preview without making changes
deploy --dry-run

# Deploy to specific region
deploy --region us-west-2

# Skip secrets if already created
deploy --skip-secrets

# Use env file from parent directory
deploy --env ../.env

What It Does

┌─────────────────────────────────────────────────────────────┐
│                         deploy                               │
├─────────────────────────────────────────────────────────────┤
│                                                             │
│  Step 1: Push Secrets                                       │
│  ├── Reads .env file                                        │
│  ├── Categorizes keys (llm, search, config)                 │
│  └── Creates/updates AWS Secrets Manager secrets            │
│                                                             │
│  Step 2: Bootstrap CDK                                      │
│  └── Runs: cdk bootstrap aws://{account}/{region}           │
│                                                             │
│  Step 3: Deploy                                             │
│  ├── Runs: go mod tidy                                      │
│  └── Runs: cdk deploy --require-approval never              │
│                                                             │
└─────────────────────────────────────────────────────────────┘

Prerequisites

  • AWS CLI configured with credentials
  • AWS CDK CLI installed (npm install -g aws-cdk)
  • Go 1.21+
  • A CDK project with config.json and main.go

For config.json templates, see:

Secret Groups

The tool automatically categorizes environment variables:

Secret Variables
{prefix}/llm *_API_KEY for LLM providers (Google, OpenAI, Anthropic, xAI)
{prefix}/search SERPER_API_KEY, SERPAPI_API_KEY
{prefix}/config LLM_PROVIDER, LLM_MODEL, OBSERVABILITY_*, etc.

Output

After successful deployment:

# Get stack outputs (including Gateway URL)
aws cloudformation describe-stacks \
  --stack-name stats-agent-team \
  --query 'Stacks[0].Outputs' \
  --no-cli-pager

Documentation

Overview

deploy orchestrates the full AWS AgentCore deployment process.

It handles:

  1. Pushing secrets from .env to AWS Secrets Manager
  2. Bootstrapping AWS CDK
  3. Deploying the CDK stack

Usage:

deploy [flags]

Examples:

deploy                              # Deploy from current directory
deploy --env ../.env                # Specify env file location
deploy --region us-west-2           # Deploy to specific region
deploy --dry-run                    # Preview without deploying
deploy --skip-secrets               # Skip secrets push (if already created)

Install:

go install github.com/plexusone/agentkit-aws-cdk/cmd/deploy@latest

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL