- Lab
-
Libraries: If you want this lab, consider one of these libraries.
- Cloud
- Security

Creating and Assuming an Administrator AWS IAM Role
In this Hands-on Lab we are going to work through creating a brand-new IAM Role within your AWS Sandbox account. This IAM Role will be granted Administrator Access permissions within the same account.

Lab Info
Table of Contents
-
Challenge
Create IAM Role
Create a brand-new IAM role named
CSAA_AdministratorTest,
and attach the AWS-managed policy titled AdministratorAccess.Use the following template, replacing
%REPLACE_WITH_ACCOUNT_ID%
with your account's ID:{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::%REPLACE_WITH_ACCOUNT_ID%:user/cloud_user" }, "Action": "sts:AssumeRole", "Condition": {} } ] }
-
Challenge
Assume the IAM Role
After creation, test assumption of the IAM role using the Switch Role console option.
-
Challenge
Create & Deploy CloudFormation Template of IAM Role
Create a CloudFormation stack named
AdministratorAccessRole
, using the below YAML template:AWSTemplateFormatVersion: '2010-09-09' Description: 'CloudFormation template to create an IAM role with Administrator access' Resources: CSAAAdministratorRole: Type: AWS::IAM::Role Properties: RoleName: CSAA_Administrator AssumeRolePolicyDocument: Version: '2012-10-17' Statement: - Effect: Allow Principal: AWS: !Sub 'arn:aws:iam::${AWS::AccountId}:user/cloud_user' Action: 'sts:AssumeRole' ManagedPolicyArns: - 'arn:aws:iam::aws:policy/AdministratorAccess'
About the author
Real skill practice before real-world application
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Learn by doing
Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.
Follow your guide
All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.
Turn time into mastery
On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.