All Products
Search
Document Center

:Configure Serverless Devs

Last Updated:Jun 20, 2026

Before using Serverless Devs, you must configure it first. This topic uses Alibaba Cloud keys as an example to demonstrate how to use the s config commands to add, obtain, and delete keys.

Prerequisites

Install the Serverless Devs tool and its dependencies

Add key information

  1. Run the following command to select a cloud provider.

    s config add

    Command output:

    > Alibaba Cloud (alibaba)
      AWS (aws)
      Azure (azure)
      Baidu Cloud (baidu)
      Google Cloud (google)
      Huawei Cloud (huawei)
      Tencent Cloud (tencent)
    (Move up and down to reveal more choices)
  2. Select your target cloud provider and press Enter. This topic uses Alibaba Cloud (alibaba) as an example.

  3. Follow the interactive prompts to set your key information.

    Please select a provider: Alibaba Cloud (alibaba)
     Refer to the document for alibaba key:  http://config.devsapp.net/account/alibaba
     AccountID 188077086902****
     AccessKeyID yourAccessKeyID
     AccessKeySecret yourAccessKeySecret
     Please create alias for key pair. If not, please enter to skip default
    
        Alias: default
        AccountID: 188077086902****
        AccessKeyID: yourAccessKeyID
        AccessKeySecret: yourAccessKeySecret
    
    Configuration successful

    You can find your Account ID and AccessKey ID in the Overview page of the Function Compute console under the Common Information section.

    Serverless Devs also supports adding keys through commands. For example, run the following command to configure Alibaba Cloud key information:

    s config add --AccessKeyID yourAccessKeyID --AccessKeySecret  yourAccessKeySecret --AccountID 188077086902**** --access ***
    Important

    To manage multiple keys easily, Serverless Devs supports multi-key management. When configuring a key, assign it an alias (aliasName). Then, specify a particular key by its alias when using it for specific tasks. Examples include the following:

    • Separating environments using different aliases for different accounts and deploying resources under different accounts—for example, using Account A for production and Account B for staging.

    • Applying access control to keys so that each key has only the permissions needed for its assigned task. Examples include the following:

      • Configuring a key with the alias website-access for website deployment only.

      • Configuring a key with the alias fc-access for function deployment only.

Get key information

Parameter description:

  • -a or --access: Specifies the alias name.

  • -h or --help: Displays help information.

Run the following commands to get key information:

  • Get the key information for a specific alias. For example, use -a to specify the alias default:

    s config get -a default

    Sample output:

    default:
      AccountID: 188077086902****
      AccessKeyID: yourAccessKeyID
      AccessKeySecret: yourAccessKeySecret
  • Get all key information:

    s config get

    Sample output:

    default:
      AccountID: 188077086902****
      AccessKeyID: yourAccessKeyID
      AccessKeySecret: yourAccessKeySecret
    default-1:
      AccountID: 188077086902****
      AccessKeyID: yourAccessKeyID
      AccessKeySecret: yourAccessKeySecret
Note

Run the s config get -h command to get more information about this command.

Delete key information

Parameter description:

  • -a or --access: Specifies the alias name.

  • -h or --help: Displays help information.

Run the following command to delete a key. Use -a to specify the alias.

s config delete -a aliasName