open-index/open-npm huggingface dataset:
npm package: @laconia/adapter
Description: Converts AWS events into your application input
Author: Wisen Tanasa
Latest version: 2.0.0

# @laconia/adapter

> 🛡️ Laconia Adapter - Converts AWS events into your application input

See our [website](https://laconiajs.io) for documentation and API references.

## Install

```
npm install --save @laconia/adapter
```
npm package: @laconia/adapter-api
Description: Converts API Gateway Proxy events into your application input
Author: Wisen Tanasa
Latest version: 2.0.0

# @laconia/adapter-api

> 🛡️ Laconia Adapter API - Converts API Gateway Proxy events into your
> application input

See our [website](https://laconiajs.io) for documentation and API references.

## Install

```
npm install --save @laconia/adapter-api
```
npm package: @laconia/batch
Description: Reads large number of records without Lambda time limit
Author: Wisen Tanasa
Latest version: 2.0.0

# @laconia/batch

> 🛡️ Laconia Batch — Reads large number of records without time limit.

See our [website](https://laconiajs.io) for documentation and API references.

## Install

```
npm install --save @laconia/batch
```
npm package: @laconia/config
Description: Externalizes application secret and configuration
Author: Wisen Tanasa
Latest version: 2.0.0

# @laconia/config

> 🛡️ Laconia Config - Externalizes application secret and configuration

See our [website](https://laconiajs.io) for documentation and API references.

## Install

```
npm install --save @laconia/config
```
npm package: @laconia/event
Description: Parses and responds to incoming events
Author: Wisen Tanasa
Latest version: 2.0.0

# @laconia/event

> 🛡️ Laconia Event - Parses and responds to incoming events

See our [website](https://laconiajs.io) for documentation and API references.

## Install

```
npm install --save @laconia/event
```
npm package: @laconia/invoker
Description: Invokes Lambdas like regular functions
Author: Wisen Tanasa
Latest version: 2.0.0

# @laconia/invoker

> 🛡️ Laconia Invoker — Invokes Lambdas like regular functions

See our [website](https://laconiajs.io) for documentation and API references.

## Install

```
npm install --save @laconia/invoker
```
npm package: @laconia/middleware-lambda-warmer
Description: Integrates Lambda with lambda-warmer
Author: Wisen Tanasa
Latest version: 2.0.0

# @laconia/middleware-lambda-warmer

> 🛡️ Laconia Middleware for Lambda Warmer — Integrates Lambda with lambda-warmer

See our [website](https://laconiajs.io) for documentation and API references.

## Install

```
npm install --save @laconia/middleware-lambda-warmer
```
npm package: @laconia/middleware-serverless-plugin-warmup
Description: Short circuit Lambda run when it's called by serverless-plugin-warmup
Author: Wisen Tanasa
Latest version: 2.0.0

# @laconia/middleware-serverless-plugin-warmup

> 🛡️ Laconia Middleware for serverless-plugin-warmup — Short circuit Lambda run
> when it's called by serverless-plugin-warmup

See our [website](https://laconiajs.io) for documentation and API references.

## Install

```
npm install --save @laconia/middleware-serverless-plugin-warmup
```
npm package: @laconia/s3-config
Description: Retrieves application config from S3
Author: Wisen Tanasa
Latest version: 0.11.0
Deprecated: WARNING: This project has been merged to @laconia/config. Install using @laconia/config to get the latest version.

# @laconia/s3-config

[![CircleCI](https://circleci.com/gh/ceilfors/laconia/tree/master.svg?style=shield)](https://circleci.com/gh/ceilfors/laconia/tree/master)
[![Coverage Status](https://coveralls.io/repos/github/ceilfors/laconia/badge.svg?branch=master)](https://coveralls.io/github/ceilfors/laconia?branch=master)
[![Apache License](https://img.shields.io/badge/license-Apache-blue.svg)](LICENSE)

> 🛡️ Laconia S3 Config - Retrieves application config from S3

## Features

* **Convention over configuration**: Set environment variables and your application config will be made available in `LaconiaContext`

## Install

```
npm install --save @laconia/s3-config
```

## Usage

Set your lambda environment variable with LACONIA_S3CONFIG prefix:

```yml
LACONIA_S3CONFIG_MY_CONFIG: bucketName/path/to/config.json
```

`config.json` will be retrieved from S3, parsed, and made available as `myconfig` in your `LaconiaContet`:

```js
const s3Config = require("@laconia/s3-config");
const laconia = require("@laconia/core");

const handler = async ({ myConfig }) => {
  // use myConfig
};

module.exports.handler = laconia(handler).register(s3Config.envVarInstances());
```

Only JSON file is supported at the moment.

### IAM Permissions

Your Lambda is required to have IAM permissions for `s3:GetObject` action

### API

#### `s3Config.envVarInstances`

Scan all environment variables that starts with LACONIA_S3CONFIG and
return the derived instances. The object will automatically be parsed to javascript
object. The name of the instances will be extracted from the environment variable name,
then converted to camel case.

Example:

```js
const s3Config = require("@laconia/s3-config");
const laconia = require("@laconia/core");

// LACONIA_S3CONFIG_MY_CONFIG env var will turn into myConfig
const handler = async ({ myConfig }) => {
  /* logic */
};

module.exports.handler = laconia(handler).register(s3Config.envVarInstance());
```
npm package: @laconia/ssm-config
Description: Retrieves parameters and secrets from AWS SSM.
Author: Wisen Tanasa
Latest version: 0.11.0
Deprecated: WARNING: This project has been merged to @laconia/config. Install using @laconia/config to get the latest version.

# @laconia/ssm-config

[![CircleCI](https://circleci.com/gh/ceilfors/laconia/tree/master.svg?style=shield)](https://circleci.com/gh/ceilfors/laconia/tree/master)
[![Coverage Status](https://coveralls.io/repos/github/ceilfors/laconia/badge.svg?branch=master)](https://coveralls.io/github/ceilfors/laconia?branch=master)
[![Apache License](https://img.shields.io/badge/license-Apache-blue.svg)](LICENSE)

> 🛡️ Laconia SSM - Retrieves parameters and secrets from AWS SSM.

## Features

* **Convention over configuration**: Set environment variables and your parameters and secrets will be made available in `LaconiaContext`

## Install

```
npm install --save @laconia/ssm-config
```

## Usage

Set your lambda environment variable with LACONIA_SSMCONFIG prefix:

```yml
LACONIA_SSMCONFIG_MY_SECRET: /path/to/my/secret
```

`/path/to/my/secret` parameter will be retrieved from SSM, decrypted, and made available as
`mySecret` in your `LaconiaContext`:

```js
const ssmConfig = require("@laconia/ssm-config");
const laconia = require("@laconia/core");

const handler = async ({ mySecret }) => {
  // use mySecret
};

module.exports.handler = laconia(handler).register(ssmConfig.envVarInstances());
```

## Caching

All of the SSM parameters retrieved are cached by default i.e. subsequent calls to your warm
Lambda will not hit SSM. To understand more on the caching behaviour, go to `@laconia/core`'s
documentation.

### IAM Permissions

Your Lambda is required to have IAM permissions for `SSM:GetParameters` action

### API

#### `ssmConfig.envVarInstances`

Scan all environment variables that starts with LACONIA_SSMCONFIG and
return the derived instances. The name of the instances
will be extracted from the environment variable name, then
converted to camel case.

[SSM#getParameters](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/SSM.html#getParameters-property)
is used to retrieve the parameters. All parameters are decrypted by default.

Example:

```js
const ssmConfig = require("@laconia/ssm-config");
const laconia = require("@laconia/core");

// LACONIA_SSMCONFIG_SOME_SECRET env var will turn into someSecret
const handler = async ({ someSecret }) => {
  /* logic */
};

module.exports.handler = laconia(handler).register(ssmConfig.envVarInstances());
```
npm package: @laconia/xray
Description: Enables X-Ray integration to Laconia
Author: Wisen Tanasa
Latest version: 2.0.0

# @laconia/xray

> 🛡️ Laconia X-Ray - Enables X-Ray integration to Laconia

See our [website](https://laconiajs.io) for documentation and API references.

## Install

```
npm install --save @laconia/xray
```

## Usage

@laconia/xray postProcessor will scan through all of the instances registered in `LaconiaContext` 
and call `AWSXRay.captureAWSClient()` and `AWSXRay.captureAWSv3Client()` on them.

Example:

```js
const laconia = require("@laconia/core");
const xray = require("@laconia/xray");

exports.handler = laconia(app).postProcessor(xray.postProcessor());
```

## API

#### `xray.postProcessor`

Calls `AWSXRay.captureAWSClient()` to all registered AWS service objects.

Example:

```js
const laconia = require("@laconia/core");
const xray = require("@laconia/xray");

exports.handler = laconia(app).postProcessor(xray.postProcessor());
```