- 10 Sep 2024
- 2 Minutes to read
- Print
AWS Permission Boundary
- Updated on 10 Sep 2024
- 2 Minutes to read
- Print
Permission boundaries are needed in Amazon Web Services (AWS) labs where user accounts are created.
Following the principle of least privilege, the permissions boundary ensures that users you create have only the permissions they require to perform lab tasks.
Use the IAM Dashboard to Create a Group
IAM users belong to user groups and user groups are assigned policies.
Create a group:
In the AWS Management Console, navigate to IAM.
From the IAM dashboard, select Groups from the menu on the left.
Select Create New Group.
For the Group Name, enter a name and then select Next Step.
Select the checkbox next to any policies you wish to apply to the group and then select Next Step.
Review the details of the group and select Create Group.
If you need additional groups, repeat the steps above.
Use the IAM Dashboard to Create Users and Assign Them to their Respective Group
From the IAM dashboard, select Users from the menu on the left.
Select Add User.
For the User name, enter a name for the user.
(Optional) If you would like additional users created, select Add another user.
For the 2nd User name, enter another name and select Add another user .
For the 3rd User name, enter another name.
Select the checkbox next to AWS Management Console access.
Select Next: Permissions.
Select the checkbox next to the group created in previous steps.
Select on the arrow next to Set permissions boundary to expand the available selections.
Select Use a permissions boundary to control the maximum user permissions.
In the search box, enter
LabSecureAccess
and select the policy.Select Next: Tags.
Select Next: Review.
Select Create User.
Use the AWS PowerShell to Create Users
This procedure requires that you know the access key and the secret key for the AWS account you will use to create the user account.
Open Windows PowerShell and run the following command to sign in to AWS.
Set-AWSCredential -AccessKey [AccessKey] -SecretKey [SecretKey]
Run the following command to create the IAM user with the permissions boundary..
New-IAMUser -UserName [UserName] -PermissionsBoundary "arn:aws:iam::@lab.CloudSubscription.Id:policy/LabSecureAccess"
@lab.CloudSubscription.Id is variable that contains the AWS account ID.
Use the AWS CLI to Create Users
This procedure assumes that you have properly configured AWS CLI and have connected to the AWS account by using your access and secret keys.
At the shell prompt, enter the following command to create the IAM user with the permissions boundary.
aws iam create-user --user-name [UserName] --permissions-boundary "arn:aws:iam::@lab.CloudSubscription.Id:policy/LabSecureAccess"