Akamai CLI for Fast DNS

Manage DNS zones with Fast DNS

 akamai install dns

Latest Release: 0.2.0

Release Date: 2019-01-30

Release Notes

This release fixes a couple of bugs


- SOA is always increment by one (#1)
- Removing SRV records doesn’t work (akamai/cli#71)

Package Commands

Command Aliases Version Description Binaries Available
dns 0.2.0 Manage DNS zones with Fast DNS


Akamai CLI for Fast DNS

Go Report Card FOSSA Status

An Akamai CLI package for managing DNS Zones using Fast DNS.

Getting Started


To install this package, use Akamai CLI:

$ akamai install dns

You may also use this as a stand-alone command by downloading the latest release binary for your system, or by cloning this repository and compiling it yourself.

Compiling from Source

If you want to compile it from source, you will need Go 1.7 or later, and the Dep package manager installed:

  1. Fetch the package:
    go get github.com/akamai/cli-dns
  2. Change to the package directory:
    cd $GOPATH/src/github.com/akamai/cli-dns
  3. Install dependencies using dep:
    dep ensure
  4. Compile the binary:
  5. Linux/macOS/*nix: go build -o akamai-dns
  6. Windows: go build -o akamai-dns.exe
  7. Move the binary (akamai-dns or akamai-dns.exe) in to your PATH


$  akamai dns [--edgerc] [--section] <command> [sub-command]`

Retrieving a Zone

To retrieve a Zone use the retrieve-zone command:

$ akamai dns retrieve-zone example.org

To filter to specific record types use one or more --filter <TYPE> flags. For example, to show just A and AAAA records:

$ akamai dns retrieve-zone example.org --filter A --filter AAAA

You can also output the result as JSON, by adding the --json flag:

$ akamai dns retrieve-zone example.org --filter A --filter AAAA --json
  "token": "9218376e14c2797e0d06e8d2f918d45f",
  "zone": {
    "name": "example.com",
    "a": [
        "name": "www",
        "ttl": 3600,
        "active": true,
        "target": ""
    "aaaa": [
        "name": "www",
        "ttl": 3600,
        "active": true,
        "target": "2001:db8:0:0:0:0:0:1"

Update a Zone

Update a zone using akamai dns update-zone. This command allows you to input either a Fast DNS JSON payload, or a standard DNS zone file.

By default, this will append the records to the zone.

You can either specify a file or redirect content via STDIN:

$ akamai dns update-zone example.org -f new-records.zone.json

is identical to:

$ cat new-records.zone.json | akamai dns update-zone example.org

To use DNS zone format, specify the --dns flag:

$ akamai dns update-zone --dns -f new-records.zone

Overwriting a Zone

If you want to overwrite the existing zone entirely, add the --overwrite flag:

$ akamai dns update-zone example.org --overwrite -f example.org.zone.json

Add a New Record

To add a new DNS record use akamai dns add-record <record type>. Each setting for the record is a flag, for example to add a CNAME record:

$ akamai dns add-record CNAME example.org --name www --target example.org --ttl 3600

Remove a Record

Use akamai dns rm-record <record type> to remove one or more records matching the given flags.

$ akamai dns rm-record A example.org --name www

By default the command will ask you to verify which records to remove if more than one matches the given criteria. You can force it to remove all matching records by passing in the --force-multiple flag.

If the command is run in a non-interactive terminal, or the --non-interactive flag is passed in, without the --force-multiple flag the command will remove records if only one match is found, otherwise it will exit with status code 1.


This package is licensed under the Apache 2.0 License. See LICENSE for details.

FOSSA Status