Skip to main content

Lambda delete function concurrency

Lambda delete function concurrency is an AWS fault that deletes the Lambda function's reserved concurrency, thereby ensuring that the function has adequate unreserved concurrency to run.

  • Examines the performance of the running Lambda application, if the Lambda function lacks sufficient concurrency.

Lambda Delete Function Concurrency

Usage

View fault usage
When there is no unreserved concurrency left to run the Lambda function, this chaos fault can be used to check how your application behaves.

Prerequisites

  • Kubernetes >= 1.17
  • Reserved concurrency set on the target Lambda function.
  • Kubernetes secret that has AWS access configuration (key) in the CHAOS_NAMESPACE. Below is a sample secret file:
apiVersion: v1
kind: Secret
metadata:
name: cloud-secret
type: Opaque
stringData:
cloud_config.yml: |-
# Add the cloud AWS credentials respectively
[default]
aws_access_key_id = XXXXXXXXXXXXXXXXXXX
aws_secret_access_key = XXXXXXXXXXXXXXX
  • If you change the secret key name (from cloud_config.yml), ensure that you update the AWS_SHARED_CREDENTIALS_FILE environment variable in the experiment.yaml with the same name.

Permissions required

Here is an example AWS policy to execute the fault.

View policy for this fault
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"lambda:UpdateFunctionConfiguration",
"lambda:GetFunctionConcurrency",
"lambda:GetFunction",
"lambda:DeleteFunctionConcurrency",
"lambda:PutFunctionConcurrency"
],
"Resource": "*"
}
]
}

Refer to the superset permission/policy to execute all AWS faults.

Default validations

The Lambda function should be up and running.

Fault tunables

Fault tunables

Mandatory fields

Variables Description Notes
FUNCTION_NAME Name of the target Lambda function. It supports a single function name. For example, test-function.
FUNCTION_VERSION Specifies the version of the function. Defaults to $LATEST.
REGION Region name of the target Lambda function. For example, us-east-2.

Optional Fields

Variables Description Notes
TOTAL_CHAOS_DURATION Duration to insert chaos (in seconds). Defaults to 30s.
CHAOS_INTERVAL Time interval between two successive deletions of reserved concurrency (in seconds). Defaults to 30s.
RAMP_TIME Period to wait before and after injecting chaos (in seconds). For example, 30s.

Fault examples

Common and AWS-specific tunables

Refer to the common attributes and AWS-specific tunables to tune the common tunables for all faults and aws specific tunables.