0
0
AWScloud~10 mins

Why account management matters in AWS - Test Your Understanding

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a new AWS account using AWS Organizations.

AWS
response = client.create_account(AccountName=[1], Email='user@example.com')
Drag options to blanks, or click blank then click option'
A'MyNewAccount'
BMyNewAccount
Caccount_name
D123456789012
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting to put quotes around the account name.
2fill in blank
medium

Complete the code to list all AWS accounts in your organization.

AWS
accounts = client.list_accounts()[1]
Drag options to blanks, or click blank then click option'
A.items()
B.Accounts
C['Accounts']
D.get('Accounts')
Attempts:
3 left
💡 Hint
Common Mistakes
Using dot notation instead of .get() for dictionary keys.
3fill in blank
hard

Fix the error in the code to attach a policy to an AWS account.

AWS
client.attach_policy(PolicyId=[1], TargetId='123456789012')
Drag options to blanks, or click blank then click option'
A123456789012
Bpolicy_id
C'p-abcdefg123'
D'123456789012'
Attempts:
3 left
💡 Hint
Common Mistakes
Using an unquoted variable or number for PolicyId.
4fill in blank
hard

Fill both blanks to create a new organizational unit (OU) under a root.

AWS
response = client.create_organizational_unit(ParentId=[1], Name=[2])
Drag options to blanks, or click blank then click option'
A'r-examplerootid'
B'MyOU'
CMyOU
Dr-examplerootid
Attempts:
3 left
💡 Hint
Common Mistakes
Leaving out quotes around string parameters.
5fill in blank
hard

Fill the blanks to tag an AWS account with a key and value.

AWS
client.tag_resource(ResourceId=[1], Tags=[[2]])
Drag options to blanks, or click blank then click option'
A'123456789012'
B{'Key': 'Environment', 'Value': 'Production'}
C{'Key': 'Owner', 'Value': 'TeamA'}
D'arn:aws:organizations::123456789012:account/o-exampleorgid/123456789012'
Attempts:
3 left
💡 Hint
Common Mistakes
Using ARN instead of account ID for ResourceId.
Not formatting Tags as a list of dicts.