AWS IAM Users- using AWS Tools for Windows Powershell

Creating Users –To create a user, use the New-IAMUser cmdlet.

New-IAMUser – UserName ‘TestUser’

 

Get Users – Get details of a user by using Get-IAMUser cmdlet.
If you do not pass the -UserName parameter, it will retrieve the details of the user currently logged in.

Get-IAMUser

 

Update Users – If you want to edit a user’s username or path,  you use the Update-IAMUser cmdlet.

Update-IAMUser -username ‘TestUser’ -NewUserName ‘TestUser2’

Remove Users – To remove users use the Remove-IAMUser cmdlet.
Calling Get-IAMUser for TestUser2 returns an error message that the user with name TestUser2 cannot be found.
This confirms the TestUser2 user was removed successfully.

Remove-IAMUser -UserName ‘TestUser2’ -Force

 

No Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Amazon Web Services
Copy All files from an S3 Bucket to your PC

This powershell script copies the contents of an S3 bucket to your pc. # Your account access key – must have read access to your S3 Bucket $accessKey = “YOUR-ACCESS-KEY” # Your account secret access key $secretKey = “YOUR-SECRET-KEY” # The region associated with your bucket e.g. eu-west-1, us-east-1 etc. …

Amazon Web Services
Common AWS EC2 CLI commands

The AWS GUI console is a basic way to manage AWS EC2 instances. If you are performing repetitive tasks on multiple instances then using the CLI is a better way to manage. All these commands assume you have the necessary permissions to run. This is some more common CLI examples: …

Amazon Web Services
Using multiple IAM profiles through AWS CLI

We have several different environments hosted in different Amazon accounts so need to create IAM accounts for each. So switching between different IAM accounts is very useful. The AWS CLI allows you to store different profiles. If you haven’t installed the CLI already, then follow Amazon’s guide here. Configuring Multiple …