mrserverless/serverless-golang

Narrow down Kinesis example IAM role permissions

mrserverless opened this issue · 2 comments

Current permission are too open https://github.com/yunspace/serverless-golang/blob/master/examples/aws-golang-kinesis/serverless.yml#L14

Provide more realistic and production ready permissions.

For now I'm going to just stick to the out of box iam role generation from serverless.yml. Of course any external plugins should also work

Updated the Kinesis example to have more granular permissions: https://github.com/yunspace/serverless-golang/blob/master/examples/aws-golang-kinesis/serverless.yml#L14-L19

  iamRoleStatements:
      - Effect: "Allow"
        Resource: ${env:AWS_KINESIS_ARN}
        Action:
          - "kinesis:GetRecords"
          - "kinesis:GetShardIterator"
          - "kinesis:DescribeStream"
          - "kinesis:ListStreams"
          - "kinesis:PutRecord"
          - "kinesis:PutRecords"