Skip to content

Commit ab5da8f

Browse files
committed
Update README
1 parent b06e164 commit ab5da8f

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

README.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,19 +115,37 @@ aws-vault exec some-profile -- make create-stack
115115
```
116116

117117
If you need to build your own AMI (because you've changed something in the
118-
`packer` directory), run packer with AWS credentials in your shell environment:
118+
`packer` directory), run packer with AWS credentials in your shell environment.
119+
120+
By default, AMIs are built as private (only accessible to the AWS account that created them) for security. You can control AMI visibility and build location using these variables:
121+
122+
- **`AMI_PUBLIC`** - Set to `true` to make AMIs publicly accessible to all AWS users, or `false` (default) for private AMIs
123+
- **`AMI_USERS`** - Comma-separated list of AWS account IDs that should have access to private AMIs (ignored when `AMI_PUBLIC=true`)
124+
- **`AWS_REGION`** - AWS region where AMIs should be built (defaults to `us-east-1`)
119125

120126
```bash
127+
# Build private AMIs (default - recommended for security)
121128
make packer
129+
130+
# Build public AMIs (available to all AWS users)
131+
make packer AMI_PUBLIC=true
132+
133+
# Build private AMIs with access for specific AWS accounts
134+
make packer AMI_USERS="123456789012,987654321098,555666777888"
135+
136+
# Combined: private AMIs with specific account access in a different region
137+
make packer AMI_PUBLIC=false AMI_USERS="123456789012,987654321098" AWS_REGION=us-west-2
122138
```
123139

124-
This will boot and image three AWS EC2 instances in your accounts `us-east-1`
125-
default VPC:
140+
This will boot and image three AWS EC2 instances in your account's `us-east-1`
141+
default VPC (or the region specified by `AWS_REGION`):
126142

127143
- Linux (64-bit x86)
128144
- Linux (64-bit Arm)
129145
- Windows (64-bit x86)
130146

147+
**Security Note:** Making AMIs public (`AMI_PUBLIC=true`) can expose any secrets accidentally baked into the image. The default private setting helps prevent accidental exposure of sensitive information.
148+
131149
## Support Policy
132150

133151
We provide support for security and bug fixes on the current major release only.

0 commit comments

Comments
 (0)