Create a workspace
A workspace is a logical space dedicated to the storage and querying of Prometheus 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
-
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 Amazon Managed Service for Prometheus.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 beCREATING
.
-
-
If your
create-workspace
command returns a status ofCREATING
, you can then enter the following command to find when the workspace is ready. Replacemy-workspace-id
with the value that thecreate-workspace
command returned forworkspaceId
aws amp describe-workspace --workspace-id
my-workspace-id
When the
describe-workspace
command returnsACTIVE
forstatus
, the workspace is ready to use.
To create a workspace using the console
-
Open the Amazon Managed Service for Prometheus console at https://console.aws.amazon.com/prometheus/
. -
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 Amazon Managed Service for Prometheus.
-
(Optional) To add tags to the namespace, choose Add new tag.
Then, for 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.
-
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 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.