Skip to content

Commit a9e7375

Browse files
committed
Add docs for when to deploy fuction, re: #2
1 parent 61fd238 commit a9e7375

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,21 @@ Since we can't use the "custom error response", and we're implementing it oursel
8383

8484
If you're not editing an IAM policy specifically, the UI/UX checkbox for this in the S3 interface is, for the bucket, under the "Permissions" tab, "List Objects"
8585

86-
#### 9. Deployment
86+
#### 9. Deployment (of this Lambda@Edge function)
8787

8888
1. Use an AWS user (in your ~/.aws/credentials) with any of the following permissions: (full root, or see [serverless discussion](https://github.com/serverless/serverless/issues/1439) or you can use the following policies, which are _almost_ root: [AWSLambdaFullAccess, AwsElasticBeanstalkFullAccess])
8989
2. Set the following environment variables when deploying: CLOUDFRONT_DISTRIBUTION_ID (or just edit the [Makefile](Makefile))
9090
3. `$ make deploy`
9191

92-
#### 10. You're done!
92+
#### 10. Deployment (of your single-page application)
93+
94+
1. sync/push the files to s3
95+
2. invalidate CloudFront
96+
3. you're done (no need to deploy the Lambda@Edge function)
97+
98+
caveat: note that prerender.cloud has a 5-minute server cache that you can disable, see `disableServerCache` in [handler.js](/handler.js)
99+
100+
#### 11. You're done!
93101

94102
Visit a URL associated with your CloudFront distribution. It will take a few seconds for the first request (because it is pre-rendered on the first request). If for some reason the pre-render request fails or times out, the non-pre-rendered request will be cached.
95103

0 commit comments

Comments
 (0)