https://github.com/hilotter/dynamic-rendering-lambda-edge
build Dynamic Rendering CloudFront
https://github.com/hilotter/dynamic-rendering-lambda-edge
aws aws-cdk cloudfront lambda-edge
Last synced: 4 days ago
JSON representation
build Dynamic Rendering CloudFront
- Host: GitHub
- URL: https://github.com/hilotter/dynamic-rendering-lambda-edge
- Owner: hilotter
- License: mit
- Created: 2020-06-20T12:53:48.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T09:27:50.000Z (over 3 years ago)
- Last Synced: 2024-04-09T22:53:09.005Z (about 2 years ago)
- Topics: aws, aws-cdk, cloudfront, lambda-edge
- Language: TypeScript
- Homepage: https://developers.google.com/search/docs/guides/dynamic-rendering
- Size: 309 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Dynamic Rendering Lambda Edge

- DynamicRenderingApi is [here](https://github.com/hilotter/dynamic-rendering-api)
## Custom settings
```
cp .envrc.sapmle .envrc
export DYNAMIC_RENDERING_API_KEY=API_Key_value_should_be_at_least_20_character
export DYNAMIC_RENDERING_API_URL=https://your-dynamic-rendering-api-url
export S3_BUCKET_NAME=statick_website_bucket_name
# manually create an ACM before deployment
export ACM_CERT_ARN=arn:aws:acm:us-east-1:xxxx
export DOMAIN_NAMES=your-domain,sub.your-domain
```
## CDK deploy
```
yarn
yarn run cdk bootstrap
# dry-run
yarn run cdk diff
# deploy
yarn run deploy
```
## Sample Request
```
# user request
curl https://your-domain'
# crawler request(dynamic rendering)
curl --compressed -H 'User-Agent: Googlebot' 'https://your-domain'
```