LocalStack is a tool that allows you to deploy and test AWS cloud infrastructure on your local machine.To run AWS Lambda locally, you can use LocalStack and TFLocal, which is a wrapper for Terraform.You need to write a Lambda function and the corresponding Terraform code to deploy the infrastructure.With LocalStack and TFLocal, you can deploy and test Lambda functions locally without incurring extra costs.