#aws-lambda #local #local-server #http-server #locally #http-request #run-time

app aws-local

A HTTP Server proxying to local AWS Lambda Runtime

2 releases

0.1.1 Feb 5, 2024
0.1.0 Feb 5, 2024

#926 in Web programming

MIT license

17KB
369 lines

aws-local

A local HTTP server for proxying requests to AWS Lambda functions, facilitating the development and testing of Lambda functions locally.

Introduction

aws-local is a Rust-based CLI tool that creates a local server mimicking AWS API Gateway, allowing developers to test and debug AWS Lambda functions locally. It routes incoming HTTP requests to your Lambda function and returns the function's response, streamlining the Lambda development cycle by providing immediate feedback and compatibility with cargo lambda watch.

Installation

Install aws-local directly using Cargo:

cargo install aws-local

Usage

  1. Run aws-local to start intercepting and forwarding HTTP requests to your local AWS Lambda function.

    aws-local --function-name your-function-name -vvv
    
  2. Start your local lambda function runtime.

    cargo lambda watch -a 127.0.0.1
    
  3. Invoke Your Lambda Function Locally, by sending requests to http://localhost:3000/your-lambda-endpoint. aws-local will handle the requests, forwarding them to your Lambda function and returning the responses.

Contributing

Contributions are welcome! If you have a feature request, bug report, or a pull request, please feel free to open an issue or a pull request on the project repository.

License

aws-local is released under the MIT License. See the LICENSE file for more details.

Dependencies

~12–25MB
~400K SLoC