@interlace/serverless
IAM Roles Per Function

IAM Roles Per Function

Per-function IAM roles, strict + typed.

Overview

@interlace/serverless-iam-roles-per-function is a TypeScript-native replacement for serverless-iam-roles-per-function (community v3.2.0, last published 2021-05-21). It keeps the same config keys for drop-in compatibility, adds first-class TypeScript config types, four CLI commands the community plugin lacks, EventBridge + S3 auto-permissions, and strict statement validation. Supports Serverless Framework v3 and v4.

npm install --save-dev @interlace/serverless-iam-roles-per-function
pnpm add -D @interlace/serverless-iam-roles-per-function
yarn add -D @interlace/serverless-iam-roles-per-function
bun add -d @interlace/serverless-iam-roles-per-function

Why switch?

Headline differences. The full source-backed comparison lives in the migration guide.

Comparison data pending. The structured comparison JSON for iam-roles-per-function hasn't been committed yet. The narrative comparison above (or in the migration page) is the source of truth until then.

Quick start

serverless.yml
plugins:
  - '@interlace/serverless-iam-roles-per-function'
serverless.ts
const serverlessConfiguration = {
  plugins: ['@interlace/serverless-iam-roles-per-function'],
};
serverless.js
module.exports = {
  plugins: ['@interlace/serverless-iam-roles-per-function'],
};
serverless.json
{
  "plugins": ["@interlace/serverless-iam-roles-per-function"]
}

See installation for the full setup, configuration for every option, and recipes for common patterns.

Where to next

DocWhat's there
InstallationInstall, smoke-test, verify
ConfigurationEvery config key
CLI commandsSubcommand reference
RecipesCommon how-tos
MigrationSwitching from serverless-iam-roles-per-function
BenchmarkReproducible scorecard vs community
ChangelogRelease history
FAQEdge cases

On this page