Start ECS using AK/SK signing¶
Sample on how to start an ECS instance using an ak/sk request signing.
For complete source code, see samples-doc/aksksigning/ecs-start on GitHub.
Requirements¶
Environment variable name |
Value |
Default |
|---|---|---|
ECS_INSTANCE_ID |
<ID of ecs instance> |
|
OTC_SDK_PROJECT_ID |
<Project ID> |
Needed if ecs instance is in a sub project see Obtaining a Project ID |
OTC_SDK_AK |
<Access Key> |
see: Generating AK and SK |
OTC_SDK_SK |
<Secret Key> |
see: Generating AK and SK |
Installation and Running¶
# install dependencies
npm install
# Running the sample
node startECS.js