| 1 | --- |
| 2 | title: aws |
| 3 | description: AWS provider commands — bootstrap the per-account assets bucket that Lambda deployments rely on. |
| 4 | --- |
| 5 | |
| 6 | import Terminal from "../../../components/Terminal.astro"; |
| 7 | |
| 8 | ```sh |
| 9 | alchemy provider aws <subcommand> [options] |
| 10 | ``` |
| 11 | |
| 12 | Cloud-provider commands for AWS — managing the per-account |
| 13 | infrastructure that Alchemy itself relies on. |
| 14 | |
| 15 | ## `provider aws bootstrap` |
| 16 | |
| 17 | ```sh |
| 18 | alchemy provider aws bootstrap [options] |
| 19 | ``` |
| 20 | |
| 21 | Set up the AWS assets bucket required for deploying Lambda functions |
| 22 | and other AWS resources that need artifact storage. |
| 23 | |
| 24 | <Terminal content={`[g]✓[/g] Created assets bucket: alchemy-assets-123456789012-us-west-2-an`} /> |
| 25 | |
| 26 | Re-running is a no-op: |
| 27 | |
| 28 | <Terminal content={`[g]✓[/g] Assets bucket already exists: alchemy-assets-123456789012-us-west-2-an`} /> |
| 29 | |
| 30 | | Option | Description | |
| 31 | | ---------------------- | -------------------------------------------------------------------------------- | |
| 32 | | `--aws-profile <name>` | AWS CLI/SSO profile to use for credentials (default: `default`) | |
| 33 | | `--region <region>` | AWS region to bootstrap. Defaults to the SSO profile's region, then `us-east-1`. | |
| 34 | | `--env-file <path>` | Load environment variables from a file | |
| 35 | |
| 36 | Bootstrap requires an AWS **SSO profile** with `sso_account_id` set — |
| 37 | it fails with a clear error if the profile is missing one. |
| 38 | |
| 39 | Logs are written to `.alchemy/log/bootstrap.txt`. |
| 40 | |
| 41 | ## `provider aws teardown` |
| 42 | |
| 43 | ```sh |
| 44 | alchemy provider aws teardown [options] |
| 45 | ``` |
| 46 | |
| 47 | Removes every bootstrap bucket in the selected region and reports the |
| 48 | count. It accepts the same profile, region, and environment-file options as |
| 49 | `bootstrap`, plus `--yes` to skip confirmation. |
| 50 | |
| 51 | <Terminal content={`[g]✓[/g] Destroyed 1 bootstrap bucket(s): alchemy-assets-123456789012-us-west-2-an`} /> |
| 52 | |
| 53 | If there's nothing to remove: |
| 54 | |
| 55 | <Terminal content={`[g]✓[/g] No bootstrap buckets found to destroy`} /> |
| 56 | |
| 57 | ```sh |
| 58 | # Bootstrap with the default profile |
| 59 | alchemy provider aws bootstrap |
| 60 | |
| 61 | # Bootstrap a specific region and profile |
| 62 | alchemy provider aws bootstrap --aws-profile prod --region us-west-2 |
| 63 | |
| 64 | # Remove bootstrap resources |
| 65 | alchemy provider aws teardown |
| 66 | ``` |
| 67 | |
| 68 | ## Where next |
| 69 | |
| 70 | - [cloudflare](/cli/cloudflare) — provider commands for Cloudflare |
| 71 | - [AWS](/aws) — the AWS provider hub |