Use the deployer image to deploy or remove an Airnode with a cloud provider such
as AWS. The simplest way is to use the pre-built packages. If you would rather
build the images yourself see the
README(opens new window)
in the deployer package.
The deployer image has two commands.
deploy: Deploys or updates an Airnode using configuration files.
remove: Removes an Airnode using its receipt.json file.
Quick Deploy Demos
See the Quick Deploy Demos to quickly deploy and remove a
preconfigured Airnode using the deployer image.
In order to deploy Airnode to a serverless cloud provider, you need to provide
could provider credentials to the Airnode deployer image. The deployer image
currently supports deploying to AWS and GCP.
The deploy command will create the Airnode with a cloud provider or update it
if it already exists. Three files are needed to run the deploy command.
config.json
secrets.env
aws.env (AWS only)
gcp.json (GCP only)
A receipt.json file will be created upon completion. It contains some
deployment information and is used to remove the Airnode.
Warning about simultaneous deployments
Avoid running multiple deployments simultaneously as doing so might result
in a broken deployment. If this occurs, the standard removal approach may
not succeed and
Manual Removal may be
required.
Normally (for Linux/Mac/WSL2) the deployer image deploy command
is run by the user root. This may cause permission issues when the
receipt.json file is generated. Optionally you can specify the
UID (user identifier)
and
GID (group identifier)
that the deployer image should use. Do so by setting the environment
variables USER_ID and GROUP_ID, otherwise omit the line containing the
variables.
Optionally you can remove an Airnode manually though it is highly recommended
that you do so using the deployer image's remove command. Airnode has a
presence in several areas of both AWS and GCP. An Airnode has a
airnodeAddressShort (e.g., 0ab830c) that is included in the element name of
AWS and GCP deployed features.
Remember
Only delete elements of a feature with the airnodeAddressShort address in the
name you are targeting. There can be more than one Airnode.
Select the region where your Airnode lives.
Click the following links and delete all elements for each feature.
S3(opens new window)
: Delete the Airnode's S3 bucket directory, not the S3 bucket. Drill down to the directory
identified by the stage name of the Airnode which can be found in the config.json and
the receipt.json files.
The steps below assume you have created a project that belongs to an
organization.
Click the following links and delete all elements in each feature.
Cloud Storage
: Delete the Airnode's bucket directory, not the bucket. Drill down to the directory
identified by the stage name of the Airnode which can be found in the config.json and
the receipt.json files.
After removing an Airnode it may be necessary to wait several minutes
before deploying / redeploying Airnode again to the same project. GCP
takes several minutes to complete its behind the scenes clean-up of
deleted cloud resources.
Learn more about AWS or GCP resources that Airnode uses in the
Cloud Resources doc.