documentation
Using a Read-Only AWS IAM User
Create a least-privilege IAM user that can call ec2:DescribeInstances, then connect it to cafe.io so we can surface EC2 metadata without write access.
prerequisites
- Administrator access to the AWS account that owns the EC2 instances you want cafe.io to list.
- A cafe.io team with permission to manage cloud providers.
- A secure password manager or secrets vault to store AWS access keys.
1. sign in to aws console
- Visit console.aws.amazon.com and sign in with an administrator credential.
- In the AWS search bar, type IAM and open the IAM service dashboard.
2. create a least-privilege policy
- In IAM, navigate to Policies → Create policy.
- Choose the JSON tab and replace the sample policy with:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "CafeioDescribeInstancesOnly",
"Effect": "Allow",
"Action": "ec2:DescribeInstances",
"Resource": "*"
}
]
}
- (Optional) Add tags for tracking or cost allocation.
- Choose Next, give the policy a recognizable name such as CafeioPolicy, review, then create the policy.
3. create an iam user & attach the policy
- In IAM, go to Users → Create user.
- Enter a descriptive user name such as
cafeio-readonly-userand clickNext. - Choose Attach policies directly and select the policy from step 2.
- Complete the remaining prompts (tags optional) and create the user.
4. generate access keys
- From the success screen, choose Create access key, or open the new user and select the Security credentials tab.
- Select Third-party service as the use case.
- Acknowledge the secret key storage warning and continue.
- Download the
.csvfile or copy the Access key ID and Secret access key immediately; the secret will not be displayed again.
5. connect the credentials to cafe.io
- Sign in to Remmey and open your team.
- Select Providers in the sidebar, then choose Connect provider.
- Set Provider type to AWS.
- Paste the IAM user’s Access key ID into the access key field and the Secret access key into the secret key field.
- Add a descriptive name (for example, the AWS account alias or region) and an optional description.
- Select Connect provider to save. cafe.io will now call
DescribeInstanceswith these credentials.