From nx-plugin-for-aws
Scaffolds Nx workspaces and generates TypeScript/Python projects, APIs, React websites, Lambda functions, and AWS CDK/Terraform infrastructure using @aws/nx-plugin generators. Use for cloud-native AWS app development.
npx claudepluginhub awslabs/nx-plugin-for-aws --plugin nx-plugin-for-awsThis skill uses the workspace's default tool permissions.
The Nx Plugin for AWS (`@aws/nx-plugin`) is a collection of generators that help you rapidly scaffold and build cloud-native applications on AWS. It provides end-to-end code generation from application code to CDK/Terraform infrastructure, all following AWS best practices.
Develops AWS infrastructure as code with CDK in TypeScript/Python. Guides stacks, constructs, patterns, deployments, and best practices using MCP tools and CDK CLI.
Builds AWS infrastructure with CDK in Python following AWS Well-Architected framework best practices. Use for AWS architecture, CDK Python, Well-Architected, or cloud infrastructure design.
Deploys applications to AWS: analyzes codebases for frameworks/databases, recommends services, estimates costs, generates secure IaC with CDK/CloudFormation/Terraform, and deploys.
Share bugs, ideas, or general feedback.
The Nx Plugin for AWS (@aws/nx-plugin) is a collection of generators that help you rapidly scaffold and build cloud-native applications on AWS. It provides end-to-end code generation from application code to CDK/Terraform infrastructure, all following AWS best practices.
This power gives AI assistants guided access to the MCP server so they can help you create workspaces, discover generators, and scaffold projects interactively.
Key capabilities:
node --versionpnpm --version, yarn --version, bun --version or npm --versionuv python install 3.14.0uv python list --only-installedcreate_workspace_command toollist_generators and generator_guideTo create a new workspace and scaffold a React website with a tRPC API:
# Create workspace (pass `.` as the name to create in the current empty directory)
pnpm create @aws/nx-workspace my-app --no-interactive
# Generate a tRPC API
pnpm nx g @aws/nx-plugin:ts#trpc-api --no-interactive --name=my-api
# Generate a React website
pnpm nx g @aws/nx-plugin:ts#react-website --no-interactive --name=my-website
# Connect the website to the API
pnpm nx g @aws/nx-plugin:connection --no-interactive --sourceProject=my-website --targetProject=my-api
# Generate CDK infrastructure
pnpm nx g @aws/nx-plugin:ts#infra --no-interactive --name=infra
Always prompt the user for what name they want to use when executing generators if a --name is a required argument. DO NOT ASSUME THE NAME.
Use the create_workspace_command tool with your preferred package manager. This generates the full command to create an Nx workspace pre-configured with the AWS plugin.
pnpm create @aws/nx-workspace my-app --no-interactive
If you are already inside an empty directory intended for this project, pass . as the workspace name to create the workspace in the current directory:
pnpm create @aws/nx-workspace . --no-interactive
Be sure to ask the user what their preferred project name is, unless already within an empty directory intended for the project.
Use the list_generators tool to see all available generators and their parameters. This returns the full list with descriptions and example commands.
Use the generator_guide tool with a specific generator name to get in-depth documentation including:
A typical full-stack app involves:
ts#trpc-api, ts#smithy-api, or py#fast-api)ts#react-website)connection)ts#infra)ts#react-website#auth)Add capabilities to existing projects:
ts#lambda-function / py#lambda-function — Add Lambda functionsts#mcp-server / py#mcp-server — Add MCP serversts#strands-agent / py#strands-agent — Add Strands AI agentsts#nx-generator — Add custom Nx generators| Generator | Description |
|---|---|
connection | Integrates a source project with a target project |
license | Add LICENSE files and configure source code licence headers |
py#fast-api | Generates a FastAPI Python project |
py#lambda-function | Adds a lambda function to a python project |
py#mcp-server | Generate a Python Model Context Protocol (MCP) server for providing context to Large Language Models |
py#project | Generates a Python project |
py#strands-agent | Add a Strands Agent to a Python project |
terraform#project | Generates a Terraform project |
ts#astro-docs | Generates an Astro + Starlight documentation site with localisation, snippets, blog, and optional automated documentation translation |
ts#infra | Generates a cdk application |
ts#lambda-function | Generate a TypeScript lambda function |
ts#mcp-server | Generate a TypeScript Model Context Protocol (MCP) server for providing context to Large Language Models |
ts#nx-generator | Generator for adding an Nx Generator to an existing TypeScript project |
ts#nx-plugin | Generate an Nx Plugin of your own! Build custom generators automatically made available for AI vibe-coding via MCP |
ts#project | Generates a TypeScript project |
ts#react-website | Generates a React static website |
ts#react-website#auth | Adds auth to an existing React website |
ts#smithy-api | Create an API using Smithy and the Smithy TypeScript Server SDK |
ts#strands-agent | Add a Strands Agent to a TypeScript project |
ts#trpc-api | creates a trpc backend |
ts#rdb | Create a relational database project |
--no-interactive flag when running generators programmatically@my-scope/my-project) when referencing projectsnx sync after adding dependencies between TypeScript projectsnx reset to reset the Nx daemon when unexpected issues arisenx show projects to verify what was creatednx run-many --target lint --configuration=fix --allpackages/ directoryWhen the user wants a full workspace created in one go, you can chain generators to minimize tool calls:
Workspace creation pass --no-interactive to avoid interactive prompts
pnpm create @aws/nx-workspace my-app --iacProvider=CDK --no-interactive
Chain generators with && in a single Bash call after workspace creation, for example:
cd my-app && \
pnpm nx g @aws/nx-plugin:ts#trpc-api --no-interactive --name=my-app-api --auth=IAM && \
pnpm nx g @aws/nx-plugin:ts#react-website --no-interactive --name=my-app-website --uxProvider=Shadcn && \
pnpm nx g @aws/nx-plugin:ts#react-website#auth --no-interactive --project=@my-app/my-app-website --cognitoDomain=my-app-auth && \
pnpm nx g @aws/nx-plugin:connection --no-interactive --sourceProject=@my-app/my-app-website --targetProject=@my-app/my-app-api && \
pnpm nx g @aws/nx-plugin:ts#infra --no-interactive --name=infra && \
pnpm nx sync && \
pnpm lint && \
pnpm build
Use a timeout of 300000ms (5 minutes) for workspace creation (downloads dependencies).
nx sync is required before building — generators modify TypeScript project references.
Problem: MCP server won't start or connect Solution:
node --version && npm --versionnpx -y @aws/nx-plugin-mcpENOENT npx, use the full path: replace npx with the output of which npxProblem: Generator command fails with errors Solution:
@aws/nx-plugin is installed: look for it in package.jsonnx reset to clear the Nx daemon cache--verbose flag for more detailsProblem: Import errors after adding project dependencies Solution:
nx sync to update TypeScript project referencestsconfig.base.json for correct path aliases: prefix (e.g. :my-scope/my-lib)Problem: Python imports not resolving Solution:
nx run <project>:add <dependency> to add dependenciesuv.lock is up to datepyproject.toml for correct dependency declarationsNo additional configuration required — the MCP server works out of the box via npx.
MCP Server: nx-plugin-for-aws
Package: @aws/nx-plugin
Documentation: https://awslabs.github.io/nx-plugin-for-aws