Skip to content

Pulumi components for deploying agentkit-based agents to AWS Bedrock AgentCore.

License

Notifications You must be signed in to change notification settings

agentplexus/agentkit-aws-pulumi

Repository files navigation

AgentKit for AWS Pulumi

Build Status Lint Status Go Report Card Docs License

Pulumi components for deploying agentkit-based agents to AWS Bedrock AgentCore.

Scope

This module provides Pulumi components for AWS. For other IaC tools:

IaC Tool Module Dependencies
AWS CDK agentkit-aws-cdk 21
Pulumi agentkit-aws-pulumi (this module) 340
Terraform agentkit-terraform 0 (HCL only)
CloudFormation agentkit (core) 0 extra

All modules share the same YAML/JSON configuration schema from agentkit/platforms/agentcore/iac/.

Architecture

agentkit/                              # Core library (shared config)
├── platforms/agentcore/iac/
│   ├── config.go                      # Shared config structs
│   ├── loader.go                      # JSON/YAML loading
│   └── cloudformation.go              # Pure CF generator

agentkit-aws-pulumi/                   # Pulumi AWS components (this module)
├── agentcore/
│   ├── stack.go                       # Pulumi resources
│   ├── builder.go                     # Fluent builders
│   └── loader.go                      # Config re-exports

Installation

go get github.com/agentplexus/agentkit-aws-pulumi

Two Deployment Approaches

Approach Code Required Best For
1. Go Constructs Full Go code Type safety, IDE support, complex logic
2. JSON/YAML Config Minimal Go Configuration-driven deployments

1. Go Constructs

Type-safe Go code with full IDE support and compile-time validation.

package main

import (
	"github.com/agentplexus/agentkit-aws-pulumi/agentcore"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// Build agents with fluent API
		research := agentcore.NewAgentBuilder("research", "ghcr.io/example/research:latest").
			WithMemory(512).
			WithTimeout(30).
			Build()

		orchestration := agentcore.NewAgentBuilder("orchestration", "ghcr.io/example/orchestration:latest").
			WithMemory(1024).
			WithTimeout(300).
			AsDefault().
			Build()

		// Build stack
		_, err := agentcore.NewStackBuilder("my-agents").
			WithDescription("My AgentCore deployment").
			WithAgents(research, orchestration).
			WithNewVPC("10.0.0.0/16", 2).
			WithOpik("my-project", "arn:aws:secretsmanager:us-east-1:123456789:secret:opik-key").
			WithTags(map[string]string{"Environment": "production"}).
			Build(ctx)

		return err
	})
}

Deploy:

pulumi up

2. JSON/YAML Config

Minimal Go wrapper that loads configuration from JSON or YAML files.

main.go (never changes):

package main

import (
	"github.com/agentplexus/agentkit-aws-pulumi/agentcore"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := agentcore.NewStackFromFile(ctx, "config.yaml")
		return err
	})
}

config.yaml:

stackName: my-agents
description: My AgentCore deployment

agents:
  - name: research
    containerImage: ghcr.io/example/research:latest
    memoryMB: 512
    timeoutSeconds: 30

  - name: orchestration
    containerImage: ghcr.io/example/orchestration:latest
    memoryMB: 1024
    timeoutSeconds: 300
    isDefault: true

vpc:
  createVPC: true
  vpcCidr: 10.0.0.0/16
  maxAZs: 2

observability:
  provider: opik
  project: my-project
  enableCloudWatchLogs: true

tags:
  Environment: production

Deploy:

pulumi up

Configuration Reference

Configuration uses the same schema as agentkit-aws-cdk. See the agentkit-aws-cdk README for full configuration reference.

Quick Reference

Config Required Description
stackName Yes Stack name
agents Yes List of agents
vpc No VPC config (creates new by default)
observability No Monitoring config
iam No IAM config
tags No Resource tags

Prerequisites

  1. Install Pulumi CLI:

    curl -fsSL https://get.pulumi.com | sh
  2. Configure AWS credentials:

    aws configure
    # or
    export AWS_ACCESS_KEY_ID=xxx
    export AWS_SECRET_ACCESS_KEY=xxx
  3. Initialize Pulumi project:

    pulumi new go --name my-agents

Comparison with agentkit-aws-cdk

Feature agentkit-aws-cdk agentkit-aws-pulumi
Runtime Node.js (jsii) Native Go
State CloudFormation Pulumi Cloud/S3/Local
Dependencies 21 340
Multi-cloud AWS only AWS (this module)
Preview cdk diff pulumi preview

License

MIT

About

Pulumi components for deploying agentkit-based agents to AWS Bedrock AgentCore.

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •  

Languages