CLI Hello world
Learn how to enhance your EdgeWorkers code with an EdgeKV key-value database.
Before you begin, we recommend that you review the Get Started section in the EdgeWorkers documentation. These instructions include a Hello World tutorial that illustrates an end-to-end EdgeWorkers example. EdgeKV is enabling technology for EdgeWorkers. You need to build an EdgeWorkers function using the Dynamic Compute resource tier to use an EdgeKV database.
You can also refer to the comprehensive CLI documentation for instructions on how to install the EdgeWorkers package. You'll also find an overview of commands you can use to manage your EdgeWorkers.
Make sure to follow the instructions in the Get Started with APIs documentation. These instructions apply to both Akamai APIs and Akamai CLIs. You need to authenticate your CLI requests using EdgeGrid, a proprietary authentication system for APIs deployed through Akamai Control Center.
EdgeWorkers functions running on the production network can only be used with EdgeKV namespaces created on the production network. Similarly, EdgeWorkers running on the staging network can only access EdgeKV namespaces created on the staging network. This is to ensure separation of concerns for security reasons.
Before you start, ensure you have these prerequisites:
- An API token
- Entitlement to EdgeWorkers on your contract
- Entitlement to EdgeKV on your contract
- An EdgeKV access token
You can use the information generated by an EdgeWorkers HTTP sub-request to troubleshoot your EdgeKV database. When enabling enhanced debug headers for EdgeWorkers you need to include the
akamai-x-ew-debug-subsheader to return information about EdgeKV.
Updated about 1 year ago