Skip to content

aligent/serverless-access-roles-generator

Repository files navigation

Serverless Access Roles Generator

A Serverless framework plugin for:

  • Generate access roles for exported services (generated by serverless-export-resources plugin).
  • Collect and export the result to a specific file.

Serverless configuration

The plugin is configured within the serverless.yaml by providing configuration values as the example below

custom:
  accessRolesGenerator:
    principalAccountId: principal_aws_account_id
    principalRoleName: principal_role_name
    externalId: ${self:service}-${self:provider.stage}

Variables

Variable Usage
principalAccountId Principal Account Id that is used to generate access role.
principalRoleName Principal Role Name that is used to generate access role.
externalId A string to identify the app. Can be a random string.
exportPrefix A string to filter the exported services. Default to aser. If provided, make sure it match the configuration in serverless-export-resources plugin
outDir Destination folder for exporting services' arn, description, and role. Default to dist/data
outFilename Name of the file that services will be exported to. Default to service-outputs.json

References:

  • For more information about principal account & role name, check this AWS document
  • More information about externalId, check this AWS document

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •