- IAM, VPC & AWS Free Tier Account
Index
- Introduction
- Best practice for root accounts
- IAM Groups
- Introduction
An IAM user is an entity that represents a person or service
- Can be assigned:
- An access key ID and secret access key for programmatic access to the AWS API, CLI, SDK, and other development tools
- A password for access to the management console
- By default users cannot access anything in your account
- The account root user credentials are the email address used to create the account and a password
- The root account has full administrative permissions and these cannot be restricted
- Best practice for root accounts:
- Ø Don’t use the root user credentials
- Don’t share the root user credentials
- Create an IAM user and assign administrative permissions as required
- Enable Multi-Factor Authentication (MFA)
- IAM users can be created to represent applications and these are known as “service accounts”
- You can have up to 5000 users per AWS account
- Each user account has a friendly name and an Amazon Resource Name (ARN) which uniquely identifies the user across AWS
- You should create individual IAM accounts for users (best practice not to share accounts)
- A password policy can be defined for enforcing password length, complexity etc. (applies to all users)
IAM Groups
- Groups are collections of users and have policies attached to them
- A group is not an identity and cannot be identified as a principal in an IAM policy
- Use groups to assign permissions to users
- Use the principal of least privilege when assigning permissions
- You cannot nest groups (groups within groups)
IAM Roles
- Roles are created and then “assumed” by trusted entities and define a set of permissions for making AWS service requests
- With IAM Roles you can delegate permissions to resources for users and services without using permanent credentials (e.g. user name and password)
- IAM users or AWS services can assume a role to obtain temporary security credentials that can be used to make AWS API calls
IAM Policies
- Policies are documents that define permissions and can be applied to users, groups and roles
- ØPolicy documents are written in JSON (key value pair that consists of an attribute and a value)
- All permissions are implicitly denied by default
- The most restrictive policy is applied
- The IAM policy simulator is a tool to help you understand, test, and validate the effects of access control policies
- The Condition element can be used to apply further conditional logic
Authentication Methods
IAM Access Keys
- combination of an access key ID and a secret access key
- These can be used to make programmatic calls to AWS when using the API in program code or at a command prompt when using the AWS CLI or the AWS PowerShell tools
- You can create, modify, view or rotate access keys
- When created IAM returns the access key ID and secret access key
- The secret access is returned only at creation time and if lost a new key must be created
- Ensure access keys and secret access keys are stored securely
- Users can be given access to change their own keys through IAM policy (not from the console)
- You can disable a user’s access key which prevents it from being used for API calls
Multi-Factor Authentication in AWS
- Something you know:
- Something you have:
AWS Security Token Service (STS)
TODO- STS(user) vs ROLE(sefvice)
- The AWS Security Token Service (STS) is a web service that enables you to request temporary, limited-privilege credentials for IAM users or for users that you authenticate (federated users)
- By default, AWS STS is available as a global service, and all AWS STS requests go to a single endpoint at https://sts.amazonaws.com
- All regions are enabled for STS by default but can be disabled
- The region in which temporary credentials are requested must be enabled
- Credentials will always work globally
AWS Global Infrastructure
