aws-cdk-lib.aws_applicationautoscaling.ServiceNamespace

enum ServiceNamespace

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

The service that supports Application AutoScaling.

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
ECSElastic Container Service.
ELASTIC_MAP_REDUCEElastic Map Reduce.
EC2Elastic Compute Cloud.
APPSTREAMApp Stream.
DYNAMODBDynamo DB.
RDSRelational Database Service.
SAGEMAKERSageMaker.
CUSTOM_RESOURCECustom Resource.
LAMBDALambda.
COMPREHENDComprehend.
KAFKAKafka.
ELASTICACHEElastiCache.
NEPTUNENeptune.

ECS

Elastic Container Service.


ELASTIC_MAP_REDUCE

Elastic Map Reduce.


EC2

Elastic Compute Cloud.


APPSTREAM

App Stream.


DYNAMODB

Dynamo DB.


RDS

Relational Database Service.


SAGEMAKER

SageMaker.


CUSTOM_RESOURCE

Custom Resource.


LAMBDA

Lambda.


COMPREHEND

Comprehend.


KAFKA

Kafka.


ELASTICACHE

ElastiCache.


NEPTUNE

Neptune.