Quickstart
Follow the steps in this Quickstart guide to get up and running with Akamai Functions in less than two minutes. Akamai Functions is the platform for running Spin applications on Akamai Cloud.
To complete this tutorial you need access to the public preview of Akamai Functions. If you haven’t already requested access, please complete this form. The Akamai Functions team will review your request and follow up shortly.
Install Spin
Spin is an open-source project you can use to build, run, and deploy Spin applications. It's both a CLI tool and a runtime. It provides SDKs for a variety of programming languages, including, but not limited to, Rust, Go, JavaScript and TypeScript.
To find the Spin version installed on your machine run, spin --version.
Install the aka plugin for Spin
aka plugin for SpinTo interact with Akamai Functions, you need to install the Akamai Functions for Akamai Spin plugin, aka. Use this command to install the plugin.
spin plugin install akaIf you’ve previously installed the aka plugin, take a moment to upgrade it to ensure compatibility with the latest features and fixes.
spin plugins update
spin plugins upgrade akaYou can learn more about managing Spin plugins in this article.
Go to the aka spin command reference for a complete list of supported commands.
Install language specific tooling
With Spin you can build applications using a wide variety of different programming languages. This quickstart, contains instructions and samples for JavaScript, TypeScript and Rust.
Follow these instructions to install language specific tooling on your machine.
Go to, WebAssembly language support matrix for more information about the supported languages.
Create a new Spin application
Next we’ll prepare an application with Spin. There are code samples below for you to use, but you can write an app from scratch or use an existing template. The Spin Hub has many reference examples and templates. You can also find several code samples, sorted by use case in the Akamai Functions GitHub repo.
Compile the application
Use the spin build command to compile your Spin app to WebAssembly.
spin buildTest the application locally
You can test your Spin apps on your local computer by using the spin up command anytime. The spin up command starts an HTTP server on your local machine (port 3000 by default) and instantiates and invokes your Spin application for every request sent to the endpoint.
spin upLogging component stdio to ".spin/logs/"
Serving <http://0.0.0.0:3000>
Available Routes:
hello-spin: <http://0.0.0.0:3000> (wildcard)If port
3000is already in use, you could set a different port by specifying the--listenflag. For example,spin up --listen 127.0.0.1:3001.
From within an separate terminal instance, you can use a tool like curl to send an HTTP request to your Spin app
curl -i http://localhost:3000/HTTP/1.1 200 OK
content-length: 14
content-type: text/plain;charset=UTF-8
date: Tue, 14 Jan 2025 16:10:36 GMT
Hello, FermyonYou can terminate spin up at anytime, by pressing CTRL+C.
Log in to Akamai Functions
To log in you need access to the public preview of Akamai Functions. If you haven’t already, please complete the Onboarding form. Akamai Functions supports two identity providers, Akamai Control Center and GitHub. If you have an Akamai Control Center account, you can log in using your user ID and password. Otherwise, you need to use GitHub. If both accounts share the same email address, they are automatically cross-linked.
The Akamai Functions team will review your onboarding request and follow up shortly.
Before you log in using your Akamai Control Center or GitHub account information make sure that you complete the following tasks.
- Install the
akaplugin for Spin.- Receive the allow-listing status for Akamai Functions.
- Request and receive access to the public preview.
- Run the
spin aka logincommand.
spin aka login- Click the link displayed in the output from the
spin aka logincommand.
Go to <https://login.infra.fermyon.tech/realms/neutrino/device?user_code=BB-AA>
and follow the prompts.
Don't worry, we'll wait here for you. You got this.- Authenticate using your Akamai Control Center credentials or your individual GitHub account.
- Once you're logged in you need to authorize the
spinCLI to interact with your Akamai Functions account.
Deploy the application
You can use the spin aka deploy command to deploy the application to Akamai Functions.
spin aka deployThe spin command runs using the Spin binary in your system path. It reads the Spin application definition file spin.toml in the current (hello-spin) directory to know what application to deploy. It will ask you for a name for the application and then it will ask for confirmation that you want to deploy.
Here's an example of a successful Spin application deployment on Akamai Functions.
Name of new app: hello-spin
Creating new app hello-spin in account your-account
Note: If you would instead like to deploy to an existing app, cancel this deploy and link this workspace to the app with `spin aka app link`
OK to continue? yes
Workspace linked to app hello-spin
Waiting for app to be ready... ready
App Routes:
- hello-spin: https://ec8a19d8-6d10-4056-bb69-cc864306b489.fwf.app (wildcard)You can CTRL+Click on the link in the terminal window to visit the web application you just deployed.
Congratulations, you’ve now deployed your first Spin application to Akamai Functions!
Updated about 15 hours ago
