A developer needs read-only access to one S3 bucket from their laptop. How do you grant it without creating long-lived access keys?
BeginnerScenarioIAM, Organizations and Multi-Account
Answer
Situation read → Human access to AWS should be federated and short-lived; an IAM user with static keys is the thing auditors flag first.
What I'd do →
- Put the person in IAM Identity Center (SSO) and create a permission set with a scoped policy for that bucket
- Assign the permission set to the user or group for the target account
- Developer runs
aws configure ssothenaws sso login --profile dev - Verify with
aws s3 ls s3://app-reports --profile devandaws sts get-caller-identity
Why → SSO credentials expire in hours, access is revoked centrally when the person leaves, and CloudTrail shows the SSO role session name.
Interview tip → Say "no IAM users for humans" early; it signals you know the modern baseline.
More on IAM, Organizations and Multi-Account
An EC2 application needs to write to DynamoDB. Where do the credentials come from?BeginnerSecurity wants to know who deleted a production S3 bucket yesterday. How do you find out?BeginnerYou must stop anyone in a member account from disabling CloudTrail, even account admins. What do you use?BeginnerA cross-account role assumption fails with AccessDenied even though the target role trusts the source account. What do you check?IntermediateDesign access for a CI pipeline in GitHub Actions to deploy to AWS without storing AWS keys in GitHub.IntermediateHow would you let developers create IAM roles for their apps without letting them escalate to admin?Intermediate