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
+38-6Lines changed: 38 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -229,11 +229,17 @@ The following properties are expected to be present on the deployment `context`
229
229
230
230
## Configuring Amazon S3
231
231
232
-
### Minimum S3 Permissions
232
+
### Deployment user and S3 permissions
233
233
234
-
Ensure you have the minimum required permissions configured for the user (accessKeyId). A bare minimum policy should have the following permissions:
234
+
The environment in which the `ember deploy` command is run needs to have an AWS account with a policy that allows writing to the S3 bucket.
235
235
236
-
```
236
+
It's common for a development machine to be set up with the developer's personal AWS credentials, which likely have the ability to administer the entire AWS account. This will allow deployment to work from the development machine, but it is not a good idea to copy your personal credentials to production.
237
+
238
+
The best way to set up non-development deployment is to create an IAM user to be the "deployer", and [place its security credentials][9] (Access Key ID and Access Secret) in the environment on the machine or CI environment where deployment takes place. (The easiest way to do this in CI is to set environment variables `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`.)
239
+
240
+
A bare minimum policy should have the following permissions:
241
+
242
+
```js
237
243
{
238
244
"Statement": [
239
245
{
@@ -245,20 +251,45 @@ Ensure you have the minimum required permissions configured for the user (access
245
251
"s3:PutObjectACL"
246
252
],
247
253
"Resource": [
248
-
"arn:aws:s3:::<your-s3-bucket-name>/*"
254
+
"arn:aws:s3:::your-s3-bucket-name/*"
249
255
]
250
256
}
251
257
]
252
258
}
259
+
```
260
+
261
+
Replace `your-s3-bucket-name` with the name of the actual bucket you are deploying to.
253
262
263
+
Also, remember that "PutObject" permission will effectively overwrite any existing files with the same name unless you use a fingerprinting or a manifest plugin.
264
+
265
+
### S3 policy for public access
266
+
267
+
If you want the contents of the S3 bucket to be accessible to the world, the following policy can be placed directly in the S3 bucket policy:
268
+
269
+
```js
270
+
{
271
+
"Statement": [
272
+
{
273
+
"Sid":"Stmt1EmberCLIS3AccessPolicy",
274
+
"Effect":"Allow",
275
+
"Action": [
276
+
"s3:GetObject",
277
+
],
278
+
"Resource": [
279
+
"arn:aws:s3:::your-s3-bucket-name/*"
280
+
]
281
+
}
282
+
]
283
+
}
254
284
```
255
-
Replace <your-s3-bucket-name> with the name of the actual bucket you are deploying to. Also, remember that "PutObject" permission will effectively overwrite any existing files with the same name unless you use a fingerprinting or a manifest plugin.
285
+
286
+
Replace `your-s3-bucket-name` with the name of the actual bucket you are deploying to.
256
287
257
288
### Sample CORS configuration
258
289
259
290
To properly serve certain assets (i.e. webfonts) a basic CORS configuration is needed
0 commit comments