# cdk-lambda-log

> "tail" the latest Lambda function's log by one line

Latest version **0.1.2** (published 2022-05-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install cdk-lambda-log
pnpm add cdk-lambda-log
yarn add cdk-lambda-log
bun add cdk-lambda-log
```

Provides the command `cdk-lambda-log`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2022-05-26 |
| First published | 2022-05-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Unpacked size | 16.8 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Taichiro Suzuki |
| Maintainers | tbrand |
| Keywords | cdk, aws-cdk, lambda |

## Links

- npm: https://www.npmjs.com/package/cdk-lambda-log
- Repository: https://github.com/tbrand/cdk-lambda-log
- Issues: https://github.com/tbrand/cdk-lambda-log/issues
- npm.io page: https://npm.io/package/cdk-lambda-log

## Dependencies (8)

- [kleur](https://npm.io/package/kleur.md) ^4.1.4
- [aws-sdk](https://npm.io/package/aws-sdk.md) ^2.1141.0
- [enquirer](https://npm.io/package/enquirer.md) ^2.3.6
- [constructs](https://npm.io/package/constructs.md) ^10.1.16
- [typescript](https://npm.io/package/typescript.md) ^4.6.4
- [@types/node](https://npm.io/package/@types/node.md) ^17.0.35
- [@aws-sdk/types](https://npm.io/package/@aws-sdk/types.md) ^3.78.0
- [ts-command-line-args](https://npm.io/package/ts-command-line-args.md) ^2.3.1

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 0.1.2 (latest) — 2022-05-26
- 0.1.1 — 2022-05-26

## README

# cdk-lambda-log

**"tail" the latest Lambda function's log by one line**

![](/imgs/demo.gif)

## Usage

Just hit the command below at the root of your CDK project.
```bash
npx cdk-lambda-log
```

## HighLights
- :white_check_mark: Fetch and follow the latest log stream of a single Lambda function
- :white_check_mark: Switch log stream automatically when cold start or new version of lambda is deployed
- :white_check_mark: You do not need to specify complex Lambda function names automatically generated by CDK

## Options

You can specify the stack name. If you do so, `cdk-lambda-log` try to search Lambda functions created by the stack.
```bash
npx cdk-lambda-log --stack-name YOUR_STACK_NAME
```

You can specify the function name. If you do so, `cdk-lambda-log` try to fetch the latest logs from Amazon CloudWatch.
```bash
npx cdk-lambda-log --function-name YOUR_LAMBDA_FUNCTION_NAME
```

## Note
`cdk-lambda-log` is developed for use in debugging during development.
As such, it only displays logs from the most recent log stream.
If you want to view multiple log streams in a production environment, you can use `cdk watch` or `sam logs`.

---
_Source: https://npm.io/package/cdk-lambda-log · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
