aws-cdk-lib.aws_applicationautoscaling.PredefinedMetric

enum PredefinedMetric

LanguageType name
.NETAmazon.CDK.AWS.ApplicationAutoScaling.PredefinedMetric
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsapplicationautoscaling#PredefinedMetric
Javasoftware.amazon.awscdk.services.applicationautoscaling.PredefinedMetric
Pythonaws_cdk.aws_applicationautoscaling.PredefinedMetric
TypeScript (source)aws-cdk-lib » aws_applicationautoscaling » PredefinedMetric

One of the predefined autoscaling metrics.

Example

import * as lambda from 'aws-cdk-lib/aws-lambda';

declare const code: lambda.Code;

const handler = new lambda.Function(this, 'MyFunction', {
  runtime: lambda.Runtime.PYTHON_3_7,
  handler: 'index.handler',
  code,

  reservedConcurrentExecutions: 2,
});

const fnVer = handler.currentVersion;

const target = new appscaling.ScalableTarget(this, 'ScalableTarget', {
  serviceNamespace: appscaling.ServiceNamespace.LAMBDA,
  maxCapacity: 100,
  minCapacity: 10,
  resourceId: `function:${handler.functionName}:${fnVer.version}`,
  scalableDimension: 'lambda:function:ProvisionedConcurrency',
})

target.scaleToTrackMetric('PceTracking', {
  targetValue: 0.9,
  predefinedMetric: appscaling.PredefinedMetric.LAMBDA_PROVISIONED_CONCURRENCY_UTILIZATION,
})

Members

NameDescription
APPSTREAM_AVERAGE_CAPACITY_UTILIZATIONAverage percentage of instances in an AppStream fleet that are being used.
CASSANDRA_READ_CAPACITY_UTILIZATIONPercentage of provisioned read capacity units utilized by a Keyspaces table.
CASSANDRA_WRITE_CAPACITY_UTILIZATIONPercentage of provisioned write capacity units utilized by a Keyspaces table.
COMPREHEND_INFERENCE_UTILIZATIONPercentage of provisioned inference units utilized by a Comprehend endpoint.
NEPTURE_READER_AVERAGE_CPU_UTILIZATIONAverage CPU Utilization of read replica instances in a Neptune DB cluster.
DYNAMODB_READ_CAPACITY_UTILIZATIONPercentage of provisioned read capacity units consumed by a DynamoDB table.
DYNAMODB_WRITE_CAPACITY_UTILIZATIONPercentage of provisioned write capacity units consumed by a DynamoDB table.
DYANMODB_WRITE_CAPACITY_UTILIZATIONDYANMODB_WRITE_CAPACITY_UTILIZATION.
ALB_REQUEST_COUNT_PER_TARGETALB_REQUEST_COUNT_PER_TARGET.
RDS_READER_AVERAGE_CPU_UTILIZATIONRDS_READER_AVERAGE_CPU_UTILIZATION.
RDS_READER_AVERAGE_DATABASE_CONNECTIONSRDS_READER_AVERAGE_DATABASE_CONNECTIONS.
EC2_SPOT_FLEET_REQUEST_AVERAGE_CPU_UTILIZATIONEC2_SPOT_FLEET_REQUEST_AVERAGE_CPU_UTILIZATION.
EC2_SPOT_FLEET_REQUEST_AVERAGE_NETWORK_INEC2_SPOT_FLEET_REQUEST_AVERAGE_NETWORK_IN.
EC2_SPOT_FLEET_REQUEST_AVERAGE_NETWORK_OUTEC2_SPOT_FLEET_REQUEST_AVERAGE_NETWORK_OUT.
SAGEMAKER_VARIANT_INVOCATIONS_PER_INSTANCESAGEMAKER_VARIANT_INVOCATIONS_PER_INSTANCE.
ECS_SERVICE_AVERAGE_CPU_UTILIZATIONECS_SERVICE_AVERAGE_CPU_UTILIZATION.
ECS_SERVICE_AVERAGE_MEMORY_UTILIZATIONECS_SERVICE_AVERAGE_MEMORY_UTILIZATION.
LAMBDA_PROVISIONED_CONCURRENCY_UTILIZATIONLAMBDA_PROVISIONED_CONCURRENCY_UTILIZATION.
KAFKA_BROKER_STORAGE_UTILIZATIONKAFKA_BROKER_STORAGE_UTILIZATION.
ELASTICACHE_PRIMARY_ENGINE_CPU_UTILIZATIONELASTIC_CACHE_PRIMARY_ENGINE_CPU_UTILIZATION.
ELASTICACHE_REPLICA_ENGINE_CPU_UTILIZATIONELASTIC_CACHE_REPLICA_ENGINE_CPU_UTILIZATION.
ELASTICACHE_DATABASE_MEMORY_USAGE_COUNTED_FOR_EVICT_PERCENTAGEELASTIC_CACHE_REPLICA_ENGINE_CPU_UTILIZATION.

APPSTREAM_AVERAGE_CAPACITY_UTILIZATION

Average percentage of instances in an AppStream fleet that are being used.


CASSANDRA_READ_CAPACITY_UTILIZATION

Percentage of provisioned read capacity units utilized by a Keyspaces table.


CASSANDRA_WRITE_CAPACITY_UTILIZATION

Percentage of provisioned write capacity units utilized by a Keyspaces table.


COMPREHEND_INFERENCE_UTILIZATION

Percentage of provisioned inference units utilized by a Comprehend endpoint.


NEPTURE_READER_AVERAGE_CPU_UTILIZATION

Average CPU Utilization of read replica instances in a Neptune DB cluster.


DYNAMODB_READ_CAPACITY_UTILIZATION

Percentage of provisioned read capacity units consumed by a DynamoDB table.


DYNAMODB_WRITE_CAPACITY_UTILIZATION

Percentage of provisioned write capacity units consumed by a DynamoDB table.

Suffix dummy is necessary due to jsii bug (https://github.com/aws/jsii/issues/2782). Duplicate values will be dropped, so this suffix is added as a workaround. The value will be replaced when this enum is used.

See also: https://docs.aws.amazon.com/autoscaling/application/APIReference/API_PredefinedMetricSpecification.html


DYANMODB_WRITE_CAPACITY_UTILIZATION

DYANMODB_WRITE_CAPACITY_UTILIZATION.

See also: https://docs.aws.amazon.com/autoscaling/application/APIReference/API_PredefinedMetricSpecification.html


ALB_REQUEST_COUNT_PER_TARGET

ALB_REQUEST_COUNT_PER_TARGET.

See also: https://docs.aws.amazon.com/autoscaling/application/APIReference/API_PredefinedMetricSpecification.html


RDS_READER_AVERAGE_CPU_UTILIZATION

RDS_READER_AVERAGE_CPU_UTILIZATION.

See also: https://docs.aws.amazon.com/autoscaling/application/APIReference/API_PredefinedMetricSpecification.html


RDS_READER_AVERAGE_DATABASE_CONNECTIONS

RDS_READER_AVERAGE_DATABASE_CONNECTIONS.

See also: https://docs.aws.amazon.com/autoscaling/application/APIReference/API_PredefinedMetricSpecification.html


EC2_SPOT_FLEET_REQUEST_AVERAGE_CPU_UTILIZATION

EC2_SPOT_FLEET_REQUEST_AVERAGE_CPU_UTILIZATION.

See also: https://docs.aws.amazon.com/autoscaling/application/APIReference/API_PredefinedMetricSpecification.html


EC2_SPOT_FLEET_REQUEST_AVERAGE_NETWORK_IN

EC2_SPOT_FLEET_REQUEST_AVERAGE_NETWORK_IN.

See also: https://docs.aws.amazon.com/autoscaling/application/APIReference/API_PredefinedMetricSpecification.html


EC2_SPOT_FLEET_REQUEST_AVERAGE_NETWORK_OUT

EC2_SPOT_FLEET_REQUEST_AVERAGE_NETWORK_OUT.

See also: https://docs.aws.amazon.com/autoscaling/application/APIReference/API_PredefinedMetricSpecification.html


SAGEMAKER_VARIANT_INVOCATIONS_PER_INSTANCE

SAGEMAKER_VARIANT_INVOCATIONS_PER_INSTANCE.

See also: https://docs.aws.amazon.com/autoscaling/application/APIReference/API_PredefinedMetricSpecification.html


ECS_SERVICE_AVERAGE_CPU_UTILIZATION

ECS_SERVICE_AVERAGE_CPU_UTILIZATION.

See also: https://docs.aws.amazon.com/autoscaling/application/APIReference/API_PredefinedMetricSpecification.html


ECS_SERVICE_AVERAGE_MEMORY_UTILIZATION

ECS_SERVICE_AVERAGE_MEMORY_UTILIZATION.

See also: https://docs.aws.amazon.com/autoscaling/application/APIReference/API_PredefinedMetricSpecification.html


LAMBDA_PROVISIONED_CONCURRENCY_UTILIZATION

LAMBDA_PROVISIONED_CONCURRENCY_UTILIZATION.

See also: https://docs.aws.amazon.com/lambda/latest/dg/monitoring-metrics.html#monitoring-metrics-concurrency


KAFKA_BROKER_STORAGE_UTILIZATION

KAFKA_BROKER_STORAGE_UTILIZATION.

See also: https://docs.aws.amazon.com/autoscaling/application/APIReference/API_PredefinedMetricSpecification.html


ELASTICACHE_PRIMARY_ENGINE_CPU_UTILIZATION

ELASTIC_CACHE_PRIMARY_ENGINE_CPU_UTILIZATION.

See also: https://docs.aws.amazon.com/autoscaling/application/APIReference/API_PredefinedMetricSpecification.html


ELASTICACHE_REPLICA_ENGINE_CPU_UTILIZATION

ELASTIC_CACHE_REPLICA_ENGINE_CPU_UTILIZATION.

See also: https://docs.aws.amazon.com/autoscaling/application/APIReference/API_PredefinedMetricSpecification.html


ELASTICACHE_DATABASE_MEMORY_USAGE_COUNTED_FOR_EVICT_PERCENTAGE

ELASTIC_CACHE_REPLICA_ENGINE_CPU_UTILIZATION.

See also: https://docs.aws.amazon.com/autoscaling/application/APIReference/API_PredefinedMetricSpecification.html