Managing workspaces - Amazon Managed Service for Prometheus

Managing workspaces

Amazon Managed Service for Prometheus (AMP) is in open preview. The preview is open to all AWS accounts and you do not need to request access. Features may be added or changed before announcing General Availability.

The preview currently supports the following Regions:

  • US East (Ohio)

  • US East (N. Virginia)

  • US West (Oregon)

  • Europe (Frankfurt)

  • Europe (Ireland)

Use the procedures in this section to create and manage your Amazon Managed Service for Prometheus workspaces.

Create a workspace

Follow these steps to create a AMP workspace.

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 can have the same alias, but all workspaces have unique workspace IDs, which are generated by AMP.

    aws amp create-workspace [ --alias my-first-workspace] [--tags Status=Secret,Team=My-Team

    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.

    • tags lists the workspace's tags, if any.

  2. If your create-workspace command returns a status of CREATING, you can then enter the following command to determine 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. Choose Create.

  3. 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 can have the same alias, but all workspaces have unique workspace IDs, which are generated by AMP.

  4. (Optional) To add one or more tags to the workspace, choose Add new tag. Then, in Key, enter a name for the tag. You can add an optional value for the tag in Value.

    To add another tag, choose Add new tag again.

  5. Choose Create workspace.

    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 note of the URLs that are 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.

For information about how to ingest metrics into the workspace, see Ingest Prometheus metrics to the workspace.

Edit a workspace

You can edit a workspace to change its alias. To change the workspace alias using the AWS CLI, enter the following command.

aws amp update-workspace-alias --workspace-id my-workspace-id --alias "new-alias"

To edit a workspace using the AMP console

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

  2. In the upper left corner of the page, choose the menu icon and then choose All workspaces.

  3. Choose the workspace ID of the workspace that you want to edit, and then choose Edit.

  4. Enter a new alias for the workspace and then choose Save.

Find your workspace ARN

You can find the ARN of your AMP workspace by using either the console or the AWS CLI.

To find your workspace ARN using the AMP console

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

  2. In the upper left corner of the page, choose the menu icon and then choose All workspaces.

  3. Choose the Workspace ID of the workspace.

    The workspace ARN is displayed under ARN.

To use the AWS CLI to find your workspace ARN, enter the following command.

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

Find the value of arn in the results.

Delete a workspace

When you delete a workspace, the data that has been ingested into it is not immediately deleted. It will be permanently deleted within one month.

To delete a workspace using the AWS CLI, enter the following command.

aws amp delete-workspace --workspace-id my-workspace-id

To delete a workspace using the AMP console

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

  2. In the upper left corner of the page, choose the menu icon and then choose All workspaces.

  3. Choose the workspace ID of the workspace that you want to delete, and then choose Delete.

  4. Enter delete in the confirmation box, and choose Delete.