AWS Lambda: "UnreservedConcurrentExecution below its minimum value" and the solution

To fix the following AWS Lambda deployment error error:

Resource handler returned message: "Specified ReservedConcurrentExecutions for function decreases account's UnreservedConcurrentExecution below its minimum value of [50]. (Service: Lambda, Status Code: 400, Request ID: (...)
remove the reservedConcurrentExecutions from the lambda configuration:

import software.amazon.awscdk.Duration;
import software.amazon.awscdk.services.lambda.Architecture;
import software.amazon.awscdk.services.lambda.Code;
import software.amazon.awscdk.services.lambda.IFunction;
import software.amazon.awscdk.services.lambda.Function;
import software.amazon.awscdk.services.lambda.Runtime;

IFunction createFunction(String functionName,String functionHandler, int memory, int maximumConcurrentExecution, int timeout) {
    return Function.Builder.create(this, functionName)
            .runtime(Runtime.JAVA_11)
            .architecture(Architecture.ARM_64)
            .code(Code.fromAsset("../lambda/target/function.zip"))
            .handler(functionHandler)
            .memorySize(memory)
            .functionName(functionName)
            .timeout(Duration.seconds(timeout))
            //.reservedConcurrentExecutions(maximumConcurrentExecution)
            .build();
}    

...or request a concurrency limit increase for your AWS account.

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
Online Workshops
...the last 150 posts
...the last 10 comments
License