Quack on WebAssembly
CloudFormation Stack
We provide an example template for initializing a CloudFormation stack, based on pre-baked public AMI, based on Ubuntu, which will:
- via DuckDB, install and load Quack, create a randomized token, and do
quack_serveon the0.0.0.0:1294port. - setup via nginx a proxy between
0.0.0.0:1294and the incoming:443port - obtain a valid TLS certificate via Let’s Encrypt
All together, this allows to expose the local 0.0.0.0:1294 port to the public EC2 instance IP via HTTPS.
The template is reachable at https://duckdb-quack-ami.s3.us-east-1.amazonaws.com/quack.yaml, and is backed by images for (at the moment) eight regions:
us-east-1us-east-2us-west-1us-west-2eu-central-1eu-west-1ap-northeast-1ap-southeast-1
Only inputs are the type of the instance (default t3.micro) and the name of the stack (needs to be unique on the same org/region).
Template is maintained at https://github.com/duckdb/duckdb-quack-infra
Deploy via Web UI
- Visit https://console.aws.amazon.com/cloudformation/home#/stacks/quickcreate?templateURL=https://duckdb-quack-ami.s3.us-east-1.amazonaws.com/quack.yaml&stackName=my-duckdb-quack-demo
- Log-in, select a name, possibly an instance class, and click Launch Stack.
This will incur billing. Make sure you check the stack page afterward, and delete the non-relevant anymore stacks.
Deploy via aws CLI
To deploy a Quack demo with the name my-quack-demo in the us-east-2 region, run:
aws cloudformation create-stack \ --stack-name my-quack-demo \ --template-url https://duckdb-quack-ami.s3.us-east-1.amazonaws.com/quack.yaml \ --region us-east-2Wait approx. 2 minutes for the deployment to complete (this command is blocking):
aws cloudformation wait stack-create-complete \ --stack-name my-quack-demo \ --region us-east-2Consult the auto-generated outputs:
aws cloudformation describe-stacks \ --stack-name my-quack-demo \ --region us-east-2 \ --query 'Stacks[0].Outputs' \ --output tableNow you can visit the relevant link, that will encode connecting to the just created quack server via DuckDB-Wasm.
Destroy
aws cloudformation delete-stack \ --stack-name my-quack-demo \ --region us-east-2Web UI
To see the status of your CloudFormation stack on the AWS web user interface, visit the CloudFormation console.