What permissions should an AWS cost tool ask for?
Connecting a cost tool means giving a vendor a way into your client's AWS account. This guide covers what the tool needs, what it should never have and what to ask before anyone deploys a role.
The short version
- A role with an External ID. Never access keys.
- Read-only. Any write action needs a plain reason.
- No access to the contents of files or databases.
- A policy you can read before you deploy it.
1. A role, not keys
A tool can reach an AWS account in two ways. It can hold an access key that belongs to a user in the account. Or it can assume a role that the account owner creates for it.
Choose the role. A key is a long-lived secret that someone has to store. If the vendor is breached the key goes with it. A role has no stored secret. The tool gets temporary credentials that expire within the hour.
The role should also require an External ID. That's a value unique to your connection. It stops another customer of the same vendor from pointing the tool at your client's account. AWS calls this the confused deputy problem and recommends the External ID for it.
2. What a cost tool needs to read
- Billing. Cost Explorer data and AWS price lists.
- Inventory. Lists and descriptions of servers, disks, snapshots, databases, load balancers and network parts.
- Usage. CloudWatch metrics such as processor use.
- Commitments. Reserved Instance and Savings Plans coverage and use.
- Storage settings. Bucket names, sizes and archive rules.
- Change history. CloudTrail events if the tool shows who changed what.
Almost all of these are actions whose names start with Describe, List or Get.
3. What it should never have
- A wildcard on everything. A policy with
*:*can do anything in the account. - Actions that change resources. Stop, terminate, modify and delete have no place in a tool that only reports.
- Actions that spend money. Buying a Reserved Instance or a Savings Plan is a purchase in your client's name.
- Access to contents. Listing a bucket's objects is different from reading them. A cost tool has no reason to read files, database rows or secrets.
- Identity changes. Creating users, keys or policies.
Watch for AWS's managed policy called ReadOnlyAccess. It sounds safe. It also lets the holder read the contents of S3 objects. A policy written for the tool is better than a broad managed one.
4. When a write action is fair
Some tools ask for one or two write actions and can explain them. Setting up a detailed billing export is the common case. The tool creates an export that AWS delivers to a bucket in the client's own account.
That can be reasonable. It should be optional and named action by action. It should be limited to that one job.
5. Nine questions to ask a vendor
- Is the exact policy public so we can read it before we deploy?
- Do you use a role with an External ID or do you need access keys?
- Does the policy contain any wildcard on all services?
- Which write actions does it contain and what is each one for?
- Can it read the contents of files, databases or secrets?
- How do we end access and how fast does it take effect?
- Can the permissions widen without us doing anything?
- What do you store about the account and for how long?
- What does the tool cost on the AWS side? Cost Explorer charges a cent per request.
Put the answers in front of your client's security team. A vendor who answers all nine in writing saves you a week.
Read ours before you connect
The Cloud Stratus policy is public and the security page explains every line of it. Then connect one client account free for 90 days.