Module 2 - Account Security Flashcards
What is AWS IAM?
AWS Identity & Access Management, a web service that helps you securely control access to AWS resources.
What is an IAM user? How many can you have per AWS account?
An entity that allows people to sign in to the Management Console (or CLI) to make requests. These exist within one AWS account but each has its own credentials.
5000 users per account max.
What do you need to access the Management Console or CLI?
A user with a username and password, and up to 2 access keys.
How do you grant permissions to an IAM user? E.g. I need to give a dev access to a resource. How would I go about doing that?
- Make it a member of a user group that has appropriate permission policies attached. (This is the recommended method.)
- Attach policies to the user
- Clone the permissions of an existing IAM user, which automatically makes the new user a member of the same user groups and attaches all the same policies
What is a security principal?
An entity that can request an action or operation on an AWS resource, e.g. IAM user. It can also be a service or an identity outside of AWS (such as Google login).
What is a root user?
The user with complete access to services and resources. NOT for day-to-day operations. This account cannot be restricted.
What is the principle of least privilege?
Grant users only the level of access they require and nothing more.
How do you manage access in AWS, broadly?
You create policies and attach them to users, groups of users, roles, or to specific services.
Note: a group is not an identity itself and cannot be a principal in a policy.
How are most policies stored in AWS? I.e. what format?
As JSON.
What is a federated user?
An external identity that does not have an AWS account. You assign it a role to grant temporary access.
When do you need an access key ID and secret access key?
When you need programmatic access, such as API calls or using the CLI. If you are just using the Management Console then you only need a username and password.
Why might you use the AWS CLI?
You can control multiple AWS services from the command line and automate them through scripts.
What is an IAM role?
A way to deliver temporary credentials. Users can assume a role without sharing credentials, and permissions are only valid when operating under that role. Like limited sudo access to AWS.
Commonly used to allow EC2 instances or Lambda to call services on your behalf.
How do you assume an IAM role? How is access granted when you assume a role?
Use the console or CLI and use the AssumeRole API. This calls AWS Security Token Service (AWS STS) which provides a temporary access key ID, a secret access key, and a security token. Then you use those credentials to access resources.
What are the different policy types? There are 4.
- Identity-based policies – users, groups, and roles.
- Resource-based policies – E.g. Amazon S3 bucket policies and IAM role trust policies.
- AWS Organizations Service Control Policies (SCPs) – define the maximum permissions for account members of an organization or organizational unit (OU).
- IAM permissions boundaries - set the maximum permissions that an IAM entity can receive.
What is an identity-based policy?
A document that controls what actions a user can perform, on what resources, under what conditions.
What kinds of identity-based policies are there?
Managed: standalone policies that you attach to multiple users/groups/roles, managed by AWS or the customer.
Inline: Policies that you add directly to a single user, group, or role. These maintain a strict one-to-one relationship between a policy and an identity.
How does a resource-based policy work?
They grant the principal permission to do specific actions under specific circumstances. These are inline policies, never managed.