Creating an AWS IAM Authentication Method

What is Cloud IAM Authentication?

Cloud IAM authentication, such as with AWS, is used with Akeyless to eliminate secret zero issues, enable the use of short-lived credentials, enforce least-privilege and zero-trust access, natively authenticate machine workloads, and centralize multi-account and multi-cloud secrets.

Some of the use cases Cloud IAM authentication helps with are DevOps automations such as CI/CD pipelines, multi-cloud and hybrid workloads, and secure AI and automation agents.

AWS IAM

In this tutorial, we’re going to learn how to create an AWS IAM auth method in order to authenticate to Akeyless from an AWS environment. This type of authentication is meant for machine to machine interaction where your AWS machines can communicate with Akeyless.

AWS IAM authentication provides an automated flow to retrieve an Akeyless token for IAM principals and AWS services or resources and is used only for workload authentication.

Create an AWS IAM Authentication Method

To create an AWS IAM auth method, click Users & Auth Methods in the left-side menu. Then click "New".

Choose "AWS IAM" and click "Next".

Then, choose a name and click "Next"

Next, add the AWS account ID that this auth method will be connected to. You also have multiple other options that can be used to tighten access for this user based on specific parameters.

Note that this auth method has no Access Role, so we will go to Access Roles in the left menu, choose the role we want, or create a new one, and click the Associate button to associate the auth method and then click "Save".

In this case, our role enables the user to read and list items and nothing more.

To test this, open the terminal inside your AWS EC2 machine, install the Akeyless CLI and run the akeyless configure command with the auth method's access id. Then run the akeyless get cloud identity command and if it returns a token, you are authenticated.

You can then run the akeyless list-items command as an example and see the items you have access to. And you can securely access your Akeyless secrets from AWS.


Custom Footer Solution