You must configure Serverless Devs before you use it. This topic describes how to run s config commands to add, query, and remove keys used by Serverless Devs. In the following examples, Alibaba Cloud AccessKey pairs are used.
Prerequisites
Add a key
Query keys
Parameters:
- -a or --access: the alias of the key that you want to query.
- -h or --help: returns help information.
Run the following commands to query the information about keys:
- Query the information about a key that has a specific alias. For example, set the
-a parameter to default.
s config get -a default
Sample command output:default: AccountID: 188077086902**** AccessKeyID: LTAI4FoAC3JPPWKPZDVg**** AccessKeySecret: gwL7FuveTjmHC7xyvvwOxP6ysI****
- Query the information about all keys.
s config get
Sample command output:default: AccountID: 188077086902**** AccessKeyID: LTAI4G4cwJkK4Rza6xd9**** AccessKeySecret: eCc0GxSpzfq1DVspnqqd6nmYNN**** default-1: AccountID: 188077086902**** AccessKeyID: LTAI4FoAC3JPPWKPZDVg**** AccessKeySecret: gwL7FuveTjmHC7xyvvwOxP6ysI****
Note You can run the
s config get -h
command to query the detailed information about s config commands.
Remove a key
Parameters:
- -a or --access: the alias of the key that you want to remove.
- -h or --help: returns help information.
Run the following command to remove a key that is specified by the -a parameter:
s config delete -a aliasName