Running Fermyon on AWS
Thank you for trying out the AWS installer of Fermyon! This document will guide you through configuring Fermyon on AWS.
- Log in to your AWS account. See installer documentation for AWS account setup.
- Install the terraform CLI.
Clone the installer repository and
cd in to the
git clone https://github.com/fermyon/installer.git cd installer/aws/terraform
Initialize terraform and deploy the infrastructure with Let’s Encrypt to provision certs for HTTPS. See this page for details about the resources that will be deployed in AWS.
terraform init terraform apply -var='enable_letsencrypt=true'
This step can take about a few minutes to complete.
If everything is successful, you should see the links for the relevant dashboards and environment variables that need to be added to your current shell. See the troubleshooting guide for help with deployment issues.
Source your environment using:
$(terraform output -raw environment)
For a more detailed walkthrough, make sure to visit this page.
Deploying your first application to Fermyon on AWS
Spin provides templates to bootstrap a new application. Let’s use the
http-rust template to create
a simple hello world HTTP application written in Rust.
$ spin new http-rust hello-fermyon-aws Project description: AWS quickstart demo HTTP base: / HTTP path: /... $ cd hello-fermyon-aws
Now we can build our application using
$ spin build Executing the build command for component hello-fermyon-aws: cargo build --target wasm32-wasi --release ... Successfully ran the build command for the Spin components.
The application has been built, and is now ready to be deployed to Fermyon.
NOTE: Ensure the
BINDLE_URLenvironment variables are set in the terminal by running
$(terraform output -raw environment).
$ spin deploy Deployed hello-fermyon-aws version 0.1.0+qe86e210 Available Routes: hello-fermyon-aws: https://spin-deploy.hello-fermyon-aws.hippo.126.96.36.199.sslip.io (wildcard)
Fermyon automatically configured the domain for the application, and the application now accepts requests:
$ curl -i https://spin-deploy.hello-fermyon-aws.hippo.188.8.131.52.sslip.io/ HTTP/2 200 date: Fri, 17 Jun 2022 16:40:34 GMT foo: bar content-type: text/plain; charset=utf-8 content-length: 14 Hello, Fermyon
Log in to the Hippo dashboard where you can see details about the new application, view the logs, or change environment variables:
$ echo $HIPPO_URL https://hippo.184.108.40.206.sslip.io
For a detailed guide on writing applications for the Fermyon platform, visit the Spin website.
You can now make changes to the application and run
spin deploy again, or
create new applications.
To uninstall the Fermyon and all related AWS resources: