AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::APS::Scraper

CfnScraper

A scraper is a fully-managed agentless collector that discovers and pulls metrics automatically. A scraper pulls metrics from Prometheus-compatible sources within an Amazon EKS cluster, and sends them to your Amazon Managed Service for Prometheus workspace. Scrapers are flexible. You can configure the scraper to control what metrics are collected, the frequency of collection, what transformations are applied to the metrics, and more. An IAM role will be created for you that Amazon Managed Service for Prometheus uses to access the metrics in your cluster. You must configure this role with a policy that allows it to scrape metrics from your cluster. For more information, see [Configuring your Amazon EKS cluster](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-collector-how-to.html#AMP-collector-eks-setup) in the *Amazon Managed Service for Prometheus User Guide* . The `scrapeConfiguration` parameter contains the YAML configuration for the scraper. > For more information about collectors, including what metrics are collected, and how to configure the scraper, see [Using an AWS managed collector](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-collector-how-to.html) in the *Amazon Managed Service for Prometheus User Guide* .

Import

import { CfnScraper } from 'aws-cdk-lib/aws-aps';

Or use the module namespace:

import * as aps from 'aws-cdk-lib/aws-aps';
// aps.CfnScraper

Properties

Configuration passed to the constructor as CfnScraperProps.

destinationRequired
IResolvable | DestinationProperty

The Amazon Managed Service for Prometheus workspace the scraper sends metrics to.

scrapeConfigurationRequired
IResolvable | ScrapeConfigurationProperty

The configuration in use by the scraper.

sourceRequired
IResolvable | SourceProperty

The Amazon EKS cluster from which the scraper collects metrics.

aliasOptional
string

An optional user-assigned scraper alias.

roleConfigurationOptional
IResolvable | RoleConfigurationProperty

The role configuration in an Amazon Managed Service for Prometheus scraper.

scraperLoggingConfigurationOptional
IResolvable | ScraperLoggingConfigurationProperty

The definition of logging configuration in an Amazon Managed Service for Prometheus workspace.

tagsOptional
CfnTag[]

(Optional) The list of tag keys and values associated with the scraper.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter

Quick Facts

LevelL1 (CloudFormation)
Moduleaws-aps
CFN TypeAWS::APS::Scraper
Properties7

External Links