Create a workspace - Amazon Managed Service for Prometheus

Create a workspace

A workspace is a logical and isolated Prometheus server dedicated to Prometheus resources such as metrics. A workspace supports fine-grained access control for authorizing its management such as update, list, describe, and delete, and the ingestion and querying of metrics. You can have one or more workspaces in each Region in your account.

To set up a workspace, follow these steps.

To create a workspace using the AWS CLI

  1. Enter the following command to create the workspace. This example creates a workspace named my-first-workspace, but you can use a different alias if you want. Workspace aliases are friendly names that help you identify your workspaces. They do not have to be unique. Two workspaces could have the same alias, but all workspaces will have unique workspace IDs, which are generated by AMP.

    aws amp create-workspace [ --alias my-first-workspace]

    This command returns the following data:

    • workspaceId is the unique ID for this workspace. Make a note of this ID.

    • arn is the ARN for this workspace.

    • status is the current status of the workspace. Immediately after you create the workspace, this will probably be CREATING.

  2. If your create-workspace command returns a status of CREATING, you can then enter the following command to find when the workspace is ready. Replace my-workspace-id with the value that the create-workspace command returned for workspaceId

    aws amp describe-workspace --workspace-id my-workspace-id

    When the describe-workspace command returns ACTIVE for status, the workspace is ready to use.

To create a workspace using the AMP console

  1. Open the AMP console at https://console.aws.amazon.com/prometheus/.

  2. For Workspace alias, enter an alias for the new workspace.

    Workspace aliases are friendly names that help you identify your workspaces. They do not have to be unique. Two workspaces could have the same alias, but all workspaces will have unique workspace IDs, which are generated by AMP.

  3. Choose Create.

    The workspace details page appears. This displays information including the status, ARN, workspace ID, and endpoint URLs for this workspace for both remote write and queries.

    Initially, the status is probably CREATING. Wait until the status is ACTIVE before you move on to setting up your metric ingestion.

    Make notes of the URLs displayed for Endpoint - remote write URL and Endpoint - query URL. You'll need them when you configure your Prometheus server to remote write metrics to this workspace and when you query those metrics.