Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

applicationautoscaling: missing PredefinedMetric for Lambda provisioned concurrency #6369

Closed
pahud opened this issue Feb 19, 2020 · 1 comment · Fixed by #6394
Closed

applicationautoscaling: missing PredefinedMetric for Lambda provisioned concurrency #6369

pahud opened this issue Feb 19, 2020 · 1 comment · Fixed by #6394
Assignees
Labels
@aws-cdk/aws-applicationautoscaling Related to AWS Application Auto Scaling bug This issue is a bug. in-progress This issue is being actively worked on.

Comments

@pahud
Copy link
Contributor

pahud commented Feb 19, 2020

LambdaProvisionedConcurrencyUtilization is required but missing.

export enum PredefinedMetric {
DYNAMODB_READ_CAPACITY_UTILIZATION = 'DynamoDBReadCapacityUtilization',
DYANMODB_WRITE_CAPACITY_UTILIZATION = 'DynamoDBWriteCapacityUtilization',
ALB_REQUEST_COUNT_PER_TARGET = 'ALBRequestCountPerTarget',
RDS_READER_AVERAGE_CPU_UTILIZATION = 'RDSReaderAverageCPUUtilization',
RDS_READER_AVERAGE_DATABASE_CONNECTIONS = 'RDSReaderAverageDatabaseConnections',
EC2_SPOT_FLEET_REQUEST_AVERAGE_CPU_UTILIZATION = 'EC2SpotFleetRequestAverageCPUUtilization',
EC2_SPOT_FLEET_REQUEST_AVERAGE_NETWORK_IN = 'EC2SpotFleetRequestAverageNetworkIn',
EC2_SPOT_FLEET_REQUEST_AVERAGE_NETWORK_OUT = 'EC2SpotFleetRequestAverageNetworkOut',
SAGEMAKER_VARIANT_INVOCATIONS_PER_INSTANCE = 'SageMakerVariantInvocationsPerInstance',
ECS_SERVICE_AVERAGE_CPU_UTILIZATION = 'ECSServiceAverageCPUUtilization',
ECS_SERVICE_AVERAGE_MEMORY_UTILIZATION = 'ECSServiceAverageMemoryUtilization',
}

Without this enum, we can't configure props for scaleToTrackMetric like this.

    target.scaleToTrackMetric('PceTracking', {
      targetValue: 1,
      predefinedMetric: applicationautoscaling.PredefinedMetric.LAMBDA_PROVISIONED_CONCURRENCY_UTILIZATION,
    })

Reproduction Steps

missing LAMBDA_PROVISIONED_CONCURRENCY_UTILIZATION in the following sample

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

    target.scaleToTrackMetric('PceTracking', {
      targetValue: 1,
      predefinedMetric: applicationautoscaling.PredefinedMetric.LAMBDA_PROVISIONED_CONCURRENCY_UTILIZATION,
    })
  }

Error Log

Environment

  • CLI Version : v1.25.0
  • Framework Version:
  • OS : Mac OS X
  • Language : TypeScript

Other


This is 🐛 Bug Report

@pahud pahud added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Feb 19, 2020
@SomayaB SomayaB added @aws-cdk/aws-autoscaling Related to Amazon EC2 Auto Scaling and removed @aws-cdk/aws-autoscaling Related to Amazon EC2 Auto Scaling labels Feb 19, 2020
@SomayaB SomayaB added @aws-cdk/aws-applicationautoscaling Related to AWS Application Auto Scaling in-progress This issue is being actively worked on. labels Feb 21, 2020
@SomayaB
Copy link
Contributor

SomayaB commented Mar 6, 2020

Thanks for putting in a PR @pahud, much appreciated! 👍

@SomayaB SomayaB removed the needs-triage This issue or PR still needs to be triaged. label Mar 6, 2020
@mergify mergify bot closed this as completed in #6394 Mar 28, 2020
mergify bot pushed a commit that referenced this issue Mar 28, 2020
…oned concurrency autoscaling (#6394)

feat(applicationautoscaling): add PredefinedMetric for Lambda provisioned concurrency autoscaling (#6394  )

Closes #6369
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-applicationautoscaling Related to AWS Application Auto Scaling bug This issue is a bug. in-progress This issue is being actively worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants