$ yarn # npm i
$ yarn dev # npm run dev
$ yarn build # npm run build
$ yarn serve # npm run serve
- Install Pulumi.
- Install AWS CLI and configure your credentials.
- Configure the
Pulumi.prod.yml
file.- aws:region
The AWS region to create the resources. - site:dir
The site files directory, (in case of this project, the site files are built inpublic
folder). - site:name
The site name for creating the resources (it needs to be in slug format). - site:log-requests
Set to true if you want to save the CloudFront request logs (it will create a S3 Bucket for it).
- aws:region
- Build your site files.
- Compress the lambda function.
$ yarn lambda:build # npm run lambda:build
- Deploy
$ yarn deploy # npm run deploy
- Choose
Yes
and wait for the resources creation, it will take a while so be patience. - When the process is finished you need to link the Auth Lambda Function with your CloudFront distribution manually (deploy to Lambda@Edge), because there's a Bug in AWS that doesn't permit to do such thing through its API, you can read more about in this thread.
This deploy setup was made based on this article.