Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
boise-state-development avatar

Cdk Infrastructure

  • 25 installs
  • 15 repo stars
  • Updated August 3, 2026
  • boise-state-development/agentcore-public-stack

cdk-infrastructure is a Claude Code skill that guides AWS CDK infrastructure development in TypeScript for a Bedrock AgentCore stack.

About

cdk-infrastructure is a Claude Code skill that documents AWS CDK infrastructure development in TypeScript for a Bedrock AgentCore stack. It covers stack organization, a centralized configuration loader, resource naming conventions, cross-stack references via SSM parameters, and patterns for DynamoDB, ECS/Fargate, Lambda, S3, IAM, and networking. A developer uses it when creating or modifying CDK stacks and CloudFormation resources in this monorepo. It also encodes AgentCore-specific constraints like underscore naming and Secrets Manager ARN wildcards.

  • Guides AWS CDK infrastructure development in TypeScript for a Bedrock AgentCore stack
  • Codifies cross-stack references via SSM, resource naming, and deployment ordering
  • Covers DynamoDB, ECS/Fargate, Lambda, S3, IAM, and networking patterns

Cdk Infrastructure by the numbers

  • 25 all-time installs (skills.sh)
  • Ranked #803 of 1,039 Cloud & Infrastructure skills by installs in the Skillselion catalog
  • Data as of Aug 4, 2026 (Skillselion catalog sync)
At a glance

cdk-infrastructure capabilities & compatibility

Capabilities
provision cdk stack · configure dynamodb · configure ecs fargate · manage ssm references · configure iam
Works with
aws
Use cases
devops · ci cd
Runs
Runs locally
Pricing
Free
From the docs

What cdk-infrastructure says it does

AWS CDK infrastructure development with TypeScript. Use when creating or modifying CDK stacks, constructs, DynamoDB tables, ECS/Fargate services, Lambda functions, S3 buckets, networking, IAM roles, o
SKILL.md
`InfrastructureStack` - VPC, ALB, ECS Cluster (always first)
SKILL.md
**AgentCore Names:** Use underscores, not hyphens:
SKILL.md
npx skills add https://github.com/boise-state-development/agentcore-public-stack --skill cdk-infrastructure

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs25
repo stars15
Last updatedAugust 3, 2026
Repositoryboise-state-development/agentcore-public-stack

What it does

Create or modify AWS CDK stacks and CloudFormation resources for a Bedrock AgentCore deployment.

Who is it for?

Developers creating or modifying CDK stacks, constructs, and CloudFormation resources in this AgentCore monorepo

Skip if: Hardcoding secrets or using hyphens in AgentCore resource names, both of which the skill forbids

When should I use this skill?

creating or modifying CDK stacks, DynamoDB tables, ECS/Fargate services, Lambda functions, S3 buckets, or IAM roles

What you get

CDK stacks follow the config system, deploy in the right order, and share resources via SSM without hardcoded secrets.

  • new or modified CDK stacks
  • cross-stack SSM references
  • AgentCore-compliant resource configuration

By the numbers

  • 9 reference files (agentcore, configuration, dynamodb, ecs-fargate, iam, lambda, networking, s3)
  • SSM categories: network, quota, cost-tracking, auth, frontend, gateway

Files

SKILL.mdMarkdownGitHub ↗

AWS CDK Infrastructure Best Practices

TypeScript

  • Use strict type checking
  • Import from aws-cdk-lib and constructs
  • Use L2 constructs when available, L1 (Cfn*) when necessary

Stack Organization

infrastructure/
├── bin/infrastructure.ts          # App entrypoint
├── lib/
│   ├── config.ts                  # Configuration loader
│   ├── infrastructure-stack.ts    # Network resources (deploy first)
│   ├── app-api-stack.ts           # Backend services
│   └── my-new-stack.ts            # New stacks go here
└── cdk.context.json               # Configuration

Deployment Order: 1. InfrastructureStack - VPC, ALB, ECS Cluster (always first) 2. Other stacks import network resources via SSM

Configuration

Use the centralized config system:

import { loadConfig, getResourceName, getStackEnv, applyStandardTags } from './config';

export class MyStack extends cdk.Stack {
  constructor(scope: Construct, id: string, props?: cdk.StackProps) {
    const config = loadConfig(scope);
    super(scope, id, {
      ...props,
      env: getStackEnv(config),
      stackName: getResourceName(config, 'my-stack'),
    });
    applyStandardTags(this, config);
  }
}

For configuration patterns, see references/configuration.md.

Naming Conventions

Resource Names: Use getResourceName():

getResourceName(config, 'user-quotas')  // "bsu-agentcore-user-quotas"

SSM Parameters: Hierarchical naming:

/{projectPrefix}/{category}/{resource-type}

Categories: /network/, /quota/, /cost-tracking/, /auth/, /frontend/, /gateway/

Cross-Stack References

Export:

new ssm.StringParameter(this, 'VpcIdParam', {
  parameterName: `/${config.projectPrefix}/network/vpc-id`,
  stringValue: vpc.vpcId,
});

Import:

const vpcId = ssm.StringParameter.valueForStringParameter(
  this,
  `/${config.projectPrefix}/network/vpc-id`
);

DynamoDB Tables

  • Always use PK + SK for flexibility
  • Use PAY_PER_REQUEST billing
  • Enable point-in-time recovery
  • Environment-based removal policy

For table patterns, see references/dynamodb.md.

ECS/Fargate

  • Import cluster from SSM
  • Health checks mandatory
  • Auto-scaling with CPU/memory targets
  • Circuit breaker for rollback

For service patterns, see references/ecs-fargate.md.

Lambda

  • Use ARM64 architecture (cost optimization)
  • Role with least privilege
  • Secrets Manager access requires wildcard suffix

For Lambda patterns, see references/lambda.md.

S3 Buckets

  • Block public access
  • Enable versioning
  • Lifecycle rules for cost optimization
  • Include account ID for global uniqueness

For bucket patterns, see references/s3.md.

Security

  • Separate security groups for ALB and ECS
  • Private subnets for services
  • IAM roles with SIDs for clarity
  • Never hardcode secrets

For IAM patterns, see references/iam.md.

Important Constraints

AgentCore Names: Use underscores, not hyphens:

name: getResourceName(config, 'memory').replace(/-/g, '_')

Secrets Manager ARN: Include wildcard for random suffix:

resources: [`${secret.secretArn}*`]

Environment Removal Policy:

removalPolicy: config.environment === 'prod'
  ? cdk.RemovalPolicy.RETAIN
  : cdk.RemovalPolicy.DESTROY

CDK Commands

cd infrastructure
npm install           # Install dependencies
npx cdk synth         # Synthesize CloudFormation
npx cdk deploy --all  # Deploy all stacks
npx cdk diff          # Preview changes

Related skills

FAQ

What is the CDK deployment order in this repo?

InfrastructureStack (VPC, ALB, ECS Cluster) always deploys first, then other stacks import network resources via SSM.

What naming constraint applies to AgentCore resources?

AgentCore names must use underscores, not hyphens, so resource names are transformed with replace(/-/g, '_').

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.