Create an access key

Create a credential that acts as an IAM user outside the browser, for the API, the CLI, Terraform, the container registry, git over HTTPS and S3 clients.

Last updated 18 November 2026View as Markdown

An access key is a pair: a key ID of 20 characters that starts with EWS1, and a secret of 40 characters. The key acts as one IAM user and can do at most what that user's policies allow. Replace ci-deploy with what the key is for.

Prerequisites

  • Permission for iam:CreateAccessKey. Without it the console says "Creating a key needs iam:CreateAccessKey; ask an administrator." and shows no Create access key button.
  • In the console, also iam:ListAccessKeys: without it the Access keys page shows only "You do not have permission to list access keys."
  • To limit the key to One bucket, s3:ListBuckets (the choice is offered only when you can list buckets or create one).
  • The IAM user the key acts as is active, and has fewer active, unexpired keys than the iam.access-keys quota allows per user (see Quotas).

Create the key

  1. Open Identity, then choose Access keys.
  2. Choose Create access key.
  3. (Optional) For Acts as, choose the IAM user the key acts as. It starts on you.
  4. (Optional) For Description, enter ci-deploy.
  5. (Optional) Under Limited to, instead of No limit:
    • choose One bucket, then the Bucket, Read only or Read and write under Access, and optionally a Folder (prefix); or
    • choose Custom policy and paste a policy document into Scope policy (JSON).
  6. (Optional) Open Expiry and, for Expires after (days), enter the key's lifetime. It starts on your organization's default and cannot exceed its maximum.
  7. Choose Create access key.
  8. Copy the Key ID and the Secret, then choose I've saved the secret, dismiss.

Result

The secret is in the create response and on the console panel, and nowhere else: it cannot be read again. With Terraform it is kept in the state, so protect the state as you would the key.

Use the pair as:

Authorization: EWS-ACCESS-KEY EWS1EXAMPLEEXAMPLE00:<secret>

For a key without a bucket limit, the panel shows the same pair as a docker login line for the container registry (the same pair works for git over HTTPS), as dcloud auth login --with-key for the CLI, and as aws configure set lines for S3 clients. For a One bucket key it shows an AWS CLI profile and an aws s3 ls line for that bucket instead.

  • Expiry. Every new key expires. Without expiresInDays it gets the organization's default (90 days unless changed); a request may ask for 1 day up to the organization's maximum (365 days unless changed).
  • Scope. With One bucket, Custom policy or scopePolicy, a request needs both the IAM user's policies and the scope to allow it, and a Deny in the scope always wins (see Limit a key to one bucket).
  • Acting as another person. A key for another person's own IAM user records everything done with it as that person. The console asks you to select I create a key that acts as …; the API needs "actAsMember": true. The audit log names you as the creator.

If the key is refused

  • 400 expiresInDays is 400; this organization allows at most 365 days.
  • 400 This key would act as …, a person in this organization: … when actAsMember is missing.
  • 400 scopePolicy: … when the scope is not a valid policy document.
  • 404 IAM user not found for an iamUserId outside your organization.
  • 409 … is suspended (for example a former member) and cannot be given new access keys.
  • 409 Quota exceeded: Access keys per user (iam.access-keys) — … when the user has as many active keys as allowed. Deactivate or delete one first (see Manage access keys).
Did this page help you?