IAM is a very resourceful service. When used properly, the combination of user groups and security policies lets you implement very complex rules. We will create a new managed policy to grant the necessary permissions and attach it to a new group of which all users should be a part.
We will do that in the iam-groups-cf-template.py script we just created in the previous section:
- Reopen the script in your editor.
- We will first need to import a number of classes. At the top of the script, at around Line 5, we are going to add to the troposphere import section, the import of Join and Ref as follows:
from troposphere import ( Template, Join, Ref, )
- In addition, at around Line 11, we are going to add ...