Identity-based policy with Amazon Billing
By default, users and roles don't have permission to create or modify Billing resources. They also can't perform tasks by using the Amazon Web Services Management Console, Amazon Command Line Interface (Amazon CLI), or Amazon API. To grant users permission to perform actions on the resources that they need, an IAM administrator can create IAM policies. The administrator can then add the IAM policies to roles, and users can assume the roles.
To learn how to create an IAM identity-based policy by using these example JSON policy documents, see Creating IAM policies in the IAM User Guide.
For details about actions and resource types defined by Billing, including the format of the ARNs for each of the resource types, see Actions, resources, and condition keys for Amazon Billing in the Service Authorization Reference.
Contents
Policy best practices
Identity-based policies determine whether someone can create, access, or delete Billing resources in your account. These actions can incur costs for your Amazon Web Services account. When you create or edit identity-based policies, follow these guidelines and recommendations:
-
Get started with Amazon managed policies and move toward least-privilege permissions – To get started granting permissions to your users and workloads, use the Amazon managed policies that grant permissions for many common use cases. They are available in your Amazon Web Services account. We recommend that you reduce permissions further by defining Amazon customer managed policies that are specific to your use cases. For more information, see Amazon managed policies or Amazon managed policies for job functions in the IAM User Guide.
-
Apply least-privilege permissions – When you set permissions with IAM policies, grant only the permissions required to perform a task. You do this by defining the actions that can be taken on specific resources under specific conditions, also known as least-privilege permissions. For more information about using IAM to apply permissions, see Policies and permissions in IAM in the IAM User Guide.
-
Use conditions in IAM policies to further restrict access – You can add a condition to your policies to limit access to actions and resources. For example, you can write a policy condition to specify that all requests must be sent using SSL. You can also use conditions to grant access to service actions if they are used through a specific Amazon Web Services service, such as Amazon CloudFormation. For more information, see IAM JSON policy elements: Condition in the IAM User Guide.
-
Use IAM Access Analyzer to validate your IAM policies to ensure secure and functional permissions – IAM Access Analyzer validates new and existing policies so that the policies adhere to the IAM policy language (JSON) and IAM best practices. IAM Access Analyzer provides more than 100 policy checks and actionable recommendations to help you author secure and functional policies. For more information, see IAM Access Analyzer policy validation in the IAM User Guide.
-
Require multi-factor authentication (MFA) – If you have a scenario that requires IAM users or a root user in your Amazon Web Services account, turn on MFA for additional security. To require MFA when API operations are called, add MFA conditions to your policies. For more information, see Configuring MFA-protected API access in the IAM User Guide.
For more information about best practices in IAM, see Security best practices in IAM in the IAM User Guide.
Using the Billing console
To access the Amazon Billing console, you must have a minimum set of permissions. These permissions must allow you to list and view details about the Billing resources in your Amazon Web Services account. If you create an identity-based policy that is more restrictive than the minimum required permissions, the console won't function as intended for entities (users or roles) with that policy.
You don't need to allow minimum console permissions for users that are making calls only to the Amazon CLI or the Amazon API. Instead, allow access to only the actions that match the API operation that they're trying to perform.
You can find access details such as permissions required to enable Amazon Billing console, administrator access, and read-only access in the Amazon managed policies section.
Allow users to view their own permissions
This example shows how you might create a policy that allows IAM users to view the inline and managed policies that are attached to their user identity. This policy includes permissions to complete this action on the console or programmatically using the Amazon CLI or Amazon API.
{ "Version": "2012-10-17", "Statement": [ { "Sid": "ViewOwnUserInfo", "Effect": "Allow", "Action": [ "iam:GetUserPolicy", "iam:ListGroupsForUser", "iam:ListAttachedUserPolicies", "iam:ListUserPolicies", "iam:GetUser" ], "Resource": ["arn:aws-cn:iam::*:user/${aws:username}"] }, { "Sid": "NavigateInConsole", "Effect": "Allow", "Action": [ "iam:GetGroupPolicy", "iam:GetPolicyVersion", "iam:GetPolicy", "iam:ListAttachedGroupPolicies", "iam:ListGroupPolicies", "iam:ListPolicyVersions", "iam:ListPolicies", "iam:ListUsers" ], "Resource": "*" } ] }
Using identity-based policies for Billing
Note
The following Amazon Identity and Access Management (IAM) actions have reached the end of standard support:
-
aws-portal
namespace -
purchase-orders:ViewPurchaseOrders
-
purchase-orders:ModifyPurchaseOrders
If you're using Amazon Organizations, you can use the bulk policy migrator scripts or bulk policy migrator to update polices from your payer account. You can also use the old to granular action mapping reference to verify the IAM actions that need to be added.
If you have an Amazon Web Services account, or are a part of an Amazon Organizations created on or after November 16, 2023, 11:00 AM (PDT), the fine-grained actions are already in effect in your organization.
Important
In addition to IAM policies, you must grant IAM access to the Billing and Cost Management console on
the Account Settings
For more information, see the following topics:
Use this section to see how an identity-based policies account administrator can attach permissions policies to IAM identities (roles and groups) and grant permissions to perform operations on Billing resources.
For more information about Amazon Web Services accounts and users, see What Is IAM? in the IAM User Guide.
For information on how you can update customer managed policies, see Editing customer managed policies (console) in the IAM User Guide.
Amazon Billing console actions
This table summarizes the permissions that grant access to your billing console information and tools. For examples of policies that use these permissions, see Amazon Billing policy examples.
For a list of actions policies for the Amazon Cost Management console, see Amazon Cost Management actions policies in the Amazon Cost Management User Guide.
Permission name | Description |
---|---|
aws-portal:ViewBilling
|
Grants permission to view the Billing and Cost Management console pages. |
aws-portal:ModifyBilling
|
Grants permission to modify the following Billing and Cost Management console pages: To allow IAM users to modify these console pages, you
must allow both |
aws-portal:ViewAccount
|
Grants permission to view Account
Settings |
aws-portal:ModifyAccount |
Grants permission to modify Account
Settings To allow IAM users to modify account settings, you must
allow both For an example of a policy that explicitly denies an IAM user access to the Account Settings console page, see Deny access to account settings, but allow full access to all other billing and usage information. |
aws-portal:ViewPaymentMethods |
Grants permission to view Payment Methods |
aws-portal:ModifyPaymentMethods |
Grants permission to modify Payment Methods To allow users to modify payment methods, you must allow
both |
billing:ListBillingViews |
Grants permission to get billing information for pro forma billing groups. This is made using Amazon Billing Conductor on the Bills page, or Amazon Cost and Usage Reports. For more information about viewing your billing group details, see Viewing your billing group details in the Amazon Billing Conductor User Guide. |
sustainability:GetCarbonFootprintSummary |
Grants permission to view the Amazon customer carbon footprint tool and data. This is accessible from the Amazon Cost and Usage Reports page of the Billing and Cost Management console. For an example of a policy, see Allow IAM users to view your billing information and carbon footprint report. |
cur:DescribeReportDefinitions |
Grants permission to view Amazon Cost and Usage Reports. Amazon Cost and Usage Reports permissions apply to all reports that are created using the Amazon Cost and Usage Reports Service API and the Billing and Cost Management console. If you create reports using the Billing and Cost Management console, we recommend that you update the permissions for IAM users. Not updating the permissions will result in users losing access to viewing, editing, and removing reports on the console reports page. For an example of a policy, see Allow IAM users to access the reports console page. |
cur:PutReportDefinition |
Grants permission to create Amazon Cost and Usage Reports. Amazon Cost and Usage Reports permissions apply to all reports that are created using the Amazon Cost and Usage Reports Service API and the Billing and Cost Management console. If you create reports using the Billing and Cost Management console, we recommend that you update the permissions for IAM users. Not updating the permissions will result in users losing access to viewing, editing, and removing reports on the console reports page. For an example of a policy, see Allow IAM users to access the reports console page. |
cur:DeleteReportDefinition |
Grants permission to delete Amazon Cost and Usage Reports. Amazon Cost and Usage Reports permissions apply to all reports that are created using the Amazon Cost and Usage Reports Service API and the Billing and Cost Management console. If you create reports using the Billing and Cost Management console, we recommend that you update the permissions for IAM users. Not updating the permissions will result in users losing access to viewing, editing, and removing reports on the console reports page. For an example of a policy, see Create, view, edit, or delete Amazon Cost and Usage Reports. |
cur:ModifyReportDefinition |
Grants permission to modify Amazon Cost and Usage Reports. Amazon Cost and Usage Reports permissions apply to all reports that are created using the Amazon Cost and Usage Reports Service API and the Billing and Cost Management console. If you create reports using the Billing and Cost Management console, we recommend that you update the permissions for IAM users. Not updating the permissions will result in users losing access to viewing, editing, and removing reports on the console reports page. For an example of a policy, see Create, view, edit, or delete Amazon Cost and Usage Reports. |
ce:CreateCostCategoryDefinition |
Grants permissions to create cost categories. For an example policy, see View and manage cost categories. |
ce:DeleteCostCategoryDefinition |
Grants permissions to delete cost categories. For an example policy, see View and manage cost categories. |
ce:DescribeCostCategoryDefinition |
Grants permissions to view cost categories. For an example policy, see View and manage cost categories. |
ce:ListCostCategoryDefinitions |
Grants permissions to list cost categories. For an example policy, see View and manage cost categories. |
ce:UpdateCostCategoryDefinition |
Grants permissions to update cost categories. For an example policy, see View and manage cost categories. |
aws-portal:ViewUsage |
Grants permission to view Amazon usage Reports To allow IAM users to view usage reports, you must allow
both For an example policy, see Allow IAM users to access the reports console page. |
payments:ListTagsForResource |
Allow or deny IAM users permission to view tags for a payment method. |
payments:TagResource |
Allow or deny IAM users permission to add tags for a payment method. |
payments:UntagResource |
Allow or deny IAM users permission to remove tags from a payment method. |
payments:ListPaymentInstruments |
Allow or deny IAM users permission to list their registered payment methods. |
payments:UpdatePaymentInstrument |
Allow or deny IAM users permission to update their payment methods. |
pricing:DescribeServices |
Grants permission to view Amazon service products and pricing via the Amazon Price List Service API. To allow IAM users to use Amazon Price List Service API, you must allow
For an example policy, see Find products and prices. |
pricing:GetAttributeValues |
Grants permission to view Amazon service products and pricing via the Amazon Price List Service API. To allow IAM users to use Amazon Price List Service API, you must allow
For an example policy, see Find products and prices. |
pricing:GetProducts |
Grants permission to view Amazon service products and pricing via the Amazon Price List Service API. To allow IAM users to use Amazon Price List Service API, you must allow
For an example policy, see Find products and prices. |
purchase-orders:ViewPurchaseOrders |
Grants permission to view Purchase Orders. For an example policy, see View and manage purchase orders. |
purchase-orders:ModifyPurchaseOrders |
Grants permission to modify Purchase Orders. For an example policy, see View and manage purchase orders. |
fapiao:GetAccountFapiaoSetting
|
Grants permission to view Fapiao
settings |
fapiao:UpdateAccountFapiaoInformation
|
Grants permission to update Fapiao information in Fapiao
settings |
fapiao:UpdateAccountMailingAddress
|
Grants permission to update Fapiao mailing addresses in
Fapiao settings |
fapiao:CreateAccountFapiaoSetting
|
Grants permission to create Fapiao
settings |
tax:GetExemptions |
Grants permission for read-only access to view exemptions and exemption types by tax console. For an example policy, see Allow IAM users to view US tax exemptions and create Amazon Web Services Support cases. |
tax:UpdateExemptions |
Grants permission to upload an exemption to the US tax exemptions console. For an example policy, see Allow IAM users to view US tax exemptions and create Amazon Web Services Support cases. |
support:CreateCase |
Grants permission to file support cases, required to upload exemption from tax exemptions console. For an example policy, see Allow IAM users to view US tax exemptions and create Amazon Web Services Support cases. |
support:AddAttachmentsToSet |
Grants permission to attach documents to support cases that are required to upload exemption certificates to the tax exemption console. For an example policy, see Allow IAM users to view US tax exemptions and create Amazon Web Services Support cases. |
cloudassist:DescribeAccountRealNameInformation
|
Grants permission to view real
name information |
cloudassist:UpdateAccountRealNameInformation
|
Grants permission to update real name
information |
customer-verification:GetCustomerVerificationEligibility |
(For customers with an India billing or contact address only) Grants permission to retrieve customer verification eligibility. |
customer-verification:GetCustomerVerificationDetails |
(For customers with an India billing or contact address only) Grants permission to retrieve customer verification data. |
customer-verification:CreateCustomerVerificationDetails |
(For customers with an India billing or contact address only) Grants permission to create customer verification data. |
customer-verification:UpdateCustomerVerificationDetails |
(For customers with an India billing or contact address only) Grants permission to update customer verification data. |
mapcredit:ListAssociatedPrograms |
Grants permission to view the associated Migration Acceleration Program agreements and dashboard for the payer account. |
mapcredit:ListQuarterSpend |
Grants permission to view the Migration Acceleration Program eligible spend for the payer account. |
mapcredit:ListQuarterCredits |
Grants permission to view the Migration Acceleration Program credits for the payer account. |