Rule number one: don’t share your AWS account with anyone, least of all the root account. If you’re handing your credentials to other people or third parties today, this post is for you: I explain how IAM works, how to create your admin user, and how to give each person or application only the permissions it needs.
Note: the video is in Spanish (Spanish audio only).
The principle of least privilege
The right way is to create users with exactly the permissions their job requires. Some examples:
- A solutions architect can manage the account’s services but not see billing.
- The finance team doesn’t need to launch EC2 instances: give them a profile that only reaches billing.
- A website that uploads images to an S3 bucket only needs that permission, through an access key.
Granting permissions this granularly is the principle of least privilege: it keeps your account secure and gives you flexibility to control access.
What IAM is
AWS IAM is the service for managing users, groups and roles, which you grant permissions to. In AWS, permissions are called policies.
Create your admin user
First, secure your root account (I show how in this video). Use the root account only for critical security or billing matters; for everyday work, use an admin user:
- Go to IAM → Users → Create user.
- Give it a name you’ll recognize, such as your own.
- Check that it has access to the AWS console.
- AWS recommends IAM Identity Center, which is the best way to manage users. In this video I choose IAM user to learn how to attach policies and use access keys, which I later use to deploy with CloudFormation.
- Choose the password: set it yourself or let AWS generate it. If the account is for someone else, check must change password at next sign-in, so only that person knows theirs.
- Under permissions, choose Attach policies directly and select AdministratorAccess.
- Review the summary and create the user.
- Copy the sign-in details. To log in as that user, use the sign-in URL AWS gives you: the account ID fills in automatically.
And turn on MFA (multi-factor authentication) on every account you manage.
Managed and custom policies
AWS comes with a long list of ready-made policies. For example, if your company uses Grafana to chart CloudWatch metrics, there are predefined permissions for that.
You can also write your own policies to be even more granular: a user who can launch EC2 instances but not delete them, or the other way around.
Groups
A group also gets policies, but you can’t sign in to the console with it: you put users in the group and they inherit its permissions. That way several people share exactly the same permissions.
Roles
A role is assumed by someone or something: a user, an EC2 instance, or even users in another account.
- A role for your EC2 instances that lets them upload images to an S3 bucket. Several instances can use the same role.
- A role for a user in a third-party account, so they can read files from an S3 bucket. For example, when you have historical data in S3 and a data analytics company needs to work with it.
Access keys
To run actions in your account from the command line or from an external application, you create access keys. A web application that reads and writes files in S3 uses one. Those keys have the same permissions as the user who created them, not one more.
Note: if your application runs inside AWS (on EC2, Lambda or containers), give it a role instead of access keys: the credentials are temporary and you don’t have to store them anywhere. If you do use access keys, keep them out of your code and rotate them.
With users, groups, roles and policies set up properly, every person and every application has only the access it needs.
Found it useful? Watch the full video on YouTube (in Spanish) and subscribe to @Andrevops for more videos like this one.




