Unable to send K6 Metrics to AWS Managed Prometheus

Hi Team,

I’m planning to move the Prometheus and Grafana instance to AWS manage service and I used along with SigV4 proxy.

When i start sending the metrics to Prometheus getting 403 error.

PROMETHEUS_SERVER_URL: "https://aps-workspaces.ap-xxxxxxxx-2.amazonaws.com/workspaces/ws-xxxxxxxxxxxxxxxxxxxxxxx/api/v1/remote_write"

evel=error msg=“Failed to send the time series data to the endpoint” error=“got status code: 403 instead expected a 2xx successful status code” output=“Prometheus remote write”

Hi @gerardlj,

Are you working with the experimental Prometheus remote write module? If so it looks like you may be using the incorrect env var PROMETHEUS_SERVER_URL. In the docs it is K6_PROMETHEUS_RW_SERVER_URL. In the docs there are some other env vars that you may need to take into consideration for the SigV4 proxy such as K6_PROMETHEUS_RW_SIGV4_REGION, K6_PROMETHEUS_RW_SIGV4_ACCESS_KEY and K6_PROMETHEUS_RW_SIGV4_SECRET_KEY.

Hope this helps you find the information you need.

Best,
Ankur

1 Like