You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-3Lines changed: 21 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -115,19 +115,37 @@ aws-vault exec some-profile -- make create-stack
115
115
```
116
116
117
117
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`)
119
125
120
126
```bash
127
+
# Build private AMIs (default - recommended for security)
121
128
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
122
138
```
123
139
124
-
This will boot and image three AWS EC2 instances in your account’s `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`):
126
142
127
143
- Linux (64-bit x86)
128
144
- Linux (64-bit Arm)
129
145
- Windows (64-bit x86)
130
146
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
+
131
149
## Support Policy
132
150
133
151
We provide support for security and bug fixes on the current major release only.
0 commit comments