Identity-based policy with AWS Billing - AWS Billing

Identity-based policy with AWS 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 AWS Management Console, AWS Command Line Interface (AWS CLI), or AWS 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 Create IAM policies (console) 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 AWS Billing in the Service Authorization Reference.

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 AWS account. When you create or edit identity-based policies, follow these guidelines and recommendations:

  • Get started with AWS managed policies and move toward least-privilege permissions – To get started granting permissions to your users and workloads, use the AWS managed policies that grant permissions for many common use cases. They are available in your AWS account. We recommend that you reduce permissions further by defining AWS customer managed policies that are specific to your use cases. For more information, see AWS managed policies or AWS 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 AWS service, such as AWS 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 Validate policies with IAM Access Analyzer 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 AWS 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 Secure API access with MFA 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 AWS 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 AWS 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 AWS CLI or the AWS 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 AWS Billing console, administrator access, and read-only access in the AWS 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 AWS CLI or AWS API.

{ "Version": "2012-10-17", "Statement": [ { "Sid": "ViewOwnUserInfo", "Effect": "Allow", "Action": [ "iam:GetUserPolicy", "iam:ListGroupsForUser", "iam:ListAttachedUserPolicies", "iam:ListUserPolicies", "iam:GetUser" ], "Resource": ["arn:aws: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 AWS Identity and Access Management (IAM) actions have reached the end of standard support on July 2023:

  • aws-portal namespace

  • purchase-orders:ViewPurchaseOrders

  • purchase-orders:ModifyPurchaseOrders

If you're using AWS 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 AWS account, or are a part of an AWS Organizations created on or after March 6, 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 console page.

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 AWS 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.

AWS 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 AWS Billing policy examples.

For a list of actions policies for the AWS Cost Management console, see AWS Cost Management actions policies in the AWS 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 ModifyBilling and ViewBilling. For an example policy, see Allow IAM users to modify billing information.

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 ModifyAccount and ViewAccount.

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 ModifyPaymentMethods and ViewPaymentMethods.

billing:ListBillingViews

Grants permission to get a list of available billing views. This includes custom billing views and billing views corresponding to pro forma billing groups.

For more information about custom billing views, see Controlling cost management data access with Billing View.

For more information about viewing your billing group details, see Viewing your billing group details in the AWS Billing Conductor User Guide.

billing:CreateBillingView

Grants permission to create custom billing views.

For an example policy, see Allow users to create, manage, and share custom billing views.

billing:UpdateBillingView

Grants permission to update custom billing views.

For an example policy, see Allow users to create, manage, and share custom billing views.

billing:DeleteBillingView

Grants permission to delete custom billing views.

For an example policy, see Allow users to create, manage, and share custom billing views.

billing:GetBillingView

Grants permission to get the definition of billing views.

For an example policy, see Allow users to create, manage, and share custom billing views.

sustainability:GetCarbonFootprintSummary

Grants permission to view the AWS customer carbon footprint tool and data. This is accessible from the AWS 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 AWS Cost and Usage Reports.

AWS Cost and Usage Reports permissions apply to all reports that are created using the AWS 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 AWS Cost and Usage Reports.

AWS Cost and Usage Reports permissions apply to all reports that are created using the AWS 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 AWS Cost and Usage Reports.

AWS Cost and Usage Reports permissions apply to all reports that are created using the AWS 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 AWS Cost and Usage Reports.

cur:ModifyReportDefinition

Grants permission to modify AWS Cost and Usage Reports.

AWS Cost and Usage Reports permissions apply to all reports that are created using the AWS 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 AWS 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 AWS usage Reports.

To allow IAM users to view usage reports, you must allow both ViewUsage and ViewBilling.

For an example policy, see Allow IAM users to access the reports console page.

payments:AcceptFinancingApplicationTerms

Allows IAM users to agree with the terms provided by the financing lender. Users are required to provide their bank account details for repayment, and sign the legal documents provided by the lender.

payments:CreateFinancingApplication

Allows IAM users to apply for a new finance loan, and reference the chosen financing option.

payments:GetFinancingApplication

Allows IAM users to retrieve the details of a financing application. For example, status, limits, terms, and lender information.

payments:GetFinancingLine

Allows IAM users to retrieve the details of a financing loan. For example, status and balances.

payments:GetFinancingLineWithdrawal

Allows IAM users to retrieve the withdrawal details. For example, balances and repayments.

payments:GetFinancingOption

Allows IAM users to retrieve the details of a specific financing option.

payments:ListFinancingApplications

Allows IAM users to retrieve the identifiers for all financing applications, across all lenders.

payments:ListFinancingLines

Allows IAM users to retrieve the identifiers for all financing loans, across all lenders.

payments:ListFinancingLineWithdrawals

Allows IAM users to retrieve all of the existing withdrawals for a given loan.

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:UpdateFinancingApplication

Allow IAM users to change a financing application and submit additional information requested by the lender.

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 AWS service products and pricing via the AWS Price List Service API.

To allow IAM users to use AWS Price List Service API, you must allow DescribeServices, GetAttributeValues, and GetProducts.

For an example policy, see Find products and prices.

pricing:GetAttributeValues

Grants permission to view AWS service products and pricing via the AWS Price List Service API.

To allow IAM users to use AWS Price List Service API, you must allow DescribeServices, GetAttributeValues, and GetProducts.

For an example policy, see Find products and prices.

pricing:GetProducts

Grants permission to view AWS service products and pricing via the AWS Price List Service API.

To allow IAM users to use AWS Price List Service API, you must allow DescribeServices, GetAttributeValues, and GetProducts.

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.

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 AWS 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 AWS 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 AWS 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 AWS Support cases.

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.

invoicing:BatchGetInvoiceProfile Grants permission for read-only access to view invoice profiles for AWS invoice configuration..
invoicing:CreateInvoiceUnit Grants permission to create invoice units for AWS invoice configuration.
invoicing:DeleteInvoiceUnit Grants permission to delete invoice units for AWS invoice configuration.
invoicing:GetInvoiceUnit Grants permission for read-only access to view invoice units for AWS invoice configuration.
invoicing:ListInvoiceUnits Grants permission to list all invoice units for AWS invoice configuration.
invoicing:ListTagsForResource Allow or deny IAM users permission to view tags for an invoice unit for AWS invoice configuration.
invoicing:TagResource Allow or deny IAM users permission to add tags for an invoice unit for AWS invoice configuration.
invoicing:UntagResource Allow or deny IAM users permission to remove tags from an invoice unit for AWS invoice configuration.
invoicing:UpdateInvoiceUnit Grants edit permissions to update invoice units for AWS invoice configuration.