# @project-lakechain/layers

> Lambda layer library used by Project Lakechain.

Latest version **0.10.0** (published 2024-09-20) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @project-lakechain/layers
pnpm add @project-lakechain/layers
yarn add @project-lakechain/layers
bun add @project-lakechain/layers
```

## Health

**Score 40/100 (D)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high maintenance score.

Warnings: low downloads; large bundle; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.10.0 |
| Published | 2024-09-20 |
| First published | 2024-02-08 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 19.1 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 190 |
| Author | Amazon Web Services |
| Maintainers | aws-emea-pace |
| Keywords | aws, cdk, lakechain, lambda, layer, mediainfo, sharp, powertools |

## Links

- npm: https://www.npmjs.com/package/@project-lakechain/layers
- Repository: https://github.com/awslabs/project-lakechain
- Homepage: https://awslabs.github.io/project-lakechain/
- Issues: https://github.com/awslabs/project-lakechain/issues
- npm.io page: https://npm.io/package/@project-lakechain/layers

## Dependencies (1)

- [@project-lakechain/core](https://npm.io/package/@project-lakechain/core.md) ^0.10.0

## 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.10.0 (latest) — 2024-09-20
- 0.9.0 — 2024-09-13
- 0.8.0 — 2024-08-22
- 0.7.0 — 2024-04-15
- 0.5.0 — 2024-04-04
- 0.4.0 — 2024-02-27
- 0.3.4 — 2024-02-08

## README

# :package: Layer Library

---

![Static Badge](https://img.shields.io/badge/Project-Lakechain-danger?style=for-the-badge&color=green) ![Static Badge](https://img.shields.io/badge/API-unstable-danger?style=for-the-badge&color=orange)

---

> [!Warning]
> The Layer Library package has an unstable API and should not be used in a production environment.
> It should be assumed that the API will undergo heavy changes in upcoming versions.

## Overview

The Layer Library provides a set of Lambda Layers constructs that are used as part of [Project Lakechain](https://github.com/awslabs/project-lakechain) .

It currently supports the following layers :

- [**`Mediainfo`**](./src/mediainfo) - Allows to package the [MediaInfo](https://mediaarea.net/en/MediaInfo) library as a Lambda Layer.
- [**`Powertools`**](./src/powertools) - Allows to use the [AWS Lambda Powertools](https://docs.powertools.aws.dev/) for TypeScript and Python as an AWS Lambda Layer.
- [**`Sharp`**](./src/sharp) - Allows to package the [Sharp](https://sharp.pixelplumbing.com/) library as a Lambda Layer.
- [**`LanceDB`**](./src/lancedb) - Allows to package the [LanceDB](https://lancedb.github.io/lancedb/) library as a Lambda Layer.

## Usage

### MediaInfo

Below is an example of how to use the `MediaInfo` layer.

```typescript
import { MediaInfoLayer } from '@project-lakechain/layers/mediainfo';

class MyStack extends Stack {
  constructor(scope: Construct, id: string) {
    super(scope, id);

    // X64 architecture.
    const layer = MediaInfoLayer.x64(this, 'Layer');

    // ARM64 architecture.
    const layer = MediaInfoLayer.arm64(this, 'Layer');
  }
}
```

### AWS Powertools

Below is an example of hoe to use the AWS Powertools layer within a construct.

```typescript
import { PowerToolsLayer } from '@project-lakechain/layers/powertools';

class MyStack extends Stack {
  constructor(scope: Construct, id: string) {
    super(scope, id);

    // Powertools for TypeScript
    const layer = PowerToolsLayer.typescript().layer(this, 'Layer');

    // Powertools for Lambda (x64).
    const layer = PowerToolsLayer.python().x64(this, 'Layer');

    // Powertools for Lambda (arm64).
    const layer = PowerToolsLayer.python().arm64(this, 'Layer');
  }
}
```

### Sharp

Below is an example of hoe to use the Sharp layer within a construct.

```typescript
import { SharpLayer } from '@project-lakechain/layers/sharp';

class MyStack extends Stack {
  constructor(scope: Construct, id: string) {
    super(scope, id);

    // X64 architecture.
    const layer = SharpLayer.arm64(this, 'Layer');
  }
}
```

### LanceDB

Below is an example of how to use the LanceDB layer within a construct.

```typescript
import { LanceDbLayer } from '@project-lakechain/layers/lancedb';

class MyStack extends Stack {
  constructor(scope: Construct, id: string) {
    super(scope, id);

    // ARM64 architecture.
    const layer = LanceDbLayer.arm64(this, 'Layer');
  }
}
```

---
_Source: https://npm.io/package/@project-lakechain/layers · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
