Reputation: 65
When associating an EC2 instance with a IAM role via "aws ec2 associate-iam-instance-profile" it seems that all Linux users on the instance can make API calls via those credentials. Is there a way to leverage the IAM instance profile but restrict access to specific users within the OS?
Upvotes: 0
Views: 916
Reputation: 19
Direct way is not possible but there is a way that you can use aws profile and ask user to use that aws profile or you can bound that user to use aws profile.
Please follow link, use same AWS account while creating role. https://repost.aws/knowledge-center/s3-instance-access-bucket
Upvotes: 0
Reputation: 270224
No, this is not possible.
The EC2 instance metadata is available to anyone who can access the URL, which typically means any user and any app on the computer.
It sounds like you will need to store credentials against each application, by using a credentials file.
Upvotes: 0