Complete the code to create a new AWS account using AWS Organizations.
response = client.create_account(AccountName=[1], Email='user@example.com')
You must provide the account name as a string in quotes.
Complete the code to list all AWS accounts in your organization.
accounts = client.list_accounts()[1]The list_accounts() method returns a dictionary. Use .get('Accounts') to access the accounts list.
Fix the error in the code to attach a policy to an AWS account.
client.attach_policy(PolicyId=[1], TargetId='123456789012')
PolicyId must be a string with quotes, like 'p-abcdefg123'.
Fill both blanks to create a new organizational unit (OU) under a root.
response = client.create_organizational_unit(ParentId=[1], Name=[2])
ParentId and Name must be strings with quotes.
Fill the blanks to tag an AWS account with a key and value.
client.tag_resource(ResourceId=[1], Tags=[[2]])
ResourceId is the account ID as a string. Tags is a list of dictionaries with Key and Value.
