How to write a policy for generating access key and secret access key? I am tying to use instance profile to securely deliver aws credentials
How to write a policy for generating access key and secret access key? I am tying to use instance profile to securely deliver aws credentials
You do not write a policy for generating access keys via IAM Roles. Instead you create a role, which contains a policy, and assign that to AWS services such as EC2 Instances. This can be completed using the AWS console, CLI or SDK.
This link will help you understand how to use IAM Roles:
IAM Roles
Then when the AWS service runs, example EC2 Instance, the credentials from the IAM Role will be available via the instance metadata. All AWS SDKs know how to automatically obtain these credentials from the metadata.
This article will help you understand how to manage credentials:
Credentials Management