# policy-reducer-for-aws-enterprise-logaccess-role

> Maximum policy size of 10240 bytes exceeded for role EnterpriseLogAccessIamRole

Latest version **1.0.2** (published 2022-12-27) · ISC license · 0 weekly downloads

## Install

```sh
npm install policy-reducer-for-aws-enterprise-logaccess-role
pnpm add policy-reducer-for-aws-enterprise-logaccess-role
yarn add policy-reducer-for-aws-enterprise-logaccess-role
bun add policy-reducer-for-aws-enterprise-logaccess-role
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2022-12-27 |
| First published | 2022-12-19 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Habib Qureshi |
| Maintainers | habibqureshi |
| Keywords | aws, serverless, lambda, node |

## Links

- npm: https://www.npmjs.com/package/policy-reducer-for-aws-enterprise-logaccess-role
- Repository: https://github.com/habibqureshi/ServerlessPolicyReducerForAWSRoles
- Homepage: https://github.com/habibqureshi/ServerlessPolicyReducerForAWSRoles#readme
- Issues: https://github.com/habibqureshi/ServerlessPolicyReducerForAWSRoles/issues
- npm.io page: https://npm.io/package/policy-reducer-for-aws-enterprise-logaccess-role

## 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

- 1.0.2 (latest) — 2022-12-27
- 1.0.1 — 2022-12-19
- 1.0.0 — 2022-12-19

## README

# serverless-policy-reducer-for-aws-roles

> Fixes "EnterpriseLogAccessIamRole - Maximum policy size of 10240 bytes exceeded" error

This plugin works by modifying the Cloudformation stack before packinging.

It searches for the `EnterpriseLogAccessIamRole` resource and modifies the only policy attached to this role.

## Install

```
$ npm i policy-reducer-for-aws-enterprise-logaccess-role
```

## Usage

In your `serverless.yml` file:

```yaml
plugins:
  - policy-reducer-for-aws-enterprise-logaccess-role
```

## Explanation

By default, Serverless framework creates role like:

```json5
{
  Effect: "Allow",
  Action: ["logs:FilterLogEvents"],
  Resource: [
    "arn:aws:logs:us-east-1:854451547444:log-group:/aws/lambda/your-lambda-function-1:*",
    "arn:aws:logs:us-east-1:854451547444:log-group:/aws/lambda/your-lambda-function-2:*",
    "arn:aws:logs:us-east-1:854451547444:log-group:/aws/lambda/your-lambda-function-3:*",
    "arn:aws:logs:us-east-1:854451547444:log-group:/aws/lambda/your-lambda-function-4:*",
    "arn:aws:logs:us-east-1:854451547444:log-group:/aws/lambda/your-lambda-function-5:*",
    "arn:aws:logs:us-east-1:854451547444:log-group:/aws/lambda/your-lambda-function-6:*",
    // multiple lambda
  ],
}
```

When you reach a olicy size of 10240 bytes , deployment will fail as limit got exceeded.

This plugin will replace all lambda arn with \*:

```json5
{
  Effect: "Allow",
  Action: ["logs:FilterLogEvents"],
  Resource: ["*"],
}
```

---
_Source: https://npm.io/package/policy-reducer-for-aws-enterprise-logaccess-role · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
