# LambdaGuard | AWS Serverless Security

**URL:** <https://onehack.st/t/lambdaguard-aws-serverless-security/220038>\
**Category:** Tools & Scripts\
**Tags:** tools, freebies, cloud-storage\
**Created:** [June 17, 2022, 8:43pm UTC](https://onehack.st/t/lambdaguard-aws-serverless-security/220038 "2022-06-17T20:43:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![WhiteHat](https://onehack.st/user_avatar/onehack.st/whitehat/32/162514_2.png) [@WhiteHat](https://onehack.st/u/WhiteHat)\
**Post date:** [June 17, 2022, 8:43pm UTC](https://onehack.st/t/lambdaguard-aws-serverless-security/220038/1 "2022-06-17T20:43:22Z")

</div>

# [![LambdaGuard](https://github.com/Skyscanner/LambdaGuard/raw/master/lambdaguard/assets/logo.png)](https://github.com/Skyscanner/LambdaGuard/blob/master/lambdaguard/assets/logo.png) LambdaGuard

[![](https://camo.githubusercontent.com/787b9039f8f6683aa253215c6673b3fdd6e01d42921c37f069c3f4be6decc584/68747470733a2f2f696d672e736869656c64732e696f2f707970692f762f4c616d62646147756172642e737667)](https://pypi.python.org/pypi/LambdaGuard/) [![](https://github.com/Skyscanner/LambdaGuard/workflows/build/badge.svg)](https://github.com/Skyscanner/LambdaGuard/actions) [![](https://camo.githubusercontent.com/5a1fb79e4acb0402bfdff69a108f8cbddccd09cbd56e4ff58338dee8175abb1f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f536b797363616e6e65722f4c616d6264614775617264)](https://github.com/Skyscanner/LambdaGuard/issues) [![](https://camo.githubusercontent.com/1b701d2d15b8d837e31854c940c254dcc558a0bc8cbe65b7a84d1ba356a0f7f3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732d70722f536b797363616e6e65722f4c616d6264614775617264)](https://github.com/Skyscanner/LambdaGuard/pulls) [![](https://camo.githubusercontent.com/381ba986780a864625807a4257ad89cc45c1faf1b1f3ae241e6734dfb5bfcc40/68747470733a2f2f696d672e736869656c64732e696f2f707970692f646d2f4c616d6264614775617264)](https://img.shields.io/pypi/dm/LambdaGuard)

AWS Lambda is an event-driven, serverless computing platform provided by Amazon Web Services. It is a computing service that runs code in response to events and automatically manages the computing resources required by that code.

LambdaGuard is an AWS Lambda auditing tool designed to create asset visibility and provide actionable results. It provides a meaningful overview in terms of statistical analysis, AWS service dependencies and configuration checks from the security perspective.

## Requirements

- Python 3.6+
- Java 11 (optional for SonarQube)

## Install

### From PyPI

```auto
pip3 install lambdaguard

```

### From Github

```auto
git clone https://github.com/Skyscanner/lambdaguard
cd lambdaguard
sudo make install

```

### AWS Access

You will need a set of AWS access keys and permissions to run LambdaGuard.

```auto
make aws

```

Create a profile in `~/.aws/credentials` with the newly created keys.

```auto
[LambdaGuardProfile]
aws_access_key_id = ...
aws_secret_access_key = ...

```

Alternatively, you can use the keys directly as CLI arguments (not recommended).

## Run

- `lambdaguard --help`
- `lambdaguard --function arn:aws:lambda:function`
- `lambdaguard --input function-arns.txt`
- `lambdaguard --output /tmp/lambdaguard`
- `lambdaguard --profile LambdaGuardProfile`
- `lambdaguard --keys ACCESS_KEY_ID SECRET_ACCESS_KEY`
- `lambdaguard --region eu-west-1`
- `lambdaguard --verbose`

## SonarQube: Static Code Analysis

### Download sonar-scanner-cli

- [https://github.com/SonarSource/sonar-scanner-cli](https://github.com/SonarSource/sonar-scanner-cli)

### Build SonarQube

- `make sonarqube`

### Use SonarQube

- `lambdaguard --sonarqube config.json`

Config should have the following format:

{ “command”: “sonar-scanner -X”, “url”: “[http://localhost:9000](http://localhost:9000)”, “login”: “admin”, “password”: “admin” }

## Development

```auto
make -B clean
make dev
. dev/bin/activate
make install-dev
make test

```

## GitHub:

[https://github.com/Skyscanner/LambdaGuard](https://github.com/Skyscanner/LambdaGuard)
