If I log in into EC2 instance and try to issue the command
aws glacier list-vaults --account-id ######
I get an error that the user doesn't have permission, I was able to give the IAM users the right permissions and it works perfectly from the local machine. But it doesn't work from within the EC2 instance.
Where do I add the permission? Who is the actual user that issue the command from withing an EC2 instance (for example "aws s3" commands work without a problem)