All jobs / Backend developer / Deployment Basics
Backend developer interview question · 0–1 years
What is the difference between an IAM user and an IAM role?
The strongest answer
A user is a permanent identity with long-lived credentials for a person; a role is a set of permissions any trusted identity — a service, a machine, a person — assumes temporarily, and workloads should use roles rather than keys
Why it works
Exactly. Temporary credentials via roles are why you never bake access keys into a server.
What a good answer covers
- User: long-lived identity, for a person.
- Role: assumed temporarily by a trusted principal.
- Workloads get roles, never stored keys.
- Temporary credentials limit the blast of a leak.
Answers that fall short
- Close, but not the strongest: A role is a group of users
A group collects users; a role is assumed, not joined. - Weak: A user is for people and a role is for admins
Admins are people with more permissions; roles are about how credentials are obtained. - Red flag: They are the same; role is the newer name
They are different mechanisms with different lifetimes.
Who gets asked this
- Backend developer
- Full-stack developer
- DevOps / SRE / cloud
- Data engineer
- Cybersecurity
- Solutions / cloud architect
More Deployment Basics questions
- A security group allows inbound port 443. Do you also need an outbound rule for the responses?
- What is a VPC, in one sentence?
- Why put a load balancer in front of two web servers instead of pointing DNS at one?
- What does autoscaling actually do, and what does it not do?
- Why choose a managed database service over running the database yourself on a VM?
- What is a cold start in a serverless function?
- Cloud is pay for what you use. What is the cost people forget most often?
- The interviewer asks: “How do you log from a service in production?” Strongest answer?