-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
The CloudFormation team just released a batch of updates. One is for CloudFormation to support specifying a Permissions Boundary for the AWS::IAM::Role type.
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html
SAM creates an AWS::IAM::Role resource for a Serverless::Function in either in these situations:
a) no Role/Permission properties are specified (this is a basic role with limited privs)
b) when a list of Permissions are specified (these can be IAM Policies or in-line policy statements)
The point of Permissions Boundaries are to help delegate IAM role creation to developers while ensuring the roles they create cannot exceed a set of boundaries defined by the "real" IAM administrators of an account.
https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html
I highly recommend supporting a new property for Serverless::Function called PermissionsBoundary that is passed along to the AWS::IAM::Role that SAM creates in the above situations.
This is a particular good match for SAM because of the intention behind both features.
- SAM is geared at developers and helps to offload some IAM complexity from them.
- Permissions Boundaries are an IAM feature that was designed to get more developers involved in IAM maintenance/development.
This new property would be completely optional and would thus not be a breaking change. It would need no new default. If one is not specified, then the corresponding property on the generated AWS::IAM::Role should also not be specified.