Create an EdgeWorker ID
Before you begin make sure you have an authentication token for the EdgeWorkers API. Your administrator can create an API client in Control Center for the EdgeWorkers service. Make sure you replace the <access token> with the OPEN APIs section from your .edgerc file.
Go to Akamai CLI for EdgeWorkers for an overview of commands you can use to manage your EdgeWorkers.
-
Use this command to verify that you have access to the groupId you want to use.
For more information on Groups and Permissions see Identity and Access Management documentation.
[block:code]
{
"codes": [
{
"code": "akamai edgeworkers list-groups [options] [group-identifier]",
"language": "shell"
}
]
}
[/block]
If you don't see the groupId you want to use or if you received an error the likely cause is that your access token does not have the proper permissions. For more information on Groups and Permissions see Identity and Access Management documentation or your Akamai Administrator.
2. Use this command to create a new EdgeWorker ID.
akamai edgeworkers register <group-identifier> <edgeworker-name>
-
Replace
<group-identifier>with the groupID for your Access Group. -
Replace
<edgeworker-name>with Hello World.You will use this name to select the EdgeWorker in the Property Manager behavior.
-
Next, you'll be prompted to enter a contract id.
-
Use this command to select a contract id.
[block:code]
{
"codes": [
{
"code": "[1] M-SAMPLECONTRACT1\n[0] CANCEL\n\nPlease select from the above contract ids [1/0]: 1\nYou have selected M-SAMPLECONTRACT1",
"language": "shell"
}
]
}
[/block] -
Select a resource tier available on the contract you selected in the previous step.
[block:code]
{
"codes": [
{
"code": "Resource Tiers\n1. Resource Tier 100 Basic Compute\n\nMaximum CPU time during initialization: 30 MILLISECOND\nMaximum wall time during initialization: 100 MILLISECOND\nMaximum memory usage per event handler: 1572864 BYTE\nMaximum CPU time per event handler: 4 MILLISECOND\nMaximum wall time per event handler: 100 MILLISECOND\nMaximum number of HTTP sub-requests allowed from a parent request: 0 COUNT\nMaximum number of HTTP sub-requests allowed in parallel per request: 0 COUNT\nMaximum wall time per HTTP sub-request: 0 MILLISECOND\nMaximum response size per HTTP sub-request: 0 BYTE\nMaximum memory usage for responseProvider: 2097152 BYTE\nMaximum CPU time for responseProvider: 4 MILLISECOND\nMaximum wall time for responseProvider: 100 MILLISECOND\nMaximum number of HTTP sub-requests allowed for responseProvider: 0 COUNT\nMaximum number of HTTP sub-requests allowed in parallel for responseProvider: 0 COUNT\nMaximum wall time for HTTP sub-requests during the execution of the responseProvider event handler: 1000 MILLISECOND\nMaximum response size for HTTP sub-requests during the execution of the responseProvider event handler: 1048576 BYTE\n\n2. Resource Tier 200 Dynamic Compute\n\nMaximum CPU time during initialization: 30 MILLISECOND\nMaximum wall time during initialization: 100 MILLISECOND\nMaximum memory usage per event handler: 1572864 BYTE\nMaximum CPU time per event handler: 10 MILLISECOND\nMaximum wall time per event handler: 4000 MILLISECOND\nMaximum number of HTTP sub-requests allowed from a parent request: 1 COUNT\nMaximum number of HTTP sub-requests allowed in parallel per request: 1 COUNT\nMaximum wall time per HTTP sub-request: 1000 MILLISECOND\nMaximum response size per HTTP sub-request: 5242880 BYTE\nMaximum memory usage for responseProvider: 2097152 BYTE\nMaximum CPU time for responseProvider: 100 MILLISECOND\nMaximum wall time for responseProvider: 4000 MILLISECOND\nMaximum number of HTTP sub-requests allowed for responseProvider: 50 COUNT\nMaximum number of HTTP sub-requests allowed in parallel for responseProvider: 5 COUNT\nMaximum wall time for HTTP sub-requests during the execution of the responseProvider event handler: 1000 MILLISECOND\nMaximum response size for HTTP sub-requests during the execution of the responseProvider event handler: 5242880 BYTE\n\n\n[1] 100\n[2] 200\n[0] CANCEL\n\nPlease select from the above resource tier ids [1, 2, 0]: 1",
"language": "shell"
}
]
}
[/block] -
Use this command to verify that the EdgeWorker Identifier was created successfully:
[block:code]
{
"codes": [
{
"code": "akamai edgeworkers list-ids ",
"language": "shell"
}
]
}
[/block]
- Replace
<edgeworker-identifier>with the ID of your Hello World EdgeWorker.
If you successfully created the EdgeWorker ID, you should see the identifier for your Hello World EdgeWorker in the list.
- Next, follow these instructions to add the EdgeWorkers behavior.
Updated almost 4 years ago
