# AWS ec2 sandbox

> AWS ec2 sandbox is an open-source agent skill for cloud and infrastructure. Lets an agent run shell commands on AWS EC2 sandboxes managed via Systems Manager. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/computesdk/computesdk/tree/main/skills/aws-ec2-sandbox
- **Repository:** https://github.com/computesdk/computesdk
- **GitHub stars:** 305
- **License:** MIT
- **Skill name:** aws-ec2-sandbox
- **Collection:** https://github.com/computesdk/computesdk
- **Categories:** [cloud and infrastructure](https://ai-powered.com/categories/cloud-and-infrastructure)
- **Listing updated:** 2026-12-01

## About

This skill guides an AI coding agent to execute commands inside AWS EC2 instances that are managed through Systems Manager, using ComputeSDK as the entry point. It covers two routes: the hosted Sandbox Router, where the agent can run a one-off command through the ComputeSDK CLI and select the provider, optionally requiring managed or bring-your-own-key account mode, and a direct SDK route using the @computesdk/aws package.

For the direct route, the skill walks through installing the computesdk and @computesdk/aws packages, importing the EC2 provider factory, creating an instance, running a command with options such as environment variables, working directory and timeout, and destroying the sandbox afterward. Prerequisites, credentials and limitations are left to the adapter README, which the skill points to.

Using it requires an AWS account with suitable EC2 and Systems Manager setup, a launch template for the direct SDK example, and either a ComputeSDK organization with a connected key or AWS credentials configured locally. The skill refers to companion skills for the full Router TypeScript, REST and MCP examples and for the general SDK workflow.

## When your agent uses it

> Run commands on AWS EC2 instances managed through Systems Manager. Use for AWS EC2 on the ComputeSDK Sandbox Router or @computesdk/aws/ec2 in a direct SDK integration.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/computesdk/computesdk/tree/HEAD/skills/aws-ec2-sandbox)
- [License: MIT](https://github.com/computesdk/computesdk/tree/HEAD/skills/aws-ec2-sandbox)

## Features

- **One-off command runs:** Runs a single shell command on an EC2-backed sandbox through the ComputeSDK CLI and tears it down afterward.
- **Hosted provider selection:** Chooses AWS EC2 on the Sandbox Router and checks available offers and connected keys before running.
- **Direct SDK integration:** Shows how to install the AWS adapter and create EC2 instances from TypeScript code.
- **Command execution options:** Covers passing environment variables, working directory and timeout when running commands in the sandbox.
- **Sandbox lifecycle cleanup:** Reminds the agent to destroy the sandbox once the workload is finished.
- **Account mode control:** Supports requiring managed or bring-your-own-key account mode for the hosted route.

## Good for

- Run a quick shell command on a temporary AWS EC2 machine
- Check which sandbox providers and connected keys are available
- Create an EC2 sandbox from a launch template and execute a Node script
- Run a build or test workload in an isolated EC2 instance and then clean up

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/aws-ec2-sandbox` to use it in all your projects:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/computesdk/computesdk.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/aws-ec2-sandbox &&
cp -R "$tmp/skills/aws-ec2-sandbox" ~/.claude/skills/aws-ec2-sandbox &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/aws-ec2-sandbox` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/aws-ec2-sandbox` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/computesdk/computesdk.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/aws-ec2-sandbox &&
cp -R "$tmp/skills/aws-ec2-sandbox" ~/.agents/skills/aws-ec2-sandbox &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/aws-ec2-sandbox` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/aws-ec2-sandbox` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/computesdk/computesdk.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/aws-ec2-sandbox &&
cp -R "$tmp/skills/aws-ec2-sandbox" ~/.cursor/skills/aws-ec2-sandbox &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/aws-ec2-sandbox` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/computesdk/computesdk.git --path skills/aws-ec2-sandbox
```

Or copy the folder to `~/.gemini/skills/aws-ec2-sandbox` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/aws-ec2-sandbox`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/computesdk/computesdk.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/aws-ec2-sandbox &&
cp -R "$tmp/skills/aws-ec2-sandbox" ~/.copilot/skills/aws-ec2-sandbox &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/aws-ec2-sandbox` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/computesdk/computesdk.git
```

Then copy `computesdk/skills/aws-ec2-sandbox` into your agent's skills folder as `aws-ec2-sandbox`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does the skill need to run?

For the direct SDK route it needs the computesdk and @computesdk/aws packages, plus the prerequisites and credentials described in the adapter README. For the hosted route it uses the ComputeSDK CLI and a connected key for the organization.

### How does the agent select this provider on the hosted router?

It passes aws-ec2 as the provider with the CLI run command, or sets providerOrder to aws-ec2 in TypeScript calls to compute.instances.create().

### Does the direct example need a launch template?

The example creates instances with a named launch template and takes the region from AWS_REGION. The adapter README covers configuration.

### Does the skill include scripts or extra files?

No. The skill is a single SKILL.md file that points to external READMEs and companion skills for more detail.

### How do I install AWS ec2 sandbox in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/aws-ec2-sandbox to use it in all your projects, or to .claude/skills/aws-ec2-sandbox in one project.

### Does AWS ec2 sandbox run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use AWS ec2 sandbox?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to AWS ec2 sandbox?

The closest alternatives to AWS ec2 sandbox are Codesandbox sandbox, Agentcore sandbox, Sandbox router, Sandbox0 sandbox and Cloud run sandbox.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Codesandbox sandbox](https://ai-powered.com/skills/codesandbox-sandbox): Codesandbox sandbox is an open-source agent skill for cloud and infrastructure.
- [Agentcore sandbox](https://ai-powered.com/skills/agentcore-sandbox): Agentcore sandbox is an open-source agent skill for cloud and infrastructure.
- [Sandbox router](https://ai-powered.com/skills/sandbox-router): Sandbox router is an open-source agent skill for cloud and infrastructure.
- [Sandbox0 sandbox](https://ai-powered.com/skills/sandbox0-sandbox): Sandbox0 sandbox is an open-source agent skill for cloud and infrastructure.
- [Cloud run sandbox](https://ai-powered.com/skills/cloud-run-sandbox): Cloud run sandbox is an open-source agent skill for cloud and infrastructure.
- [Lightning sandbox](https://ai-powered.com/skills/lightning-sandbox): Lightning sandbox is an open-source agent skill for cloud and infrastructure.
- [Namespace sandbox](https://ai-powered.com/skills/namespace-sandbox): Namespace sandbox is an open-source agent skill for cloud and infrastructure.
- [Sprites sandbox](https://ai-powered.com/skills/sprites-sandbox): Sprites sandbox is an open-source agent skill for cloud and infrastructure.

---
Source: https://ai-powered.com/skills/aws-ec2-sandbox
