Currently, we use ec2 instances in our environment.
For the purpose to avoid credentials exposed to source code, we use IAM Roles to delegate access to users, applications, or services.
However, there are also several on-premises intances in our envioronment. Can they also use IAM role just like what EC2 does?
I know that CodeDeploy support to register on-premises instances with IAM roles, but in this way, it is code deploy agent to manage IAM roles to get credentials.
So, my questions is that:
How does applications on on-premise instances deployed by CodeDeploy get credentials? e.g. get object from S3...
Can I also use IAM on my local machine and applications to get credentials just like on an EC2 do?