This is a proof of concept running a Qwik app on AWS behind CloudFront with two origins.
- S3 Origin - Serving static files.
- Lambda Function URL Origin - Server side rendering.
npm i
npm run dev
npm run build
First off, you need some AWS credentials with enough permissions to create the resources in this architecture. Either as environment variables or profile in ~/.aws/credentials
.
Then you need to create a bucket, or skip and reuse an existing one to store the CloudFormation artifacts.
export DEPLOYMENT_BUCKET="qwik-deployment-bucket"
make setup-deployment
Deployment will build, sync static files to S3 and deploy the CloudFormation stack.
export DEPLOYMENT_BUCKET="qwik-deployment-bucket"
export STACK_NAME="qwik-stack"
export STATIC_BUCKET="qwik-static"
make deploy