Section4: IAM & AWS CLI Flashcards
What is IAM?
- IAM = Identity and Access Management, Global service
- Root account is the default account.
- Users are people in your organization/company.
- Groups only contain users and not other groups.
- Users dont have to belong to a group and users can be in multiple groups.
IAM: Permissions
- Users or Groups are assigned a JSON document called policies.
- Policies define the permissions of the users
- In AWS you apply the least privileges principle(dont give more permissions than a user needs)
IAM Policies Structure
Consist of:
- Version: Example "2012-10-17" - Id: Example "S3-Account-Permissions" - Statement
Statment consist of:
- SID: The id of the statement. Example: "1" - Effect: Exmaple "Allow" - Principal: sccount/user/role to which the policy applies Example "arn:aws:iam::12324354:root - Action: list of actions this policy allows or denies - Resource: list of resources to which the actions applied to Example "myBucket(Storage)" - Condition: conditions for when the policy is in effect
What is IAM MFA?
- MFA = Multi Factor Authentication(Password + security device)
What MFA devices do you get?
- Virtual MFA device Exampe Google Authenticator
- Universal 2nd Factor(U2F) Security Key. Its a physical device.
- Hardware Key Fob MFA Device. Also physical device
- Hardware Key Fob MFA Device for AWS GovCloud. Also physical device
What are the 3 ways to access AWS?
- AWS Management Console
- AWS Command line interface(CLI)
- AWS Software Developer Kit(SDK)
How to get access using the AWS CLI?
1) Create access keys for user
2) In cmd, type “aws configure”.
3) Enter your “Access Key ID”
4) Enter “Secret Access Key”
5) Enter default region name”
6) Enter “output format”, just press enter
What is AWS Cloud Shell?
- it is like AWS CLI but build into the AWS console.
- It is only available for certain regions.
What is a IAM Role?
- Giving access the services to perform a particular task.
What IAM Security Tools do you get?
1) IAM Credentials report(account level)
- a report that list all account’s users and the status of their credentials
2) IAM Access Advisor(user-level)
- shows service permissions granted to a user and when last was it accessed
IAM Guidelines & Best Practices
- Dont use the root account except for account setup
- One physical user = One AWS user
- Assign users to group and assign permissions to groups
- Create a strong password policy
- Use and enforce the use of Multi Factor Authentication(MFA)
- Create and use Roles for giving permissions to AWS services
- Use Access Keys for Programmatic Access(CLI/SDK)
- Audit permissions of your account with the IAM Credentials Report.
- Never share IAM users & Access Keys