Update Your AWS Connection
Update your AWS connection when CloudZero publishes new permission templates or when AWS changes its billing and cost management permissions. Keeping permissions up to date ensures CloudZero has access to the latest cost and resource data needed for accurate recommendations and new features. You control the permissions you grant CloudZero, and connections do not update themselves.
CloudZero publishes all IAM policies and CloudFormation templates as open source in the provision-account repository. The sections below use those published templates.
Automated connections
If you connected using the automated method, update the cloudzero-connected-account CloudFormation stack. Choose either the AWS Console or the AWS CLI.
Option A: AWS Console
- Open the AWS CloudFormation console in the AWS account where the stack is deployed.
- Find the
cloudzero-connected-accountstack. If you do not see it, uncheck View Nested and search forcloudzero. - Select Update.
- Select Replace current template.
- Paste the following URL into the Amazon S3 URL field:
https://cz-provision-account.s3.amazonaws.com/latest/services/connected_account.yaml
- Select Next three times to reach the review page.
- Check both boxes in the Capabilities section:
- I acknowledge that AWS CloudFormation might create IAM resources with custom names.
- I acknowledge that AWS CloudFormation might require the following capability: CAPABILITY_AUTO_EXPAND
- Select Submit.
Option B: AWS CLI
The following command updates the stack while preserving your existing parameters. It requires the AWS CLI and the jq package.
aws cloudformation update-stack \
--stack-name cloudzero-connected-account \
--template-url https://cz-provision-account.s3.amazonaws.com/latest/services/connected_account.yaml \
--parameters "$(aws cloudformation describe-stacks --stack-name cloudzero-connected-account | jq '.Stacks[0].Parameters')"Manual connections
If you connected using the manual method, update the IAM role's trust policy and inline policy. Choose either the AWS Console or the AWS CLI.
Manual connections must update both the trust policy and the inline policy. The trust policy must include two CloudZero account IDs:
061190967865and559846027439. Automated connections pick this up automatically when you update the stack.
Option A: AWS Console
- Open the AWS IAM console in the AWS account where the role is deployed.
- Search for
cloudzeroin the Roles list. Select the role with Trusted entities containingAccount: 061190967865. - Update the trust policy:
- On the Trust relationships tab, select Edit trust policy.
- In the
Principalsection, ensure both CloudZero account IDs are listed. Keep your existingsts:ExternalIdcondition unchanged:
"Principal": {
"AWS": [
"arn:aws:iam::061190967865:root",
"arn:aws:iam::559846027439:root"
]
}- Select Update policy.
- Update the inline policy:
- On the Permissions tab, select the attached Customer inline policy.
- Select the JSON tab.
- Replace the policy content with the latest version for your account type:
- Select Review policy, then Save changes.
- Add the
AWSBillingReadOnlyAccessmanaged policy:- On the Permissions tab, select Add permissions and select Attach Policies.
- Search for
AWSBillingReadOnlyAccess. - Check the box next to the policy name.
- Select Add permissions.
Option B: AWS CLI
These commands require the AWS CLI and the jq package.
- Find your role name, policy name, and External ID:
aws iam list-roles | jq -r -e '.Roles | map(select(.AssumeRolePolicyDocument.Statement[0].Principal.AWS == "arn:aws:iam::061190967865:root")) | map(.RoleName)[] | .'
aws iam list-role-policies --role-name <role-name> | jq -r -e '.PolicyNames[]'
aws iam get-role --role-name <role-name> | jq -r '.Role.AssumeRolePolicyDocument.Statement[0].Condition.StringEquals."sts:ExternalId"'- Replace
<role-name>,<policy-name>, and<external-id>in the block below with the values from step 1. For<policy-url>, use the URL that matches your account type:- Billing (Payer):
https://cz-provision-account.s3.amazonaws.com/latest/policies/master_payer.json - Resources (Member):
https://cz-provision-account.s3.amazonaws.com/latest/policies/resource_owner.json
- Billing (Payer):
aws iam update-assume-role-policy \
--role-name <role-name> \
--policy-document '{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": { "AWS": ["arn:aws:iam::061190967865:root", "arn:aws:iam::559846027439:root"] },
"Action": "sts:AssumeRole",
"Condition": { "StringEquals": { "sts:ExternalId": "<external-id>" } }
}
]
}'
aws iam put-role-policy \
--role-name <role-name> \
--policy-name <policy-name> \
--policy-document "$(curl -XGET <policy-url>)"
aws iam attach-role-policy \
--role-name <role-name> \
--policy-arn arn:aws:iam::aws:policy/AWSBillingReadOnlyAccess- Copy and run the block above in your terminal.
What to expect
New permissions take effect once the changes are saved. No reconnection is needed in CloudZero. You can verify the connection health on the Connections page in Settings.
For details on what each permission grants, see AWS Permissions and Security.
Have questions or feedback? Reach out to your account manager.

