Updated on 2023-11-22 GMT+08:00

Credentials

The Serverless Framework needs access to your Huawei Cloud credentials so that it can create and manage resources on your behalf.

Creating a Huawei Cloud Account

Open Huawei Cloud official website, and then choose Sign Up. For details, see Registering a HUAWEI ID and Enabling HUAWEI CLOUD Services.

Getting the Credentials

You need to create credentials so that Serverless can use them to create resources in your project.

  1. Go to the Access Keys page to get the access keys of your Huawei Cloud account.
  2. Create a file named credentials containing the credentials that you have collected.

    access_key_id=<collected in step 1>
    secret_access_key=<collected in step 1>

  3. Save the credentials file somewhere secure. We recommend creating a folder in your root folder and putting it there, like ~/.fg/credentials. Remember the path you saved it to.

Updating the provider Configuration in serverless.yml

Open your serverless.yml file and update the provider section with the path to your credentials file (the path should be absolute). The result should be like this:
provider:
  name: huawei
  runtime: Node.js14.18
  credentials: ~/.fg/credentials