JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2654
  • Score
    100M100P100Q133625F
  • License MIT

Package Exports

  • @serverless/aws-iam-role

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@serverless/aws-iam-role) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

AwsIamRole

A serverless component that provisions an IAM Role.

Usage

Declarative


name: my-aws-role
stage: dev

AwsIamRole@0.1.2::my-role:
  name: my-role
  service: lambda.amazonaws.com
  policy:
    arn: arn:aws:iam::aws:policy/AdministratorAccess
  regoin: us-east-1

Programatic

npm i --save @serverless/aws-iam-role
const role = await this.load('@serverless/aws-iam-role')

const inputs = {
  name: 'my-role',
  service: 'lambda.amazonaws.com',
  policy: {
    arn: 'arn:aws:iam::aws:policy/AdministratorAccess'
  },
  region: 'us-east-1'
}

await role(inputs)