Kloar
Kloar

Reputation: 1160

Apply autoscaling configuration to lambda provisioned concurrency with Terrraform

Is there any way to apply an autoscaling configuration to AWS Lambda provisioned concurrency using terraform?

I want to scale it up during peak hours, and ideally maintain an N+1 hot concurrency rate.

I looked here but found no reference to Lambdas: https://www.terraform.io/docs/providers/aws/r/appautoscaling_policy.html

Upvotes: 3

Views: 1445

Answers (1)

Falk Tandetzky
Falk Tandetzky

Reputation: 6600

The feature to control the auto-scaling of lambdas was added Dez.2019 (see this blog). As long as this is not available through Terraform you have a couple of options to work around this

  1. Use a terraform provisioner to set up the provisioning rules through the aws-cli. Instructions which commands to run can be found in the AWS-Docs.
  2. Invoke the lambda yourself from time to time to keep it warm, see e.g. this post or this stackoverflow question
  3. Use a different service that provides more control, like ECS

Upvotes: 1

Related Questions