

# Security in AWS Billing
Security

Cloud security at AWS is the highest priority. As an AWS customer, you benefit from a data center and network architecture that is built to meet the requirements of the most security-sensitive organizations.

Security is a shared responsibility between AWS and you. The [shared responsibility model](https://aws.amazon.com/compliance/shared-responsibility-model/) describes this as security *of* the cloud and security *in* the cloud:
+ **Security of the cloud** – AWS is responsible for protecting the infrastructure that runs AWS services in the AWS Cloud. AWS also provides you with services that you can use securely. Third-party auditors regularly test and verify the effectiveness of our security as part of the [AWS Compliance Programs](https://aws.amazon.com/compliance/programs/). To learn about the compliance programs that apply to AWS Billing and Cost Management, see [AWS Services in Scope by Compliance Program](https://aws.amazon.com/compliance/services-in-scope/).
+ **Security in the cloud** – Your responsibility is determined by the AWS service that you use. You are also responsible for other factors including the sensitivity of your data, your company’s requirements, and applicable laws and regulations. 

This documentation helps you understand how to apply the shared responsibility model when using Billing and Cost Management. The following topics show you how to configure Billing and Cost Management to meet your security and compliance objectives. You also learn how to use other AWS services that help you to monitor and secure your Billing and Cost Management resources. 

**Topics**
+ [

# Data protection in AWS Billing and Cost Management
](data-protection.md)
+ [

# Identity and Access Management for AWS Billing
](security-iam.md)
+ [

# Using service-linked roles for AWS Billing
](using-service-linked-roles.md)
+ [

# Logging and monitoring in AWS Billing and Cost Management
](billing-security-logging.md)
+ [

# Compliance validation for AWS Billing and Cost Management
](Billing-compliance.md)
+ [

# Resilience in AWS Billing and Cost Management
](disaster-recovery-resiliency.md)
+ [

# Infrastructure security in AWS Billing and Cost Management
](infrastructure-security.md)

**Note**  
When you use billing transfer as a bill source account, your billing and cost management data transfers to an external management account (bill transfer account). The bill transfer account controls your billing and cost management experience. The bill source account can't override billing transfer effects using IAM policies. To regain control of your billing and cost management data, you must withdraw from billing transfer. For more information, see [Transfer billing management to external accounts](orgs_transfer_billing.md).

# Data protection in AWS Billing and Cost Management
Data protection

The AWS [shared responsibility model](https://aws.amazon.com/compliance/shared-responsibility-model/) applies to data protection in AWS Billing and Cost Management. As described in this model, AWS is responsible for protecting the global infrastructure that runs all of the AWS Cloud. You are responsible for maintaining control over your content that is hosted on this infrastructure. You are also responsible for the security configuration and management tasks for the AWS services that you use. For more information about data privacy, see the [Data Privacy FAQ](https://aws.amazon.com/compliance/data-privacy-faq/). For information about data protection in Europe, see the [AWS Shared Responsibility Model and GDPR](https://aws.amazon.com/blogs/security/the-aws-shared-responsibility-model-and-gdpr/) blog post on the *AWS Security Blog*.

For data protection purposes, we recommend that you protect AWS account credentials and set up individual users with AWS IAM Identity Center or AWS Identity and Access Management (IAM). That way, each user is given only the permissions necessary to fulfill their job duties. We also recommend that you secure your data in the following ways:
+ Use multi-factor authentication (MFA) with each account.
+ Use SSL/TLS to communicate with AWS resources. We require TLS 1.2 and recommend TLS 1.3.
+ Set up API and user activity logging with AWS CloudTrail. For information about using CloudTrail trails to capture AWS activities, see [Working with CloudTrail trails](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-trails.html) in the *AWS CloudTrail User Guide*.
+ Use AWS encryption solutions, along with all default security controls within AWS services.
+ Use advanced managed security services such as Amazon Macie, which assists in discovering and securing sensitive data that is stored in Amazon S3.
+ If you require FIPS 140-3 validated cryptographic modules when accessing AWS through a command line interface or an API, use a FIPS endpoint. For more information about the available FIPS endpoints, see [Federal Information Processing Standard (FIPS) 140-3](https://aws.amazon.com/compliance/fips/).

We strongly recommend that you never put confidential or sensitive information, such as your customers' email addresses, into tags or free-form text fields such as a **Name** field. This includes when you work with Billing and Cost Management or other AWS services using the console, API, AWS CLI, or AWS SDKs. Any data that you enter into tags or free-form text fields used for names may be used for billing or diagnostic logs. If you provide a URL to an external server, we strongly recommend that you do not include credentials information in the URL to validate your request to that server.

# Identity and Access Management for AWS Billing
Identity and Access Management

AWS Identity and Access Management (IAM) is an AWS service that helps an administrator securely control access to AWS resources. IAM administrators control who can be *authenticated* (signed in) and *authorized* (have permissions) to use Billing resources. IAM is an AWS service that you can use with no additional charge.

To start activating access to the Billing console, see [IAM tutorial: grant access to the Billing console](https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_billing.html) in the *IAM User Guide*.

## User types and billing permissions


This table summarizes the default actions that are permitted in Billing for each type of billing user.


**User types and billing permissions**  

| User type | Description | Billing permissions | 
| --- | --- | --- | 
| Account owner |  The person or entity in whose name your account is set up as.  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/security-iam.html)  | 
| User |  A person or application defined as a user in an account by an account owner or administrative user. Accounts can contain multiple users.  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/security-iam.html)  | 
| Organization management account owner |  The person or entity associated with an AWS Organizations management account. The management account pays for AWS usage that is incurred by a member account in an organization.   |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/security-iam.html)  | 
| Organization member account owner |  The person or entity associated with an AWS Organizations member account. The management account pays for AWS usage that is incurred by a member account in an organization.   |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/security-iam.html)  | 

# Overview of managing access permissions
Overview of managing access

## Granting access to your billing information and tools
Grant access to billing information and tools

By default, IAM users don't have access to the [AWS Billing and Cost Management console](https://console.aws.amazon.com/billing/).

 When you create an AWS account, you begin with one sign-in identity called the AWS account *root user* that has complete access to all AWS services and resources. We strongly recommend that you don't use the root user for everyday tasks. For tasks that require root user credentials, see [Tasks that require root user credentials](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-user.html#root-user-tasks) in the *IAM User Guide*. 

As an administrator, you can create roles under your AWS account that your users can assume. After you create roles, you can attach your IAM policy to them, based on the access needed. For example, you can grant some users limited access to some of your billing information and tools, and grant others complete access to all of the information and tools.

To grant IAM entities access to the Billing and Cost Management console, complete the following:
+ [Activate IAM Access](#ControllingAccessWebsite-Activate) as the AWS account root user. You only need to complete this action once for your account.
+ Create your IAM identities, such as a user, group, or role.
+ Use an AWS managed policy or create a customer managed policy that grants permission to specific actions on the Billing and Cost Management console. For more information, see [Using identity-based policies for Billing](security_iam_id-based-policy-examples.md#billing-permissions-ref).

For more information, see the [IAM tutorial: Grant access to the Billing console](https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_billing.html) in the *IAM User Guide*.

**Note**  
Permissions for Cost Explorer apply to all accounts and member accounts, regardless of the IAM policies. For more information, see [Controlling access to AWS Cost Explorer](https://docs.aws.amazon.com/cost-management/latest/userguide/ce-access.html).

## Activating access to the Billing and Cost Management console


IAM users and roles in an AWS account can't access the Billing and Cost Management console by default. This is true even if they have IAM policies that grant access to certain Billing features. To grant access, the AWS account root user can use the **Activate IAM Access** setting.

If you use AWS Organizations, activate this setting in each management or member account where you want to allow IAM user and role access to the Billing and Cost Management console. For created member accounts this option will be enabled by default. For more information, see [Activating IAM access to the AWS Billing and Cost Management console](billing-getting-started.md#activating-iam-access-to-billing-console).

On the Billing console, the **Activate IAM Access** setting controls access to the following pages:
+ Home
+ Budgets
+ Budgets Reports
+ AWS Cost and Usage Reports
+ Cost categories
+ Cost allocation tags
+ Bills
+ Payments
+ Credits
+ Purchase Order
+ Billing preferences
+ Payment methods
+ Tax settings
+ Cost Explorer
+ Reports
+ Rightsizing recommendations
+ Savings Plans recommendations
+ Savings Plans utilization report
+ Savings Plans coverage report
+ Reservations overview
+ Reservations recommendations
+ Reservations utilization report
+ Reservations coverage report
+ Preferences

**Important**  
Activating IAM access alone doesn't grant roles the necessary permissions for these Billing and Cost Management console pages. In addition to activating IAM access, you must also attach the required IAM policies to those roles. For more information, see [Using identity-based policies for Billing](security_iam_id-based-policy-examples.md#billing-permissions-ref).

The **Activate IAM Access** setting doesn't control access to the following pages and resources:
+ The console pages for AWS Cost Anomaly Detection, Savings Plans overview, Savings Plans inventory, Purchase Savings Plans, and Savings Plans cart
+ The Cost Management view in the AWS Console Mobile Application
+ The Billing and Cost Management SDK APIs (AWS Cost Explorer, AWS Budgets, and AWS Cost and Usage Reports APIs)
+ AWS Systems Manager Application Manager
+ The in-console AWS Pricing Calculator
+ The cost analysis capability in Amazon Q
+ The AWS Activate Console

## Audience


How you use AWS Identity and Access Management (IAM) differs based on your role:
+ **Service user** - request permissions from your administrator if you cannot access features (see [Troubleshooting AWS Billing identity and access](security_iam_troubleshoot.md))
+ **Service administrator** - determine user access and submit permission requests (see [How AWS Billing works with IAM](security_iam_service-with-iam.md))
+ **IAM administrator** - write policies to manage access (see [Identity-based policy with AWS Billing](security_iam_id-based-policy-examples.md))

## Authenticating with identities


Authentication is how you sign in to AWS using your identity credentials. You must be authenticated as the AWS account root user, an IAM user, or by assuming an IAM role.

You can sign in as a federated identity using credentials from an identity source like AWS IAM Identity Center (IAM Identity Center), single sign-on authentication, or Google/Facebook credentials. For more information about signing in, see [How to sign in to your AWS account](https://docs.aws.amazon.com/signin/latest/userguide/how-to-sign-in.html) in the *AWS Sign-In User Guide*.

For programmatic access, AWS provides an SDK and CLI to cryptographically sign requests. For more information, see [AWS Signature Version 4 for API requests](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv.html) in the *IAM User Guide*.

### AWS account root user


 When you create an AWS account, you begin with one sign-in identity called the AWS account *root user* that has complete access to all AWS services and resources. We strongly recommend that you don't use the root user for everyday tasks. For tasks that require root user credentials, see [Tasks that require root user credentials](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-user.html#root-user-tasks) in the *IAM User Guide*. 

### Federated identity


As a best practice, require human users to use federation with an identity provider to access AWS services using temporary credentials.

A *federated identity* is a user from your enterprise directory, web identity provider, or Directory Service that accesses AWS services using credentials from an identity source. Federated identities assume roles that provide temporary credentials.

For centralized access management, we recommend AWS IAM Identity Center. For more information, see [What is IAM Identity Center?](https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html) in the *AWS IAM Identity Center User Guide*.

### IAM users and groups


An *[IAM user](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users.html)* is an identity with specific permissions for a single person or application. We recommend using temporary credentials instead of IAM users with long-term credentials. For more information, see [Require human users to use federation with an identity provider to access AWS using temporary credentials](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#bp-users-federation-idp) in the *IAM User Guide*.

An [https://docs.aws.amazon.com/IAM/latest/UserGuide/id_groups.html](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_groups.html) specifies a collection of IAM users and makes permissions easier to manage for large sets of users. For more information, see [Use cases for IAM users](https://docs.aws.amazon.com/IAM/latest/UserGuide/gs-identities-iam-users.html) in the *IAM User Guide*.

### IAM roles


An *[IAM role](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html)* is an identity with specific permissions that provides temporary credentials. You can assume a role by [switching from a user to an IAM role (console)](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-console.html) or by calling an AWS CLI or AWS API operation. For more information, see [Methods to assume a role](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_manage-assume.html) in the *IAM User Guide*.

IAM roles are useful for federated user access, temporary IAM user permissions, cross-account access, cross-service access, and applications running on Amazon EC2. For more information, see [Cross account resource access in IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies-cross-account-resource-access.html) in the *IAM User Guide*.

## Managing access using policies


You control access in AWS by creating policies and attaching them to AWS identities or resources. A policy defines permissions when associated with an identity or resource. AWS evaluates these policies when a principal makes a request. Most policies are stored in AWS as JSON documents. For more information about JSON policy documents, see [Overview of JSON policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#access_policies-json) in the *IAM User Guide*.

Using policies, administrators specify who has access to what by defining which **principal** can perform **actions** on what **resources**, and under what **conditions**.

By default, users and roles have no permissions. An IAM administrator creates IAM policies and adds them to roles, which users can then assume. IAM policies define permissions regardless of the method used to perform the operation.

### Identity-based policies


Identity-based policies are JSON permissions policy documents that you attach to an identity (user, group, or role). These policies control what actions identities can perform, on which resources, and under what conditions. To learn how to create an identity-based policy, see [Define custom IAM permissions with customer managed policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_create.html) in the *IAM User Guide*.

Identity-based policies can be *inline policies* (embedded directly into a single identity) or *managed policies* (standalone policies attached to multiple identities). To learn how to choose between managed and inline policies, see [Choose between managed policies and inline policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies-choosing-managed-or-inline.html) in the *IAM User Guide*.

### Resource-based policies


Resource-based policies are JSON policy documents that you attach to a resource. Examples include IAM *role trust policies* and Amazon S3 *bucket policies*. In services that support resource-based policies, service administrators can use them to control access to a specific resource. You must [specify a principal](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html) in a resource-based policy.

Resource-based policies are inline policies that are located in that service. You can't use AWS managed policies from IAM in a resource-based policy.

### Other policy types


AWS supports additional policy types that can set the maximum permissions granted by more common policy types:
+ **Permissions boundaries** – Set the maximum permissions that an identity-based policy can grant to an IAM entity. For more information, see [Permissions boundaries for IAM entities](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) in the *IAM User Guide*.
+ **Service control policies (SCPs)** – Specify the maximum permissions for an organization or organizational unit in AWS Organizations. For more information, see [Service control policies](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps.html) in the *AWS Organizations User Guide*.
+ **Resource control policies (RCPs)** – Set the maximum available permissions for resources in your accounts. For more information, see [Resource control policies (RCPs)](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_rcps.html) in the *AWS Organizations User Guide*.
+ **Session policies** – Advanced policies passed as a parameter when creating a temporary session for a role or federated user. For more information, see [Session policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) in the *IAM User Guide*.

### Multiple policy types


When multiple types of policies apply to a request, the resulting permissions are more complicated to understand. To learn how AWS determines whether to allow a request when multiple policy types are involved, see [Policy evaluation logic](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html) in the *IAM User Guide*.

# How AWS Billing works with IAM


Billing integrates with the AWS Identity and Access Management (IAM) service so that you can control who in your organization has access to specific pages on the [Billing console](https://console.aws.amazon.com/cost-management/home). You can control access to invoices and detailed information about charges and account activity, budgets, payment methods, and credits.

For more information about how to activate access to the Billing and Cost Management Console, see [Tutorial: Delegate Access to the Billing Console](https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_billing.html) in the *IAM User Guide*.

Before you use IAM to manage access to Billing, learn what IAM features are available to use with Billing.






**IAM features you can use with AWS Billing**  

| IAM feature | Billing support | 
| --- | --- | 
|  [Identity-based policies](#security_iam_service-with-iam-id-based-policies)  |   Yes  | 
|  [Resource-based policies](#security_iam_service-with-iam-resource-based-policies)  |   No   | 
|  [Policy actions](#security_iam_service-with-iam-id-based-policies-actions)  |   Yes  | 
|  [Policy resources](#security_iam_service-with-iam-id-based-policies-resources)  |   Partial  | 
|  [Policy condition keys](#security_iam_service-with-iam-id-based-policies-conditionkeys)  |   Yes  | 
|  [ACLs](#security_iam_service-with-iam-acls)  |   No   | 
|  [ABAC (tags in policies)](#security_iam_service-with-iam-tags)  |   Partial  | 
|  [Temporary credentials](#security_iam_service-with-iam-roles-tempcreds)  |   Yes  | 
|  [Forward access sessions (FAS)](#security_iam_service-with-iam-principal-permissions)  |   Yes  | 
|  [Service roles](#security_iam_service-with-iam-roles-service)  |   Yes  | 
|  [Service-linked roles](#security_iam_service-with-iam-roles-service-linked)  |   No   | 

To get a high-level view of how Billing and other AWS services work with most IAM features, see [AWS services that work with IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-services-that-work-with-iam.html) in the *IAM User Guide*.

## Identity-based policies for Billing
Identity-based policies

**Supports identity-based policies:** Yes

Identity-based policies are JSON permissions policy documents that you can attach to an identity, such as an IAM user, group of users, or role. These policies control what actions users and roles can perform, on which resources, and under what conditions. To learn how to create an identity-based policy, see [Define custom IAM permissions with customer managed policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_create.html) in the *IAM User Guide*.

With IAM identity-based policies, you can specify allowed or denied actions and resources as well as the conditions under which actions are allowed or denied. To learn about all of the elements that you can use in a JSON policy, see [IAM JSON policy elements reference](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements.html) in the *IAM User Guide*.

### Identity-based policy examples for Billing




To view examples of Billing identity-based policies, see [Identity-based policy with AWS Billing](security_iam_id-based-policy-examples.md).

## Resource-based policies within Billing
Resource-based policies

**Supports resource-based policies:** No 

Resource-based policies are JSON policy documents that you attach to a resource. Examples of resource-based policies are IAM *role trust policies* and Amazon S3 *bucket policies*. In services that support resource-based policies, service administrators can use them to control access to a specific resource. For the resource where the policy is attached, the policy defines what actions a specified principal can perform on that resource and under what conditions. You must [specify a principal](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html) in a resource-based policy. Principals can include accounts, users, roles, federated users, or AWS services.

To enable cross-account access, you can specify an entire account or IAM entities in another account as the principal in a resource-based policy. For more information, see [Cross account resource access in IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies-cross-account-resource-access.html) in the *IAM User Guide*.

## Policy actions for Billing
Policy actions

**Supports policy actions:** Yes

Administrators can use AWS JSON policies to specify who has access to what. That is, which **principal** can perform **actions** on what **resources**, and under what **conditions**.

The `Action` element of a JSON policy describes the actions that you can use to allow or deny access in a policy. Include actions in a policy to grant permissions to perform the associated operation.



To see a list of Billing actions, see [Actions defined by AWS Billing](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsbilling.html) in the *Service Authorization Reference*.

Policy actions in Billing use the following prefix before the action:

```
billing
```

To specify multiple actions in a single statement, separate them with commas.

```
"Action": [
      "billing:action1",
      "billing:action2"
         ]
```





To view examples of Billing identity-based policies, see [Identity-based policy with AWS Billing](security_iam_id-based-policy-examples.md).

## Policy resources for Billing
Policy resources

**Supports policy resources:** Partial

Policy resources are only supported for monitors, subscriptions, and cost categories.

Administrators can use AWS JSON policies to specify who has access to what. That is, which **principal** can perform **actions** on what **resources**, and under what **conditions**.

The `Resource` JSON policy element specifies the object or objects to which the action applies. As a best practice, specify a resource using its [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html). For actions that don't support resource-level permissions, use a wildcard (\$1) to indicate that the statement applies to all resources.

```
"Resource": "*"
```

To see a list of AWS Cost Explorer resource types, see [Actions, resources, and condition keys for AWS Cost Explorer](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awscostexplorerservice.html) in the *Service Authorization Reference*.





To view examples of Billing identity-based policies, see [Identity-based policy with AWS Billing](security_iam_id-based-policy-examples.md).

## Policy condition keys for Billing
Policy condition keys

**Supports service-specific policy condition keys:** Yes

Administrators can use AWS JSON policies to specify who has access to what. That is, which **principal** can perform **actions** on what **resources**, and under what **conditions**.

The `Condition` element specifies when statements execute based on defined criteria. You can create conditional expressions that use [condition operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html), such as equals or less than, to match the condition in the policy with values in the request. To see all AWS global condition keys, see [AWS global condition context keys](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html) in the *IAM User Guide*.

To see a list of Billing condition keys, actions, and resources, see [Condition keys for AWS Billing](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsbilling.html) in the *Service Authorization Reference*.

To view examples of Billing identity-based policies, see [Identity-based policy with AWS Billing](security_iam_id-based-policy-examples.md).

## Access control lists (ACLs) in Billing
ACLs

**Supports ACLs:** No 

Access control lists (ACLs) control which principals (account members, users, or roles) have permissions to access a resource. ACLs are similar to resource-based policies, although they do not use the JSON policy document format.

## Attribute-based access control (ABAC) with Billing
ABAC

**Supports ABAC (tags in policies):** Partial

ABAC (tags in policies) are only supported for monitors, subscriptions, and cost categories.

Attribute-based access control (ABAC) is an authorization strategy that defines permissions based on attributes called tags. You can attach tags to IAM entities and AWS resources, then design ABAC policies to allow operations when the principal's tag matches the tag on the resource.

To control access based on tags, you provide tag information in the [condition element](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition.html) of a policy using the `aws:ResourceTag/key-name`, `aws:RequestTag/key-name`, or `aws:TagKeys` condition keys.

If a service supports all three condition keys for every resource type, then the value is **Yes** for the service. If a service supports all three condition keys for only some resource types, then the value is **Partial**.

For more information about ABAC, see [Define permissions with ABAC authorization](https://docs.aws.amazon.com/IAM/latest/UserGuide/introduction_attribute-based-access-control.html) in the *IAM User Guide*. To view a tutorial with steps for setting up ABAC, see [Use attribute-based access control (ABAC)](https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html) in the *IAM User Guide*.

## Using Temporary credentials with Billing
Temporary credentials

**Supports temporary credentials:** Yes

Temporary credentials provide short-term access to AWS resources and are automatically created when you use federation or switch roles. AWS recommends that you dynamically generate temporary credentials instead of using long-term access keys. For more information, see [Temporary security credentials in IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html) and [AWS services that work with IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-services-that-work-with-iam.html) in the *IAM User Guide*.

## Forward access sessions for Billing
Forward access sessions

**Supports forward access sessions (FAS):** Yes

 Forward access sessions (FAS) use the permissions of the principal calling an AWS service, combined with the requesting AWS service to make requests to downstream services. For policy details when making FAS requests, see [Forward access sessions](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_forward_access_sessions.html). 

## Service roles for Billing
Service roles

**Supports service roles:** Yes

 A service role is an [IAM role](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html) that a service assumes to perform actions on your behalf. An IAM administrator can create, modify, and delete a service role from within IAM. For more information, see [Create a role to delegate permissions to an AWS service](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-service.html) in the *IAM User Guide*. 

**Warning**  
Changing the permissions for a service role might break Billing functionality. Edit service roles only when Billing provides guidance to do so.

## Service-linked roles for Billing
Service-linked roles

**Supports service-linked roles:** No 

 A service-linked role is a type of service role that is linked to an AWS service. The service can assume the role to perform an action on your behalf. Service-linked roles appear in your AWS account and are owned by the service. An IAM administrator can view, but not edit the permissions for service-linked roles. 

For details about creating or managing service-linked roles, see [AWS services that work with IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-services-that-work-with-iam.html). Find a service in the table that includes a `Yes` in the **Service-linked role** column. Choose the **Yes** link to view the service-linked role documentation for that service.

# Identity-based policy with AWS Billing
Identity-based policy with Billing

By default, users and roles don't have permission to create or modify Billing resources. To grant users permission to perform actions on the resources that they need, an IAM administrator can create IAM policies.

To learn how to create an IAM identity-based policy by using these example JSON policy documents, see [Create IAM policies (console)](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_create-console.html) 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](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsbilling.html) in the *Service Authorization Reference*.

**Contents**
+ [

## Policy best practices
](#security_iam_service-with-iam-policy-best-practices)
+ [

## Using the Billing console
](#security_iam_id-based-policy-examples-console)
+ [

## Allow users to view their own permissions
](#security_iam_id-based-policy-examples-view-own-permissions)
+ [

## Using identity-based policies for Billing
](#billing-permissions-ref)
  + [

### AWS Billing console actions
](#user-permissions)

## 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](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html#aws-managed-policies) or [AWS managed policies for job functions](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_job-functions.html) 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](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html) 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 CloudFormation. For more information, see [ IAM JSON policy elements: Condition](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition.html) 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](https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-policy-validation.html) 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](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_configure-api-require.html) in the *IAM User Guide*.

For more information about best practices in IAM, see [Security best practices in IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html) in the *IAM User Guide*.

## Using the Billing console
Using the 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](managed-policies.md) 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
Using IAM 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](migrate-iam-permissions.md) or bulk policy migrator to update polices from your payer account. You can also use the [old to granular action mapping reference](migrate-granularaccess-iam-mapping-reference.md) 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](https://console.aws.amazon.com/billing/home#/account) console page.   
For more information, see the following topics:  
 [Activating access to the Billing and Cost Management console](control-access-billing.md#ControllingAccessWebsite-Activate)
[IAM tutorial: Grant access to the billing console](https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_billing.html) in the *IAM User Guide*

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?](https://docs.aws.amazon.com/IAM/latest/UserGuide/IAM_Introduction.html) in the *IAM User Guide*.

For information on how you can update customer managed policies, see [Editing customer managed policies (console)](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_manage-edit.html#edit-managed-policy-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](billing-example-policies.md). 

For a list of actions policies for the AWS Cost Management console, see [AWS Cost Management actions policies](https://docs.aws.amazon.com/cost-management/latest/userguide/billing-permissions-ref.html#user-permissions) 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: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/security_iam_id-based-policy-examples.html) 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](billing-example-policies.md#example-billing-deny-modifybilling).  | 
|  aws-portal:ViewAccount  |  Grants permission to view [Account Settings](https://console.aws.amazon.com/billing/home#/account).  | 
| aws-portal:ModifyAccount |  Grants permission to modify [Account Settings](https://console.aws.amazon.com/billing/home#/account). 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](billing-example-policies.md#example-billing-deny-modifyaccount).   | 
| aws-portal:ViewPaymentMethods |  Grants permission to view [Payment Methods](https://console.aws.amazon.com/billing/home#/paymentmethods).  | 
| aws-portal:ModifyPaymentMethods |  Grants permission to modify [Payment Methods](https://console.aws.amazon.com/billing/home#/paymentmethods). 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](https://docs.aws.amazon.com/cost-management/latest/userguide/billing-view.html). For more information about viewing your billing group details, see [Viewing your billing group details](https://docs.aws.amazon.com/billingconductor/latest/userguide/viewing-abc.html) 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](https://docs.aws.amazon.com/cost-management/latest/userguide/billing-example-policies.html#example-billing-view).  | 
| billing:UpdateBillingView |  Grants permission to update custom billing views. For an example policy, see [Allow users to create, manage, and share custom billing views](https://docs.aws.amazon.com/cost-management/latest/userguide/billing-example-policies.html#example-billing-view).  | 
| billing:DeleteBillingView |  Grants permission to delete custom billing views. For an example policy, see [Allow users to create, manage, and share custom billing views](https://docs.aws.amazon.com/cost-management/latest/userguide/billing-example-policies.html#example-billing-view).  | 
| 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](https://docs.aws.amazon.com/cost-management/latest/userguide/billing-example-policies.html#example-billing-view).  | 
| 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](billing-example-policies.md#example-ccft-policy).   | 
| 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](https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Operations_AWS_Cost_and_Usage_Report_Service.html) 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](billing-example-policies.md#example-billing-view-reports).   | 
| 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](https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Operations_AWS_Cost_and_Usage_Report_Service.html) 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](billing-example-policies.md#example-billing-view-reports).   | 
| 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](https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Operations_AWS_Cost_and_Usage_Report_Service.html) 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](billing-example-policies.md#example-policy-report-definition).   | 
| 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](https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Operations_AWS_Cost_and_Usage_Report_Service.html) 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](billing-example-policies.md#example-policy-report-definition).   | 
| ce:CreateCostCategoryDefinition |  Grants permissions to create cost categories. For an example policy, see [View and manage cost categories](billing-example-policies.md#example-policy-cc-api).  | 
| ce:DeleteCostCategoryDefinition |  Grants permissions to delete cost categories. For an example policy, see [View and manage cost categories](billing-example-policies.md#example-policy-cc-api).  | 
| ce:DescribeCostCategoryDefinition |  Grants permissions to view cost categories. For an example policy, see [View and manage cost categories](billing-example-policies.md#example-policy-cc-api).  | 
| ce:ListCostCategoryDefinitions |  Grants permissions to list cost categories. For an example policy, see [View and manage cost categories](billing-example-policies.md#example-policy-cc-api).  | 
| ce:UpdateCostCategoryDefinition |  Grants permissions to update cost categories. For an example policy, see [View and manage cost categories](billing-example-policies.md#example-policy-cc-api).  | 
| aws-portal:ViewUsage |  Grants permission to view AWS usage [Reports](https://console.aws.amazon.com/billing/home#/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](billing-example-policies.md#example-billing-view-reports).   | 
| 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](billing-example-policies.md#example-policy-pe-api).  | 
| 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](billing-example-policies.md#example-policy-pe-api).  | 
| 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](billing-example-policies.md#example-policy-pe-api).  | 
| purchase-orders:ViewPurchaseOrders |  Grants permission to view [Purchase Orders](manage-purchaseorders.md). For an example policy, see [View and manage purchase orders](billing-example-policies.md#example-view-manage-purchaseorders).  | 
| purchase-orders:ModifyPurchaseOrders |  Grants permission to modify [Purchase Orders](manage-purchaseorders.md). For an example policy, see [View and manage purchase orders](billing-example-policies.md#example-view-manage-purchaseorders).  | 
| 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 Support cases](billing-example-policies.md#example-awstaxexemption).  | 
| 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 Support cases](billing-example-policies.md#example-awstaxexemption).  | 
| 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 Support cases](billing-example-policies.md#example-awstaxexemption).  | 
| 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 Support cases](billing-example-policies.md#example-awstaxexemption).  | 
| 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. | 

# AWS Billing policy examples


**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](migrate-iam-permissions.md) or bulk policy migrator to update polices from your payer account. You can also use the [old to granular action mapping reference](migrate-granularaccess-iam-mapping-reference.md) 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**  
These policies require that you activate IAM user access to the Billing and Cost Management console on the [Account Settings](https://console.aws.amazon.com/billing/home#/account) console page. For more information, see [Activating access to the Billing and Cost Management console](control-access-billing.md#ControllingAccessWebsite-Activate).
To use AWS managed policies, see [AWS managed policies](managed-policies.md).

This topic contains example policies that you can attach to your IAM user or group to control access to your account's billing information and tools. The following basic rules apply to IAM policies for Billing and Cost Management:
+ `Version` is always `2012-10-17 `.
+ `Effect` is always `Allow` or `Deny`.
+ `Action` is the name of the action or a wildcard (`*`). 

  The action prefix is `budgets` for AWS Budgets, `cur` for AWS Cost and Usage Reports, `aws-portal` for AWS Billing, or `ce` for Cost Explorer.
+ `Resource` is always `*` for AWS Billing.

  For actions that are performed on a `budget` resource, specify the budget Amazon Resource Name (ARN).
+ It's possible to have multiple statements in one policy.

For a list of actions policies for the AWS Cost Management console, see [AWS Cost Management policy examples](https://docs.aws.amazon.com/cost-management/latest/userguide/billing-example-policies.html) in the *AWS Cost Management user guide*.

**Topics**
+ [

## Allow IAM users to view your billing information
](#example-billing-view-billing-only)
+ [

## Allow IAM users to view your billing information and carbon footprint report
](#example-ccft-policy)
+ [

## Allow IAM users to access the reports console page
](#example-billing-view-reports)
+ [

## Deny IAM users access to the Billing and Cost Management consoles
](#example-billing-deny-all)
+ [

## Deny AWS Console cost and usage widget access for member accounts
](#example-billing-deny-widget)
+ [

## Deny AWS Console cost and usage widget access for specific IAM users and roles
](#example-billing-deny-ce)
+ [

## Allow IAM users to view your billing information, but deny access to carbon footprint report
](#example-ccft-policy-deny)
+ [

## Allow IAM users to access carbon footprint reporting, but deny access to billing information
](#example-ccft-policy-allow)
+ [

## Allow full access to AWS services but deny IAM users access to the Billing and Cost Management consoles
](#ExampleAllowAllDenyBilling)
+ [

## Allow IAM users to view the Billing and Cost Management consoles except for account settings
](#example-billing-read-only)
+ [

## Allow IAM users to modify billing information
](#example-billing-deny-modifybilling)
+ [

## Deny access to account settings, but allow full access to all other billing and usage information
](#example-billing-deny-modifyaccount)
+ [

## Deposit reports into an Amazon S3 bucket
](#example-billing-s3-bucket)
+ [

## Find products and prices
](#example-policy-pe-api)
+ [

## View costs and usage
](#example-policy-ce-api)
+ [

## Enable and disable AWS Regions
](#enable-disable-regions)
+ [

## View and manage cost categories
](#example-policy-cc-api)
+ [

## Create, view, edit, or delete AWS Cost and Usage Reports
](#example-policy-report-definition)
+ [

## View and manage purchase orders
](#example-view-manage-purchaseorders)
+ [

## View and update the Cost Explorer preferences page
](#example-view-update-ce)
+ [

## View, create, update, and delete using the Cost Explorer reports page
](#example-view-ce-reports)
+ [

## View, create, update, and delete reservation and Savings Plans alerts
](#example-view-ce-expiration)
+ [

## Allow read-only access to AWS Cost Anomaly Detection
](#example-policy-ce-ad)
+ [

## Allow AWS Budgets to apply IAM policies and SCPs
](#example-budgets-IAM-SCP)
+ [

## Allow AWS Budgets to apply IAM policies and SCPs and target EC2 and RDS instances
](#example-budgets-applySCP)
+ [

## Allow IAM users to view US tax exemptions and create Support cases
](#example-awstaxexemption)
+ [

## (For customers with a billing or contact address in India) Allow read-only access to customer verification information
](#example-aispl-verification)
+ [

## (For customers with a billing or contact address in India) View, create, and update customer verification information
](#example-aispl-verification-view)
+ [

## View AWS Migration Acceleration Program information in the Billing console
](#read-only-migration-acceleration-program-policy)
+ [

## Allow access to AWS invoice configuration in the Billing console
](#invoice-config-policy)

## Allow IAM users to view your billing information


To allow an IAM user to view your billing information without giving the IAM user access to sensitive account information, use a policy similar to the following example policy. Such a policy prevents users from accessing your password and account activity reports. This policy allows IAM users to view the following Billing and Cost Management console pages, without giving them access to the **Account Settings** or **Reports** console pages:
+ **Dashboard**
+ **Cost Explorer**
+ **Bills**
+ **Orders and invoices**
+ **Consolidated Billing**
+ **Preferences**
+ **Credits**
+ **Advance Payment**

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": "aws-portal:ViewBilling",
            "Resource": "*"
        }
    ]
}
```

------

## Allow IAM users to view your billing information and carbon footprint report


To allow an IAM user to view both billing information and carbon footprint reporting, use a policy similar to the following example. This policy prevents users from accessing your password and account activity reports. This policy allows IAM users to view the following Billing and Cost Management console pages, without giving them access to the **Account Settings** or **Reports** console pages:
+ **Dashboard**
+ **Cost Explorer**
+ **Bills**
+ **Orders and invoices**
+ **Consolidated Billing**
+ **Preferences**
+ **Credits**
+ **Advance Payment**
+ **The AWS Customer Carbon Footprint Tool section of the AWS Cost and Usage Reports page**

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {"Effect": "Allow",
            "Action": "aws-portal:ViewBilling",
            "Resource": "*"
        },
        {"Effect": "Allow",
            "Action": "sustainability:GetCarbonFootprintSummary",
            "Resource": "*"
        }
    ]
}
```

------

## Allow IAM users to access the reports console page


To allow an IAM user to access the **Reports** console page and to view the usage reports that contain account activity information, use a policy similar to this example policy.

For definitions of each action, see [AWS Billing console actions](security_iam_id-based-policy-examples.md#user-permissions).

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "aws-portal:ViewUsage",
                "aws-portal:ViewBilling",
                "cur:DescribeReportDefinitions",
                "cur:PutReportDefinition",
                "cur:DeleteReportDefinition",
                "cur:ModifyReportDefinition"
            ],
            "Resource": "*"
        }
    ]
}
```

------

## Deny IAM users access to the Billing and Cost Management consoles


To explicitly deny an IAM user access to the all Billing and Cost Management console pages, use a policy similar to this example policy.

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Deny",
            "Action": "aws-portal:*",
            "Resource": "*"
        }
    ]
}
```

------

## Deny AWS Console cost and usage widget access for member accounts


To restrict member (linked) account access to cost and usage data, use your management (payer) account to access the Cost Explorer preferences tab and uncheck **Linked Account Access**. This will deny access to cost and usage data from the Cost Explorer (AWS Cost Management) console, Cost Explorer API, and AWS Console Home page's cost and usage widget regardless of the IAM actions a member account’s IAM user or role has.

## Deny AWS Console cost and usage widget access for specific IAM users and roles


To deny AWS Console cost and usage widget access for specific IAM users and roles, use the permissions policy below.

**Note**  
Adding this policy to an IAM user or role will deny users access to Cost Explorer (AWS Cost Management) console and Cost Explorer APIs as well.

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Deny",
            "Action": "ce:*",
            "Resource": "*"
        }
    ]
}
```

------

## Allow IAM users to view your billing information, but deny access to carbon footprint report


To allow an IAM user to both billing information in the Billing and Cost Management consoles, but doesn't allow access to the AWS Customer Carbon Footprint Tool. This tool is located in the AWS Cost and Usage Reports page.

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {"Effect": "Allow",
            "Action": "aws-portal:ViewBilling",
            "Resource": "*"
        },
        {"Effect": "Deny",
            "Action": "sustainability:GetCarbonFootprintSummary",
            "Resource": "*"
        }
    ]
}
```

------

## Allow IAM users to access carbon footprint reporting, but deny access to billing information


To allow an IAM users to access the AWS Customer Carbon Footprint Tool in the AWS Cost and Usage Reports page, but denies access to view billing information in the Billing and Cost Management consoles.

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {"Effect": "Deny",
            "Action": "aws-portal:ViewBilling",
            "Resource": "*"
        },
        {"Effect": "Allow",
            "Action": "sustainability:GetCarbonFootprintSummary",
            "Resource": "*"
        }
    ]
}
```

------

## Allow full access to AWS services but deny IAM users access to the Billing and Cost Management consoles


To deny IAM users access to everything on the Billing and Cost Management console, use the following policy. Deny user access to AWS Identity and Access Management (IAM) to prevent access to the policies that control access to billing information and tools.

**Important**  
This policy doesn't allow any actions. Use this policy in combination with other policies that allow specific actions.

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Deny",
            "Action": [
                "aws-portal:*",
                "iam:*"
            ],
            "Resource": "*"
        }
    ]
}
```

------

## Allow IAM users to view the Billing and Cost Management consoles except for account settings


This policy allows read-only access to all of the Billing and Cost Management console. This includes the **Payments Method** and **Reports** console pages. However, this policy denies access to the **Account Settings** page. This means it protects the account password, contact information, and security questions. 

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": "aws-portal:View*",
            "Resource": "*"
        },
        {
            "Effect": "Deny",
            "Action": "aws-portal:*Account",
            "Resource": "*"
        }
    ]
}
```

------

## Allow IAM users to modify billing information


To allow IAM users to modify account billing information in the Billing and Cost Management console, allow IAM users to view your billing information. The following policy example allows an IAM user to modify the **Consolidated Billing**, **Preferences**, and **Credits** console pages. It also allows an IAM user to view the following Billing and Cost Management console pages:
+ **Dashboard**
+ **Cost Explorer**
+ **Bills**
+ **Orders and invoices**
+ **Advance Payment**

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": "aws-portal:*Billing",
            "Resource": "*"
        }
    ]
}
```

------

## Deny access to account settings, but allow full access to all other billing and usage information


To protect your account password, contact information, and security questions, deny IAM user access to **Account Settings** while still enabling full access to the rest of the functionality in the Billing and Cost Management console. The following is an example policy.

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "aws-portal:*Billing",
                "aws-portal:*Usage",
                "aws-portal:*PaymentMethods"
            ],
            "Resource": "*"
        },
        {
            "Effect": "Deny",
            "Action": "aws-portal:*Account",
            "Resource": "*"
        }
    ]
}
```

------

## Deposit reports into an Amazon S3 bucket


The following policy allows Billing and Cost Management to save your detailed AWS bills to an Amazon S3 bucket if you own both the AWS account and the Amazon S3 bucket. This policy must be applied to the Amazon S3 bucket, rather than an IAM user. This is because it's a resource-based policy, not a user-based policy. We recommend that you deny IAM user access to the bucket for IAM users who don't need access to your bills.

Replace *amzn-s3-demo-bucket1* with the name of your bucket.

For more information, see [ Using Bucket Policies and User Policies](https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-iam-policies.html) in the *Amazon Simple Storage Service User Guide*.

------
#### [ JSON ]

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
  {
    "Effect": "Allow",
    "Principal": {
      "Service": "billingreports.amazonaws.com"
    },
    "Action": [
      "s3:GetBucketAcl",
      "s3:GetBucketPolicy"
    ],
    "Resource": "arn:aws:s3:::amzn-s3-demo-bucket1"
  },
  {
    "Effect": "Allow",
    "Principal": {
      "Service": "billingreports.amazonaws.com"
    },
    "Action": "s3:PutObject",
    "Resource": "arn:aws:s3:::amzn-s3-demo-bucket1/*"
  }
  ]
}
```

------

## Find products and prices


To allow an IAM user to use the AWS Price List Service API, use the following policy to grant them access.

This policy grants permission to use both the AWS Price List Bulk API AWS Price List Query API.

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "pricing:DescribeServices",
                "pricing:GetAttributeValues",
                "pricing:GetProducts",
                "pricing:GetPriceListFileUrl",
                "pricing:ListPriceLists"
            ],
            "Resource": [
                "*"
            ]
        }
    ]
}
```

------

## View costs and usage


To allow IAM users to use the AWS Cost Explorer API, use the following policy to grant them access.

------
#### [ JSON ]

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "ce:*"
      ],
      "Resource": [
        "*"
      ]
    }
  ]
}
```

------

## Enable and disable AWS Regions


For an example IAM policy that allows users to enable and disable Regions, see [AWS: Allows Enabling and Disabling AWS Regions](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_examples_aws-enable-disable-regions.html) in the *IAM User Guide*. 

## View and manage cost categories


To allow IAM users to use, view, and manage cost categories, use the following policy to grant them access.

------
#### [ JSON ]

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Sid": "VisualEditor0",
      "Effect": "Allow",
      "Action": [
        "aws-portal:ViewBilling",
        "ce:GetCostAndUsage",
        "ce:DescribeCostCategoryDefinition",
        "ce:UpdateCostCategoryDefinition",
        "ce:CreateCostCategoryDefinition",
        "ce:DeleteCostCategoryDefinition",
        "ce:ListCostCategoryDefinitions",
        "ce:TagResource",
        "ce:UntagResource",
        "ce:ListTagsForResource",
        "pricing:DescribeServices"
      ],
      "Resource": "*"
    }
  ]
}
```

------

## Create, view, edit, or delete AWS Cost and Usage Reports


This policy allows an IAM user to create, view, edit, or delete `sample-report` using the API.

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "ManageSampleReport",
            "Effect": "Allow",
			"Action": [
                "cur:PutReportDefinition", 
                "cur:DeleteReportDefinition",
                "cur:ModifyReportDefinition"
            ],
            "Resource": "arn:aws:cur:*:123456789012:definition/sample-report"
        },
        {
            "Sid": "DescribeReportDefs",
            "Effect": "Allow",
            "Action": "cur:DescribeReportDefinitions",
            "Resource": "*"
        }
    ]
}
```

------

## View and manage purchase orders


This policy allows an IAM user to view and manage purchase orders, using the following policy to grant access.

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "aws-portal:ViewBilling",
                "purchase-orders:*"
            ],
            "Resource": "*"
        }
    ]
}
```

------

## View and update the Cost Explorer preferences page


This policy allows an IAM user to view and update using the **Cost Explorer preferences page**.

------
#### [ JSON ]

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Sid": "VisualEditor0",
      "Effect": "Allow",
      "Action": [
        "aws-portal:ViewBilling",
        "ce:UpdatePreferences"
       ],
      "Resource": "*"
    }
  ]
}
```

------

The following policy allows IAM users to view Cost Explorer, but deny permission to view or edit the **Preferences** page.

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "aws-portal:ViewBilling"
            ],
            "Resource": "*"
        },
        {
            "Sid": "VisualEditor1",
            "Effect": "Deny",
            "Action": [
                "ce:GetPreferences",
                "ce:UpdatePreferences"
            ],
            "Resource": "*"
        }
    ]
}
```

------

The following policy allows IAM users to view Cost Explorer, but deny permission to edit the **Preferences** page.

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "aws-portal:ViewBilling"
            ],
            "Resource": "*"
        },
        {
            "Sid": "VisualEditor1",
            "Effect": "Deny",
            "Action": [
                "ce:UpdatePreferences"
            ],
            "Resource": "*"
        }
    ]
}
```

------

## View, create, update, and delete using the Cost Explorer reports page


This policy allows an IAM user to view, create, update, and delete using the **Cost Explorer reports page**.

------
#### [ JSON ]

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Sid": "VisualEditor0",
      "Effect": "Allow",
      "Action": [
        "aws-portal:ViewBilling",
        "ce:CreateReport",
        "ce:UpdateReport",
        "ce:DeleteReport"
       ],
      "Resource": "*"
    }
  ]
}
```

------

The following policy allows IAM users to view Cost Explorer, but deny permission to view or edit the **Reports** page.

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "aws-portal:ViewBilling"
            ],
            "Resource": "*"
        },
        {
            "Sid": "VisualEditor1",
            "Effect": "Deny",
            "Action": [
                "ce:DescribeReport",
                "ce:CreateReport",
                "ce:UpdateReport",
                "ce:DeleteReport"
            ],
            "Resource": "*"
        }
    ]
}
```

------

The following policy allows IAM users to view Cost Explorer, but deny permission to edit the **Reports** page.

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "aws-portal:ViewBilling"
            ],
            "Resource": "*"
        },
        {
            "Sid": "VisualEditor1",
            "Effect": "Deny",
            "Action": [
                "ce:CreateReport",
                "ce:UpdateReport",
                "ce:DeleteReport"
            ],
            "Resource": "*"
        }
    ]
}
```

------

## View, create, update, and delete reservation and Savings Plans alerts


This policy allows an IAM user to view, create, update, and delete [reservation expiration alerts](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/ce-ris.html) and [Savings Plans alerts](https://docs.aws.amazon.com/savingsplans/latest/userguide/sp-overview.html#sp-alert). To edit reservation expiration alerts or Savings Plans alerts, a user needs all three granular actions: `ce:CreateNotificationSubscription`, `ce:UpdateNotificationSubscription`, and `ce:DeleteNotificationSubscription`.

------
#### [ JSON ]

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Sid": "VisualEditor0",
      "Effect": "Allow",
      "Action": [
        "aws-portal:ViewBilling",
        "ce:CreateNotificationSubscription",
        "ce:UpdateNotificationSubscription",
        "ce:DeleteNotificationSubscription"
       ],
      "Resource": "*"
    }
  ]
}
```

------

The following policy allows IAM users to view Cost Explorer, but denies permission to view or edit the **Reservation Expiration Alerts** and **Savings Plans alert** pages.

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "aws-portal:ViewBilling"
            ],
            "Resource": "*"
        },
        {
            "Sid": "VisualEditor1",
            "Effect": "Deny",
            "Action": [
                "ce:DescribeNotificationSubscription",
                "ce:CreateNotificationSubscription",
                "ce:UpdateNotificationSubscription",
                "ce:DeleteNotificationSubscription"
            ],
            "Resource": "*"
        }
    ]
}
```

------

The following policy allows IAM users to view Cost Explorer, but denies permission to edit the **Reservation Expiration Alerts** and **Savings Plans alert** pages.

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "aws-portal:ViewBilling"
            ],
            "Resource": "*"
        },
        {
            "Sid": "VisualEditor1",
            "Effect": "Deny",
            "Action": [
                "ce:CreateNotificationSubscription",
                "ce:UpdateNotificationSubscription",
                "ce:DeleteNotificationSubscription"
            ],
            "Resource": "*"
        }
    ]
}
```

------

## Allow read-only access to AWS Cost Anomaly Detection


To allow IAM users read-only access to AWS Cost Anomaly Detection, use the following policy to grant them access. `ce:ProvideAnomalyFeedback` is optional as a part of the read-only access.

------
#### [ JSON ]

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Action": [
        "ce:Get*"
      ],
      "Effect": "Allow",
      "Resource": "*"
    }
  ]
}
```

------

## Allow AWS Budgets to apply IAM policies and SCPs


This policy allows AWS Budgets to apply IAM policies and service control policies (SCPs) on behalf of the user.

------
#### [ JSON ]

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "iam:AttachGroupPolicy",
        "iam:AttachRolePolicy",
        "iam:AttachUserPolicy",
        "iam:DetachGroupPolicy",
        "iam:DetachRolePolicy",
        "iam:DetachUserPolicy",
        "organizations:AttachPolicy",
        "organizations:DetachPolicy"
      ],
      "Resource": "*"
    }
  ]
}
```

------

## Allow AWS Budgets to apply IAM policies and SCPs and target EC2 and RDS instances


This policy allows AWS Budgets to apply IAM policies and service control policies (SCPs), and to target Amazon EC2 and Amazon RDS instances on behalf of the user.

Trust policy

------
#### [ JSON ]

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": {
        "Service": "budgets.amazonaws.com"
      },
      "Action": "sts:AssumeRole"
    }
  ]
}
```

------

Permissions policy

------
#### [ JSON ]

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "ec2:DescribeInstanceStatus",
        "ec2:StartInstances",
        "ec2:StopInstances",
        "iam:AttachGroupPolicy",
        "iam:AttachRolePolicy",
        "iam:AttachUserPolicy",
        "iam:DetachGroupPolicy",
        "iam:DetachRolePolicy",
        "iam:DetachUserPolicy",
        "organizations:AttachPolicy",
        "organizations:DetachPolicy",
        "rds:DescribeDBInstances",
        "rds:StartDBInstance",
        "rds:StopDBInstance",
        "ssm:StartAutomationExecution"
      ],
      "Resource": "*"
    }
  ]
}
```

------

## Allow IAM users to view US tax exemptions and create Support cases


This policy allows an IAM user to view US tax exemptions and create Support cases to upload exemption certificates in the tax exemption console.

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Action": [
                "aws-portal:*",
                "tax:GetExemptions",
                "tax:UpdateExemptions",
                "support:CreateCase",
                "support:AddAttachmentsToSet"
            ],
            "Resource": [
                "*"
            ],
            "Effect": "Allow"
        }
    ]
}
```

------

## (For customers with a billing or contact address in India) Allow read-only access to customer verification information


This policy allows IAM users read-only access to customer verification information.

For definitions of each action, see [AWS Billing console actions](security_iam_id-based-policy-examples.md#user-permissions).

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [{
        "Effect": "Allow",
        "Action": [
            "customer-verification:GetCustomerVerificationEligibility",
            "customer-verification:GetCustomerVerificationDetails"
        ],
        "Resource": "*"
    }]
}
```

------

## (For customers with a billing or contact address in India) View, create, and update customer verification information


This policy allows IAM users to manage their customer verification information. 

For definitions of each action, see [AWS Billing console actions](security_iam_id-based-policy-examples.md#user-permissions)

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [{
        "Effect": "Allow",
        "Action": [
            "customer-verification:CreateCustomerVerificationDetails",
            "customer-verification:UpdateCustomerVerificationDetails",
            "customer-verification:GetCustomerVerificationEligibility",
            "customer-verification:GetCustomerVerificationDetails"
        ],
        "Resource": "*"
    }]
}
```

------

## View AWS Migration Acceleration Program information in the Billing console


This policy allows IAM users to view the Migration Acceleration Program agreements, credits, and eligible spend for the payer's account in the Billing console.

For definitions of each action, see [AWS Billing console actions](security_iam_id-based-policy-examples.md#user-permissions).

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [{
        "Effect": "Allow",
        "Action": [
            "mapcredits:ListQuarterSpend",
            "mapcredits:ListQuarterCredits",
            "mapcredits:ListAssociatedPrograms"
        ],
        "Resource": "*"
    }]
}
```

------

## Allow access to AWS invoice configuration in the Billing console


This policy allows IAM users AWS invoice configuration access in the Billing console.

For definitions of each action, see [AWS Billing console actions](security_iam_id-based-policy-examples.md#user-permissions).

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "invoicing:ListInvoiceUnits",
                "invoicing:GetInvoiceUnit",
                "invoicing:CreateInvoiceUnit",
                "invoicing:UpdateInvoiceUnit",
                "invoicing:DeleteInvoiceUnit",
                "invoicing:BatchGetInvoiceProfile"
            ],
            "Resource": [
                "*"
            ]
        }
    ]
}
```

------

# Migrating access control for AWS Billing
Migrating access control

**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](migrate-iam-permissions.md) or bulk policy migrator to update polices from your payer account. You can also use the [old to granular action mapping reference](migrate-granularaccess-iam-mapping-reference.md) 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.

You can use fine-grained access controls to provide individuals in your organization access to AWS Billing and Cost Management services. For example, you can provide access to Cost Explorer without providing access to the Billing and Cost Management console.

To use the fine-grained access controls, you'll need to migrate your policies from under `aws-portal` to the new IAM actions.

The following IAM actions in your permission policies or service control policies (SCP) require updating with this migration:
+ `aws-portal:ViewAccount`
+ `aws-portal:ViewBilling`
+ `aws-portal:ViewPaymentMethods`
+ `aws-portal:ViewUsage`
+ `aws-portal:ModifyAccount`
+ `aws-portal:ModifyBilling`
+ `aws-portal:ModifyPaymentMethods`
+ `purchase-orders:ViewPurchaseOrders`
+ `purchase-orders:ModifyPurchaseOrders`

To learn how to use the **Affected policies** tool to identify your impacted IAM policies, see [How to use the affected policies tool](migrate-security-iam-tool.md).

**Note**  
API access to AWS Cost Explorer, AWS Cost and Usage Reports, and AWS Budgets remains unaffected.  
[Activating access to the Billing and Cost Management console](control-access-billing.md#ControllingAccessWebsite-Activate) remain unchanged.

**Topics**
+ [

## Managing access permissions
](#migrate-control-access-billing)
+ [

# Using the console to bulk migrate your policies
](migrate-granularaccess-console.md)
+ [

# How to use the affected policies tool
](migrate-security-iam-tool.md)
+ [

# Use scripts to bulk migrate your policies to use fine-grained IAM actions
](migrate-iam-permissions.md)
+ [

# Mapping fine-grained IAM actions reference
](migrate-granularaccess-iam-mapping-reference.md)

## Managing access permissions
Managing access permissions

AWS Billing integrates with the AWS Identity and Access Management (IAM) service so that you can control who in your organization can access specific pages on the [Billing and Cost Management console](https://console.aws.amazon.com/billing/). This includes features like Payments, Billing, Credits, Free Tier, Payment preferences, Consolidated billing, Tax settings, and Account pages.

Use the following IAM permissions for granular control for the Billing and Cost Management console.

To provide fine-grained access, replace the `aws-portal` policy with `account`, `billing`, `payments`, `freetier`, `invoicing`, `tax`, and `consolidatedbilling`.

Additionally, replace `purchase-orders:ViewPurchaseOrders` and `purchase-orders:ModifyPurchaseOrders` with the fine-grained actions under `purchase-orders`, `account`, and `payments`.

### Using fine-grained AWS Billing actions


This table summarizes the permissions that allow or deny IAM users and roles access to your billing information. For examples of policies that use these permissions, see [AWS Billing policy examples](billing-example-policies.md). 

For a list of actions for the AWS Cost Management console, see [AWS Cost Management actions policies](https://docs.aws.amazon.com/cost-management/latest/userguide/billing-permissions-ref.html#user-permissions) in the *AWS Cost Management User Guide*.

[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/migrate-granularaccess-whatis.html)

# Using the console to bulk migrate your policies
Bulk migrating your policies

**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](migrate-iam-permissions.md) or bulk policy migrator to update polices from your payer account. You can also use the [old to granular action mapping reference](migrate-granularaccess-iam-mapping-reference.md) 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.

This section covers how you can use the [AWS Billing and Cost Management console](https://console.aws.amazon.com/billing/) to migrate your legacy policies from your Organizations accounts or standard accounts to the fine-grained actions in bulk. You can complete migrating your legacy policies using the console in two ways:

**Using the AWS recommended migration process**  
This is a streamlined, single-action process where you migrates legacy actions to the fine-grained actions as mapped by AWS. For more information, see [Using recommended actions to bulk migrate legacy policies](migrate-console-streamlined.md).

**Using the customized migration process**  
This process allows you to review and change the actions recommended by AWS prior to the bulk migration, as well as customize which accounts in your organization are migrated. For more information, see [Customizing actions to bulk migrate legacy policies](migrate-console-customized.md).

## Prerequisites for bulk migrating using the console
Prerequisites

Both migration options require you to consent in the console so that AWS can recommend fine-grained actions to the legacy IAM actions you have assigned. To do this, you will need to login to your AWS account as an [IAM principal](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html) with the following IAM actions to continue with the policy updates.

------
#### [ Management account ]

```
// Required to view page
"ce:GetConsoleActionSetEnforced",
"aws-portal:GetConsoleActionSetEnforced",
"purchase-orders:GetConsoleActionSetEnforced",
"ce:UpdateConsoleActionSetEnforced",
"aws-portal:UpdateConsoleActionSetEnforced",
"purchase-orders:UpdateConsoleActionSetEnforced",
"iam:GetAccountAuthorizationDetails",
"s3:CreateBucket",
"s3:DeleteObject",
"s3:ListAllMyBuckets",
"s3:GetObject",
"s3:PutObject",
"s3:ListBucket",
"s3:PutBucketAcl",
"s3:PutEncryptionConfiguration",
"s3:PutBucketVersioning",
"s3:PutBucketPublicAccessBlock",
"lambda:GetFunction",
"lambda:DeleteFunction",
"lambda:CreateFunction",
"lambda:InvokeFunction",
"lambda:RemovePermission",
"scheduler:GetSchedule", 
"scheduler:DeleteSchedule",
"scheduler:CreateSchedule",
"cloudformation:ActivateOrganizationsAccess",
"cloudformation:CreateStackSet",
"cloudformation:CreateStackInstances",
"cloudformation:DescribeStackSet",
"cloudformation:DescribeStackSetOperation",
"cloudformation:ListStackSets",
"cloudformation:DeleteStackSet",
"cloudformation:DeleteStackInstances",
"cloudformation:ListStacks",
"cloudformation:ListStackInstances",
"cloudformation:ListStackSetOperations",
"cloudformation:CreateStack",
"cloudformation:UpdateStackInstances",
"cloudformation:UpdateStackSet",
"cloudformation:DescribeStacks",
"ec2:DescribeRegions",
"iam:GetPolicy",
"iam:GetPolicyVersion",
"iam:GetUserPolicy",
"iam:GetGroupPolicy",
"iam:GetRole",
"iam:GetRolePolicy",
"iam:CreatePolicyVersion",
"iam:DeletePolicyVersion",
"iam:ListAttachedRolePolicies",
"iam:ListPolicyVersions",
"iam:PutUserPolicy",
"iam:PutGroupPolicy",
"iam:PutRolePolicy",
"iam:SetDefaultPolicyVersion",
"iam:GenerateServiceLastAccessedDetails",
"iam:GetServiceLastAccessedDetails",
"iam:GenerateOrganizationsAccessReport",
"iam:GetOrganizationsAccessReport",
"organizations:ListAccounts",
"organizations:ListPolicies",
"organizations:DescribePolicy",
"organizations:UpdatePolicy",
"organizations:DescribeOrganization",
"organizations:ListAccountsForParent",
"organizations:ListRoots",
"sts:AssumeRole",
"sso:ListInstances",
"sso:ListPermissionSets",
"sso:GetInlinePolicyForPermissionSet",
"sso:DescribePermissionSet",
"sso:PutInlinePolicyToPermissionSet",
"sso:ProvisionPermissionSet",
"sso:DescribePermissionSetProvisioningStatus",
"notifications:ListNotificationHubs" // Added to ensure Notifications API does not return 403
```

------
#### [ Member account or standard account ]

```
// Required to view page
"ce:GetConsoleActionSetEnforced",
"aws-portal:GetConsoleActionSetEnforced",
"purchase-orders:GetConsoleActionSetEnforced",
"ce:UpdateConsoleActionSetEnforced", // Not needed for member account
"aws-portal:UpdateConsoleActionSetEnforced", // Not needed for member account
"purchase-orders:UpdateConsoleActionSetEnforced", // Not needed for member account
"iam:GetAccountAuthorizationDetails",
"ec2:DescribeRegions",
"s3:CreateBucket",
"s3:DeleteObject",
"s3:ListAllMyBuckets",
"s3:GetObject",
"s3:PutObject",
"s3:ListBucket",
"s3:PutBucketAcl", 
"s3:PutEncryptionConfiguration",
"s3:PutBucketVersioning",
"s3:PutBucketPublicAccessBlock",
"iam:GetPolicy",
"iam:GetPolicyVersion",
"iam:GetUserPolicy",
"iam:GetGroupPolicy",
"iam:GetRolePolicy",
"iam:GetRole",
"iam:CreatePolicyVersion",
"iam:DeletePolicyVersion",
"iam:ListAttachedRolePolicies",
"iam:ListPolicyVersions",
"iam:PutUserPolicy",
"iam:PutGroupPolicy",
"iam:PutRolePolicy",
"iam:SetDefaultPolicyVersion",
"iam:GenerateServiceLastAccessedDetails",
"iam:GetServiceLastAccessedDetails",
"notifications:ListNotificationHubs" // Added to ensure Notifications API does not return 403
```

------

**Topics**
+ [

## Prerequisites for bulk migrating using the console
](#migrate-granularaccess-console-prereq)
+ [

# Using recommended actions to bulk migrate legacy policies
](migrate-console-streamlined.md)
+ [

# Customizing actions to bulk migrate legacy policies
](migrate-console-customized.md)
+ [

# Rollingback your bulk migration policy changes
](migrate-console-rollback.md)
+ [

## Confirming your migration
](#migrate-console-complete)

# Using recommended actions to bulk migrate legacy policies
Using the AWS recommended actions

You can migrate all of your legacy policies by using the fine-grained actions mapped by AWS. For AWS Organizations, this applies to all legacy policies across all accounts. Once you complete your migration process, the fine-grained actions are effective. You have the option to test the bulk migration process using test accounts before committing your entire organization. For more information, see the following section.

**To migrate all of your policies using fine-grained actions mapped by AWS**

1. Sign in to the [AWS Management Console](https://console.aws.amazon.com/).

1. In the search bar at the top of the page, enter **Bulk Policy Migrator**.

1. On the **Manage new IAM actions** page, choose **Confirm and migrate**.

1. Remain on the **Migration in progress** page until the migration is complete. See the status bar for progress.

1. Once the **Migration in progress** section updates to **Migration successful**, you are redirected to the **Manage new IAM actions** page.

## Testing your bulk migration
Testing bulk migration

You can test the bulk migration from legacy policies to AWS recommended fine-grained actions using test accounts before committing to migrating your entire organization. Once you complete your migration process on your test accounts, the fine-grained actions are applied to your test accounts.

**To use your test accounts for bulk migration**

1. Sign in to the [AWS Management Console](https://console.aws.amazon.com/).

1. In the search bar at the top of the page, enter **Bulk Policy Migrator**.

1. On the **Manage new IAM actions** page, choose **Customize**.

1. Once the accounts and policies load in the **Migrate accounts** table, select one or more test accounts from the list of AWS accounts.

1. (Optional) To change the mapping between your legacy policy and AWS recommended fine-grained actions, choose **View default mapping**. Change the mapping, and choose **Save**.

1. Choose **Confirm and migrate**.

1. Remain on the console page until migration is complete.

# Customizing actions to bulk migrate legacy policies
Customizing your fine-grained actions

You can customize your bulk migration in various ways, instead of using the AWS recommended action for all of your accounts. You have the option to review any changes needed to your legacy policies before migrating, choose specific accounts in your Organizations to migrate at a time, and change the access range by updating the mapped fine-grained actions.

**To review your affected policies before bulk migrating**

1. Sign in to the [AWS Management Console](https://console.aws.amazon.com/).

1. In the search bar at the top of the page, enter **Bulk Policy Migrator**.

1. On the **Manage new IAM actions** page, choose **Customize**.

1. Once the accounts and policies load in the **Migrate accounts** table, choose the number in the **Number of affected IAM policies** column to see the affected policies. You will also see when that policy was used last to access the Billing and Cost Management consoles.

1. Choose a policy name to open it in the IAM console to view definitions and manually update the policy.
**Notes**  
Doing this might log you out of your current account if the policy is from another member account.
You won't be redirected to the corresponding IAM page if your current account has a bulk migration in progress.

1. (Optional) Choose **View default mapping** to see the legacy policies to understand the fine-grained policy mapped by AWS.

**To migrate a select group of accounts to migrate from your organization**

1. Sign in to the [AWS Management Console](https://console.aws.amazon.com/).

1. In the search bar at the top of the page, enter **Bulk Policy Migrator**.

1. On the **Manage new IAM actions** page, choose **Customize**.

1. Once the accounts and policies load in the **Migrate accounts** table, select one or more accounts to migrate.

1. Choose **Confirm and migrate**.

1. Remain on the console page until migration is complete.

**To change the access range by updating the mapped fine-grained actions**

1. Sign in to the [AWS Management Console](https://console.aws.amazon.com/).

1. In the search bar at the top of the page, enter **Bulk Policy Migrator**.

1. On the **Manage new IAM actions** page, choose **Customize**.

1. Choose **View default mapping**.

1. Choose **Edit**.

1. Add or remove IAM actions for the Billing and Cost Management services you want to control access to. For more information about fine-grained actions and the access it controls, see [Mapping fine-grained IAM actions reference](migrate-granularaccess-iam-mapping-reference.md).

1. Choose **Save changes**.

The updated mapping is used for all future migrations from the account you're logged into. This can be changed at any time.

# Rollingback your bulk migration policy changes
Rollingback to legacy actions

You can rollback all policy changes you make during the bulk migration process safely, using the steps provided in the bulk migration tool. The rollback feature works at an account-level. You can rollback policy updates for all accounts, or specific groups of migrated accounts. However, you can't rollback changes for specific policies in an account.

**To rollback bulk migration changes**

1. Sign in to the [AWS Management Console](https://console.aws.amazon.com/).

1. In the search bar at the top of the page, enter **Bulk Policy Migrator**.

1. On the **Manage new IAM actions** page, choose the **Rollback changes** tab.

1. Select any accounts to rollback. The accounts must have `Migrated` showing in the **Rollback status** column.

1. Choose **Rollback changes** button.

1. Remain on the console page until rollback is complete.

## Confirming your migration


You can see if there are any AWS Organizations accounts that still need to migrate by using the migration tool.

**To confirm if all accounts migrated**

1. Sign in to the [AWS Management Console](https://console.aws.amazon.com/).

1. In the search bar at the top of the page, enter **Bulk Policy Migrator**.

1. On the **Manage new IAM actions** page, choose the **Migrate accounts** tab.

All accounts have migrated successfully if the table doesn't show any remaining accounts.

# How to use the affected policies tool


**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](migrate-iam-permissions.md) or bulk policy migrator to update polices from your payer account. You can also use the [old to granular action mapping reference](migrate-granularaccess-iam-mapping-reference.md) 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.

You can use the **Affected policies** tool in the Billing console to identify IAM policies (excluding SCPs), and reference the IAM actions affected by this migration. Use the **Affected policies** tool to do the following tasks: 
+ Identify IAM policies and reference the IAM actions affected by this migration
+ Copy the updated policy to your clipboard
+ Open the affected policy in IAM policy editor
+ Save the updated policy for your account
+ Turn on the fine-grained permissions and disable the old actions

This tool operates within the boundaries of the AWS account you're signed into, and information regarding other AWS Organizations accounts are not disclosed.

**To use the Affected policies tool**

1. Sign in to the AWS Management Console and open the AWS Billing and Cost Management console at [https://console.aws.amazon.com/costmanagement/](https://console.aws.amazon.com/costmanagement/).

1. Paste the following URL into your browser to access the **Affected policies** tool: [https://console.aws.amazon.com/poliden/home?region=us-east-1#/](https://console.aws.amazon.com/poliden/home?region=us-east-1#/).
**Note**  
You must have the `iam:GetAccountAuthorizationDetails` permission to view this page.

1. Review the table that lists the affected IAM policies. Use the **Deprecated IAM actions** column to review specific IAM actions referenced in a policy.

1. Under the **Copy updated policy** column, choose **Copy** to copy the updated policy to your clipboard. The updated policy contains the existing policy and the suggested fine-grained actions appended to it as a separate `Sid` block. This block has the prefix `AffectedPoliciesMigrator` at the end of the policy.

1. Under the **Edit Policy in IAM Console** column, choose **Edit** to go to IAM policy editor. You will see the JSON of your existing policy.

1. Replace the entire existing policy with the updated policy that you copied in step 4. You can make any other changes as needed.

1. Choose **Next** and then choose **Save changes**.

1. Repeat steps 3 to 7 for all affected policies.

1. After you update your policies, refresh the **Affected policies** tool to confirm there are no affected policies listed. The **New IAM Actions Found** column should have **Yes** for all policies and the **Copy** and **Edit** buttons will be disabled. Your affected policies are updated.

**To enable fine-grained actions for your account**

After you update your policies, follow this procedure to enable the fine-grained actions for your account.

Only the management account (payer) of an organization or individual accounts can use the **Manage New IAM Actions** section. An individual account can enable the new actions for itself. A management account can enable new actions for the entire organization or a subset of member accounts. If you're a management account, update the affected policies for all member accounts and enable the new actions for your organization. For more information, see the [How to toggle accounts between new fine-grained actions or existing IAM actions?](https://aws.amazon.com/blogs/aws-cloud-financial-management/changes-to-aws-billing-cost-management-and-account-consoles-permissions/#How-to-toggle-accounts-between-new-fine-grained-actions-or-existing-IAM-Actions) section in the AWS blog post. 
**Note**  
To do this, you must have the following permissions:  
`aws-portal:GetConsoleActionSetEnforced`
`aws-portal:UpdateConsoleActionSetEnforced`
`ce:GetConsoleActionSetEnforced`
`ce:UpdateConsoleActionSetEnforced`
`purchase-orders:GetConsoleActionSetEnforced`
`purchase-orders:UpdateConsoleActionSetEnforced`

If you don't see the **Manage New IAM Actions** section, this means your account has already enabled the fine-grained IAM actions.

1. Under **Manage New IAM Actions**, the **Current Action Set Enforced** setting will have the **Existing** status.

   Choose **Enable New actions (Fine Grained)** and then choose **Apply changes**.

1. In the dialog box, choose **Yes**. The **Current Action Set Enforced** status will change to **Fine Grained**. This means the new actions are enforced for your AWS account or for your organization.

1. (Optional) You can then update your existing policies to remove any of the old actions.

**Example: Before and after IAM policy**  
The following IAM policy has the old `aws-portal:ViewPaymentMethods` action.  

```
{
    "Version": "2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "aws-portal:ViewPaymentMethods"
            ],
            "Resource": "*"
        }
    ]
}
```
After you copy the updated policy, the following example has the new `Sid` block with the fine-grained actions.  

```
{
    "Version": "2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "aws-portal:ViewPaymentMethods"
            ],
            "Resource": "*"
        },
        {
            "Sid": "AffectedPoliciesMigrator0",
            "Effect": "Allow",
            "Action": [
                "account:GetAccountInformation",
                "invoicing:GetInvoicePDF",
                "payments:GetPaymentInstrument",
                "payments:GetPaymentStatus",
                "payments:ListPaymentPreferences"
            ],
            "Resource": "*"
        }
    ]
}
```

## Related resources


For more information, see [Sid](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_sid.html) in the *IAM User Guide*.

For more information about the new fine-grained actions, see the [Mapping fine-grained IAM actions reference](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/migrate-granularaccess-iam-mapping-reference.html) and [Using fine-grained Billing actions](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/migrate-granularaccess-whatis.html#migrate-user-permissions).

# Use scripts to bulk migrate your policies to use fine-grained IAM actions


**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](#migrate-iam-permissions) or bulk policy migrator to update polices from your payer account. You can also use the [old to granular action mapping reference](migrate-granularaccess-iam-mapping-reference.md) 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.

To help migrate your IAM policies to use new actions, known as fine-grained actions, you can use scripts from the [AWS Samples](https://github.com/aws-samples/bulk-policy-migrator-scripts-for-account-cost-billing-consoles) website. 

You run these scripts from the payer account of your organization to identify the following affected policies in your organization that use the old IAM actions:
+ Customer managed IAM policies
+ Role, group, and user IAM inline policies
+ Service control policies (SCPs) (applies to the payer account only)
+ Permission sets

The scripts generate suggestions for new actions that correspond to existing actions that are used in the policy. You then review the suggestions and use the scripts to add the new actions across all affected policies in your organization. You don't need to update AWS managed policies or AWS managed SCPs (for example, AWS Control Tower and AWS Organizations SCPs).

You use these scripts to: 
+ Streamline the policy updates to help you manage the affected policies from the payer account.
+ Reduce the amount of time that you need to update the policies. You don't need to sign into each member account and manually update the policies.
+ Group identical policies from different member accounts together. You can then review and apply the same updates across all identical policies, instead of reviewing them one by one.
+ Ensure that user access remains unaffected after AWS retires the old IAM actions on July 6, 2023.

For more information about policies and service control policies (SCPs), see the following topics: 
+ [Managing IAM policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_manage.html) in the *IAM User Guide*
+ [Service control policies (SCPs)](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps.html) in the *AWS Organizations User Guide*
+ [Custom permissions](https://docs.aws.amazon.com/singlesignon/latest/userguide/permissionsetcustom.html) in the *IAM Identity Center User Guide*

## Overview


Follow this topic to complete the following steps:

**Topics**
+ [

## Overview
](#overview-bulk-migrate-policies)
+ [

## Prerequisites
](#prerequisites-running-the-scripts)
+ [

## Step 1: Set up your environment
](#set-up-your-environment-and-download-the-scripts)
+ [

## Step 2: Create the CloudFormation StackSet
](#create-the-cloudformation-stack)
+ [

## Step 3: Identify the affected policies
](#identify-the-affected-policies)
+ [

## Step 4: Review the suggested changes
](#review-the-affected-policies)
+ [

## Step 5: Update the affected policies
](#update-the-affected-policies)
+ [

## Step 6: Revert your changes (Optional)
](#revert-changes)
+ [

## IAM policy examples
](#examples-of-similar-policies)

## Prerequisites


To get started, you must do the following:
+ Download and install [Python 3](https://www.python.org/downloads/)
+ Sign in to your payer account and verify that you have an IAM principal that has the following IAM permissions:

  ```
  "iam:GetAccountAuthorizationDetails",
  "iam:GetPolicy",
  "iam:GetPolicyVersion",
  "iam:GetUserPolicy",
  "iam:GetGroupPolicy",
  "iam:GetRole",
  "iam:GetRolePolicy",
  "iam:CreatePolicyVersion",
  "iam:DeletePolicyVersion",
  "iam:ListAttachedRolePolicies",
  "iam:ListPolicyVersions",
  "iam:PutUserPolicy",
  "iam:PutGroupPolicy",
  "iam:PutRolePolicy",
  "iam:SetDefaultPolicyVersion",
  "organizations:ListAccounts",
  "organizations:ListPolicies",
  "organizations:DescribePolicy",
  "organizations:UpdatePolicy",
  "organizations:DescribeOrganization",
  "sso:DescribePermissionSet",
  "sso:DescribePermissionSetProvisioningStatus",
  "sso:GetInlinePolicyForPermissionSet",
  "sso:ListInstances",
  "sso:ListPermissionSets",
  "sso:ProvisionPermissionSet",
  "sso:PutInlinePolicyToPermissionSet",
  "sts:AssumeRole"
  ```

**Tip**  
To get started, we recommend that you use a subset of an account, such as a test account, to verify that the suggested changes are expected.  
You can then run the scripts again for remaining accounts in your organization.

## Step 1: Set up your environment


To get started, download the required files from the [AWS Samples](https://github.com/aws-samples/bulk-policy-migrator-scripts-for-account-cost-billing-consoles) website. You then run commands to set up your environment.

**To set up your environment**

1. Clone the repository from the [AWS Samples](https://github.com/aws-samples/bulk-policy-migrator-scripts-for-account-cost-billing-consoles) website. In a command line window, you can use the following command:

   ```
   git clone https://github.com/aws-samples/bulk-policy-migrator-scripts-for-account-cost-billing-consoles.git
   ```

1. Navigate to the directory where you downloaded the files. You can use the following command:

   ```
   cd bulk-policy-migrator-scripts-for-account-cost-billing-consoles
   ```

   In the repository, you can find the following scripts and resources:
   + `billing_console_policy_migrator_role.json` – The CloudFormation template that creates the `BillingConsolePolicyMigratorRole` IAM role in member accounts of your organization. This role allows the scripts to assume the role, and then read and update the affected policies.
   + `action_mapping_config.json`– Contains the one-to-many mapping of the old actions to the new actions. The scripts use this file to suggest the new actions for each affected policy that contains the old actions. 

     Each old action corresponds to multiple fine-grained actions. The new actions suggested in the file provide users access to the same AWS services before the migration. 
   + `identify_affected_policies.py` – Scans and identifies affected policies in your organization. This script generates a `affected_policies_and_suggestions.json` file that lists the affected policies along with the suggested new actions. 

     Affected policies that use the same set of old actions are grouped together in the JSON file, so that you can review or update the suggested new actions.
   + `update_affected_policies.py` – Updates the affected policies in your organization. The script inputs the`affected_policies_and_suggestions.json` file, and then adds the suggested new actions to the policies.
   + `rollback_affected_policies.py` – (Optional) Reverts changes made to the affected policies. This script removes the new fine-grained actions from the affected policies.

1. Run the following commands to set up and activate the virtual environment.

   ```
   python3 -m venv venv
   ```

   ```
   source venv/bin/activate
   ```

1. Run the following command to install the AWS SDK for Python (Boto3) dependency.

   ```
   pip install -r requirements.txt
   ```
**Note**  
You must configure your AWS credentials to use the AWS Command Line Interface (AWS CLI). For more information, see [AWS SDK for Python (Boto3)](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html).

For more information, see the [README.md](https://github.com/aws-samples/bulk-policy-migrator-scripts-for-account-cost-billing-consoles#readme) file.

## Step 2: Create the CloudFormation StackSet


Follow this procedure to create a CloudFormation *stack set*. This stack set then creates the `BillingConsolePolicyMigratorRole` IAM role for all member accounts in your organization.

**Note**  
You only need to complete this step once from the management account (payer account).

**To create the CloudFormation StackSet**

1. In a text editor, open the `billing_console_policy_migrator_role.json` file, and replace each instance of *`<management_account>`* with the account ID of the payer account (for example, *123456789012*).

1. Save the file.

1. Sign in to the AWS Management Console as the payer account.

1. In the CloudFormation console, create a stack set with the `billing_console_policy_migrator_role.json` file that you updated. 

   For more information, see [ Creating a stack set on the AWS CloudFormation console](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-getting-started-create.html) in the *AWS CloudFormation User Guide*.

After CloudFormation creates the stack set, each member account in your organization has an `BillingConsolePolicyMigratorRole` IAM role. 

The IAM role contains the following permissions:

```
"iam:GetAccountAuthorizationDetails",
"iam:GetPolicy",
"iam:GetPolicyVersion",
"iam:GetUserPolicy",
"iam:GetGroupPolicy",
"iam:GetRolePolicy",
"iam:CreatePolicyVersion",
"iam:DeletePolicyVersion",
"iam:ListPolicyVersions",
"iam:PutUserPolicy",
"iam:PutGroupPolicy",
"iam:PutRolePolicy",
"iam:SetDefaultPolicyVersion"
```

**Notes**  
For each member account, the scripts call the [AssumeRole](https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html) API operation to get temporary credentials to assume the `BillingConsolePolicyMigratorRole` IAM role. 
The scripts call the [ListAccounts](https://docs.aws.amazon.com/organizations/latest/APIReference/API_ListAccounts.html) API operation to get all member accounts. 
The scripts also call IAM API operations to perform the read and write permissions to the policies.

## Step 3: Identify the affected policies


After you create the stack set and downloaded the files, run the `identify_affected_policies.py` script. This script assumes the `BillingConsolePolicyMigratorRole` IAM role for each member account, and then identifies the affected policies.

**To identify the affected policies**

1. Navigate to the directory where you downloaded the scripts.

   ```
   cd policy_migration_scripts/scripts
   ```

1. Run the `identify_affected_policies.py` script. 

You can use the following input parameters: 
+ AWS accounts that you want the script to scan. To specify accounts, use the following input parameters:
  +  `--all` – Scans all member accounts in your organization. 

    ```
    python3 identify_affected_policies.py --all
    ```
  +  `--accounts` – Scans a subset of member accounts in your organization. 

    ```
    python3 identify_affected_policies.py --accounts 111122223333, 444455556666, 777788889999
    ```
  + `--exclude-accounts`– Excludes specific member accounts in your organization. 

    ```
    python3 identify_affected_policies.py --all --exclude-accounts 111111111111, 222222222222, 333333333333
    ```
+ ` –-action-mapping-config-file`– (Optional) Specify the path to the `action_mapping_config.json` file. The script uses this file to generate suggested updates for affected policies. If you don't specify the path, the script uses the `action_mapping_config.json` file in the folder. 

  ```
  python3 identify_affected_policies.py –-action-mapping-config-file c:\Users\username\Desktop\Scripts\action_mapping_config.json –-all
  ```

**Note**  
You can't specify organizational units (OUs) with this script.

After you run the script, it creates two JSON files in a `Affected_Policies_<Timestamp>` folder:
+ `affected_policies_and_suggestions.json`
+ `detailed_affected_policies.json`

**`affected_policies_and_suggestions.json`**  
 Lists the affected policies with the suggested new actions. Affected policies that use the same set of old actions are grouped together in the file.  
This file contains the following sections:  
+ Metadata that provides an overview of the accounts that you specified in the script, including:
  + Accounts scanned and the input parameter used for the `identify_affected_policies.py` script
  + Number of affected accounts
  + Number of affected policies
  + Number of similar policy groups
+ Similar policy groups – Includes the list of accounts and policy details, including the following sections:
  + `ImpactedPolicies` – Specifies which policies are affected and included in the group

     
  + `ImpactedPolicyStatements` – Provides information about the `Sid` blocks that currently use the old actions in the affected policy. This section includes the old actions and IAM elements, such as `Effect`, `Principal`, `NotPrincipal`, `NotAction`, and `Condition`.
+ `SuggestedPolicyStatementsToAppend` – Provides the suggested new actions that are added as new `SID` block. 

  When you update the policies, this block is appended at the end of the policies.

**Example `affected_policies_and_suggestions.json` file**  
This file groups together policies that are similar based on the following criteria:  
+ Same old actions used – Policies that have the same old actions across all `SID` blocks.
+ Matching details – In addition to affected actions, the policies have identical IAM elements,such as:
  + `Effect` (`Allow`/`Deny`)
  + `Principal` (who is allowed or denied access)
  + `NotAction` (what actions are not allowed)
  + `NotPrincipal` (who is explicitly denied access)
  + `Resource` (which AWS resources the policy applies to)
  + `Condition` (any specific conditions under which the policy applies) 
For more information, see [IAM policy examples](#examples-of-similar-policies).

**Example `affected_policies_and_suggestions.json`**  

```
[{
        "AccountsScanned": [
            "111111111111",
            "222222222222"
        ],
        "TotalAffectedAccounts": 2,
        "TotalAffectedPolicies": 2,
        "TotalSimilarPolicyGroups": 2
    },
    {
        "GroupName": "Group1",
        "ImpactedPolicies": [{
                "Account": "111111111111",
                "PolicyType": "UserInlinePolicy",
                "PolicyName": "Inline-Test-Policy-Allow",
                "PolicyIdentifier": "1111111_1-user:Inline-Test-Policy-Allow"
            },
            {
                "Account": "222222222222",
                "PolicyType": "UserInlinePolicy",
                "PolicyName": "Inline-Test-Policy-Allow",
                "PolicyIdentifier": "222222_1-group:Inline-Test-Policy-Allow"
            }
        ],
        "ImpactedPolicyStatements": [
            [{
                "Sid": "VisualEditor0",
                "Effect": "Allow",
                "Action": [
                    "aws-portal:ViewAccounts"
                ],
                "Resource": "*"
            }]
        ],
        "SuggestedPolicyStatementsToAppend": [{
            "Sid": "BillingConsolePolicyMigrator0",
            "Effect": "Allow",
            "Action": [
                "account:GetAccountInformation",
                "account:GetAlternateContact",
                "account:GetChallengeQuestions",
                "account:GetContactInformation",
                "billing:GetContractInformation",
                "billing:GetIAMAccessPreference",
                "billing:GetSellerOfRecord",
                "payments:ListPaymentPreferences"
            ],
            "Resource": "*"
        }]
    },
    {
        "GroupName": "Group2",
        "ImpactedPolicies": [{
                "Account": "111111111111",
                "PolicyType": "UserInlinePolicy",
                "PolicyName": "Inline-Test-Policy-deny",
                "PolicyIdentifier": "1111111_2-user:Inline-Test-Policy-deny"
            },
            {
                "Account": "222222222222",
                "PolicyType": "UserInlinePolicy",
                "PolicyName": "Inline-Test-Policy-deny",
                "PolicyIdentifier": "222222_2-group:Inline-Test-Policy-deny"
            }
        ],
        "ImpactedPolicyStatements": [
            [{
                "Sid": "VisualEditor0",
                "Effect": "deny",
                "Action": [
                    "aws-portal:ModifyAccount"
                ],
                "Resource": "*"
            }]
        ],
        "SuggestedPolicyStatementsToAppend": [{
            "Sid": "BillingConsolePolicyMigrator1",
            "Effect": "Deny",
            "Action": [
                "account:CloseAccount",
                "account:DeleteAlternateContact",
                "account:PutAlternateContact",
                "account:PutChallengeQuestions",
                "account:PutContactInformation",
                "billing:PutContractInformation",
                "billing:UpdateIAMAccessPreference",
                "payments:UpdatePaymentPreferences"
            ],
            "Resource": "*"
        }]
    }
]
```

**`detailed_affected_policies.json`**  
Contains the definition of all affected policies that the `identify_affected_policies.py` script identified for member accounts.  
The file groups similar policies together. You can use this file as reference, so that you can review and manage policy changes without needing to sign in to each member account to review the updates for each policy and account individually.  
You can search the file for the policy name (for example, `YourCustomerManagedReadOnlyAccessBillingUser`) and then review the affected policy definitions.   

**Example: `detailed_affected_policies.json`**  

## Step 4: Review the suggested changes


After the script creates the `affected_policies_and_suggestions.json` file, review it and make any changes.

**To review the affected policies**

1. In a text editor, open the `affected_policies_and_suggestions.json` file.

1. In the `AccountsScanned` section, verify that the number of similar groups identified across the scanned accounts is expected.

1. Review the suggested fine-grained actions that will be added to the affected policies.

1. Update your file as needed and then save it.

### Example 1: Update the `action_mapping_config.json` file


You can update the suggested mappings in the `action_mapping_config.json`. After you update the file, you can rerun the `identify_affected_policies.py` script. This script generates updated suggestions for the affected policies.

You can make multiple versions of the `action_mapping_config.json` file to change the policies for different accounts with different permissions. For example, you might create one file named `action_mapping_config_testing.json` to migrate permissions for your test accounts and `action_mapping_config_production.json` for your production accounts.

### Example 2: Update the `affected_policies_and_suggestions.json` file


To make changes to the suggested replacements for a specific affected policy group, you can directly edit the suggested replacements section within the `affected_policies_and_suggestions.json` file. 

Any changes that you make in this section are applied to all policies within that specific affected policy group.

### Example 3: Customize a specific policy


If you find that a policy within an affected policy group that needs different changes than the suggested updates, you can do the following:
+ Exclude specific accounts from the `identify_affected_policies.py` script. You can then review those excluded accounts separately.
+ Update the affected `Sid` blocks by removing the affected policies and accounts that need different permissions. Create a JSON block that includes only the specific accounts or excludes them from the current update affected policy run. 

  When you rerun the `identify_affected_policies.py` script, only the relevant accounts appear in the updated block. You can then refine the suggested replacements for that specific `Sid` block.

## Step 5: Update the affected policies


After you review and refine the suggested replacements, run the `update_affected_policies.py` script. The script takes the `affected_policies_and_suggestions.json` file as input. This script assumes the `BillingConsolePolicyMigratorRole` IAM role to update the affected policies listed in the `affected_policies_and_suggestions.json` file. 

**To update the affected policies**

1. If you haven't already, open a command line window for the AWS CLI.

1. Enter the following command to run the `update_affected_policies.py` script. You can enter the following input parameter:
+ The directory path of the `affected_policies_and_suggestions.json` file that contains a list of the affected policies to be updated. This file is an output of the previous step.

```
python3 update_affected_policies.py --affected-policies-directory Affected_Policies_<Timestamp>
```

The `update_affected_policies.py` script updates the affected policies within the `affected_policies_and_suggestions.json` file with the suggested new actions. The script adds a `Sid` block to the policies, identified as `BillingConsolePolicyMigrator#`, where *\$1* corresponds to an incremental counter (for example, 1, 2, 3). 

For example, if there are multiple `Sid` blocks in the affected policy that use old actions, the script adds multiple `Sid` blocks that appear as `BillingConsolePolicyMigrator#` to correspond to each `Sid` block.

**Important**  
The script doesn't remove old IAM actions from the policies, and or change existing `Sid` blocks in the policies. Instead, it creates `Sid` blocks and appends them to the end of the policy. These new `Sid` blocks have the suggested new actions from the JSON file. This ensures that the permissions of the original policies aren't changed.
We recommend that you do not change the name of the `BillingConsolePolicyMigrator#` `Sid` blocks in case you need to revert your changes.

**Example: Policy with appended `Sid` blocks**  
See the appended `Sid` blocks in the `BillingConsolePolicyMigrator1` and `BillingConsolePolicyMigrator2` blocks.

The script generates a status report that contains unsuccessful operations and outputs the JSON file locally.

**Example: Status report**  

```
[{
    "Account": "111111111111",
    "PolicyType": "Customer Managed Policy"
    "PolicyName": "AwsPortalViewPaymentMethods",
    "PolicyIdentifier": "identifier",
    "Status": "FAILURE", // FAILURE or SKIPPED	
    "ErrorMessage": "Error message details"
}]
```

**Important**  
If you re-run the `identify_affected_policies.py` and `update_affected_policies.py` scripts , they skip all policies that contain the `BillingConsolePolicyMigratorRole#``Sid` block. The scripts assume that those policies were previously scanned and updated, and that they don't require additional updates. This prevents the script from duplicating the same actions in the policy.
After you update the affected policies, you can use the new IAM by using the affected policies tool. If you identify any issues, you can use the tool to switch back to the previous actions. You can also use a script to revert your policy updates.  
For more information, see [How to use the affected policies tool](migrate-security-iam-tool.md) and the [Changes to AWS Billing, Cost Management, and Account Consoles Permissions](https://aws.amazon.com/blogs/aws-cloud-financial-management/changes-to-aws-billing-cost-management-and-account-consoles-permissions/) blog post.
To manage your updates, you can:  
Run the scripts for each account individually.
Run the script in batches for similar accounts, such as testing, QA, and production accounts.
Run the script for all accounts.
Choose a mix between updating some accounts in batches, and then updating others individually.

## Step 6: Revert your changes (Optional)


The `rollback_affected_policies.py` script reverts the changes applied to each affected policy for the specified accounts. The script removes all `Sid` blocks that the `update_affected_policies.py` script appended. These `Sid` blocks have the `BillingConsolePolicyMigratorRole#` format.

**To revert your changes**

1. If you haven't already, open a command line window for the AWS CLI.

1. Enter the following command to run the `rollback_affected_policies.py` script. You can enter the following input parameters:
+ `--accounts` 
  + Specifies a comma-separated list of the AWS account IDs that you want to include in the rollback. 
  + The following example scans the policies in the specified AWS accounts, and removes any statements with the `BillingConsolePolicyMigrator#` `Sid` block. 

    ```
    python3 rollback_affected_policies.py –-accounts 111122223333, 555555555555, 666666666666
    ```
+ `--all`
  + Includes all AWS account IDs in your organization. 
  + The following example scans all policies in your organization, and removes any statements with the `BillingConsolePolicyMigratorRole#` `Sid` block.

  ```
  python3 rollback_affected_policies.py –-all
  ```
+ `--exclude-accounts`
  + Specifies a comma-separated list of the AWS account IDs that you want to exclude from the rollback. 

    You can use this parameter only when you also specify the `--all` parameter. 
  + The following example scans the policies for all AWS accounts in your organization, except for the specified accounts.

    ```
    python3 rollback_affected_policies.py --all --exclude-accounts 777777777777, 888888888888, 999999999999
    ```

## IAM policy examples


Policies are considered similar if they have identical: 
+  Affected actions across all `Sid` blocks. 
+  Details in the following IAM elements:
  + `Effect` (`Allow`/`Deny`)
  + `Principal` (who is allowed or denied access)
  + `NotAction` (what actions are not allowed)
  + `NotPrincipal` (who is explicitly denied access)
  + `Resource` (which AWS resources the policy applies to)
  + `Condition` (any specific conditions under which the policy applies)

The following examples show policies which IAM might or might not consider similar based on the differences between them. 

**Example 1: Policies are considered similar**  
Each policy type is different, but both policies contain one `Sid` block with the same affected `Action`.     
****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [{
        "Sid": "VisualEditor0",
        "Effect": "Allow",
        "Action": [
            "aws-portal:ViewAccount",
            "aws-portal:*Billing"
        ],
        "Resource": "*"
    }]
}
```  
****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [{
        "Sid": "VisualEditor0",
        "Effect": "Allow",
        "Action": [
            "aws-portal:ViewAccount",
            "aws-portal:*Billing"
        ],
        "Resource": "*"
    }]
}
```

**Example 2: Policies are considered similar**  
Both policies contain one `Sid` block with the same affected `Action`. Policy 2 contains additional actions, but these actions aren't affected.    
****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [{
        "Sid": "VisualEditor0",
        "Effect": "Allow",
        "Action": [
            "aws-portal:ViewAccount",
            "aws-portal:*Billing"
        ],
        "Resource": "*"
    }]
}
```  
****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [{
        "Sid": "VisualEditor0",
        "Effect": "Allow",
        "Action": [
            "aws-portal:ViewAccount",
            "aws-portal:*Billing",
            "athena:*"
        ],
        "Resource": "*"
    }]
}
```

**Example 3: Policies aren't considered similar**  
Both policies contain one `Sid` block with the same affected `Action`. However, policy 2 contains a `Condition` element that isn't present in policy 1.    
****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [{
        "Sid": "VisualEditor0",
        "Effect": "Allow",
        "Action": [
            "aws-portal:ViewAccount",
            "aws-portal:*Billing"
        ],
        "Resource": "*"
    }]
}
```  
****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [{
        "Sid": "VisualEditor0",
        "Effect": "Allow",
        "Action": [
            "aws-portal:ViewAccount",
            "aws-portal:*Billing",
            "athena:*"
        ],
        "Resource": "*",
        "Condition": {
            "BoolIfExists": {
                "aws:MultiFactorAuthPresent": "true"
            }
        }
    }]
}
```

**Example 4: Policies are considered similar**  
Policy 1 has a single `Sid` block with an affected `Action`. Policy 2 has multiple `Sid` blocks, but the affected `Action` appears in only one block.    
****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [{
        "Sid": "VisualEditor0",
        "Effect": "Allow",
        "Action": [
            "aws-portal:View*"
        ],
        "Resource": "*"
    }]
}
```  
****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [{
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "aws-portal:View*"
            ],
            "Resource": "*"
        },
        {
            "Sid": "VisualEditor1",
            "Effect": "Allow",
            "Action": [
                "cloudtrail:Get*"
            ],
            "Resource": "*"
        }
    ]
}
```

**Example 5: Policies aren't considered similar**  
Policy 1 has a single `Sid` block with an affected `Action`. Policy 2 has multiple `Sid` blocks, and the affected `Action` appears in multiple blocks.    
****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [{
        "Sid": "VisualEditor0",
        "Effect": "Allow",
        "Action": [
            "aws-portal:View*"
        ],
        "Resource": "*"
    }]
}
```  
****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [{
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "aws-portal:View*"
            ],
            "Resource": "*"
        },
        {
            "Sid": "VisualEditor1",
            "Effect": "Deny",
            "Action": [
                "aws-portal:Modify*"
            ],
            "Resource": "*"
        }
    ]
}
```

**Example 6: Policies are considered similar**  
Both policies have multiple `Sid` blocks, with the same affected `Action` in each `Sid` block.    
****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [{
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "aws-portal:*Account",
                "iam:Get*"
            ],
            "Resource": "*"
        },
        {
            "Sid": "VisualEditor1",
            "Effect": "Deny",
            "Action": [
                "aws-portal:Modify*",
                "iam:Update*"
            ],
            "Resource": "*"
        }
    ]
}
```  
****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [{
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "aws-portal:*Account",
                "athena:Get*"
            ],
            "Resource": "*"
        },
        {
            "Sid": "VisualEditor1",
            "Effect": "Deny",
            "Action": [
                "aws-portal:Modify*",
                "athena:Update*"
            ],
            "Resource": "*"
        }
    ]
}
```

**Example 7**  
The following two policies aren't considered similar.  
Policy 1 has a single `Sid` block with an affected `Action`. Policy 2 has a `Sid` block with the same affected `Action`. However, policy 2 also contains another `Sid` block with different actions.     
****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [{
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "aws-portal:*Account",
                "iam:Get*"
            ],
            "Resource": "*"
        },
        {
            "Sid": "VisualEditor1",
            "Effect": "Deny",
            "Action": [
                "aws-portal:Modify*",
                "iam:Update*"
            ],
            "Resource": "*"
        }
    ]
}
```  
****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [{
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "aws-portal:*Account",
                "athena:Get*"
            ],
            "Resource": "*"
        },
        {
            "Sid": "VisualEditor1",
            "Effect": "Deny",
            "Action": [
                "aws-portal:*Billing",
                "athena:Update*"
            ],
            "Resource": "*"
        }
    ]
}
```

# Mapping fine-grained IAM actions reference


**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](migrate-iam-permissions.md) or bulk policy migrator to update polices from your payer account. You can also use the [old to granular action mapping reference](#migrate-granularaccess-iam-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.

You will need to migrate the following IAM actions in your permission policies or service control policies (SCP):
+ `aws-portal:ViewAccount`
+  `aws-portal:ViewBilling`
+ `aws-portal:ViewPaymentMethods`
+  `aws-portal:ViewUsage` 
+  `aws-portal:ModifyAccount`
+  `aws-portal:ModifyBilling`
+  `aws-portal:ModifyPaymentMethods` 
+ `purchase-orders:ViewPurchaseOrders` 
+ `purchase-orders:ModifyPurchaseOrders` 

You can use this topic to view the mapping of the old to new fine-grained actions for each IAM action that we're retiring.

**Overview**

1. Review your affected IAM policies in your AWS account. To do so, follow the steps in the **Affected policies** tool to identify your affected IAM policies. See [How to use the affected policies tool](migrate-security-iam-tool.md).

1. Use the IAM console to add the new granular permissions to your policy. For example, if your policy allows the `purchase-orders:ModifyPurchaseOrders` permission, you will need to add each action in the [Mapping for purchase-orders:ModifyPurchaseOrders](#mapping-for-purchase-ordersmodifypurchaseorders) table. 

   **Old policy**

   The following policy allows a user to add, delete, or modify any purchase order in the account.

------
#### [ JSON ]

****  

   ```
   {
       "Version":"2012-10-17",		 	 	 
       "Statement": [
           {
               "Sid": "VisualEditor0",
               "Effect": "Allow",
               "Action": "purchase-orders:ModifyPurchaseOrders",
               "Resource": "arn:aws:purchase-orders::123456789012:purchase-order/*"
           }
       ]
   }
   ```

------

   **New policy**

   The following policy also allows a user to add, delete, or modify any purchase order in the account. Note that each granular permission appears after the old `purchase-orders:ModifyPurchaseOrders` permission. These permissions give you more control over what actions you want to allow or deny.
**Tip**  
We recommend that you keep the old permissions to ensure that you don't lose permissions until this migration is complete.

------
#### [ JSON ]

****  

   ```
   {
   	"Version":"2012-10-17",		 	 	 
   	"Statement": [
   		{
   			"Sid": "VisualEditor0",
   			"Effect": "Allow",
   			"Action": [
   				"purchase-orders:ModifyPurchaseOrders",
   				"purchase-orders:AddPurchaseOrder",
   				"purchase-orders:DeletePurchaseOrder",
   				"purchase-orders:UpdatePurchaseOrder",
   				"purchase-orders:UpdatePurchaseOrderStatus"
   			],
   			"Resource": "arn:aws:purchase-orders::123456789012:purchase-order/*"
   		}
   	]
   }
   ```

------

1. Save your changes.

**Notes**  
To edit policies manually in the IAM console, see [Editing customer managed policies (console)](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_manage-edit.html#edit-inline-policy-console) in the *IAM User Guide*.
To bulk migrate your IAM policies to use fine-grained actions (new actions), see [Use scripts to bulk migrate your policies to use fine-grained IAM actions](migrate-iam-permissions.md).

**Contents**
+ [

## Mapping for aws-portal:ViewAccount
](#mapping-for-aws-portalviewaccount)
+ [

## Mapping for aws-portal:ViewBilling
](#mapping-for-aws-portalviewbilling)
+ [

## Mapping for aws-portal:ViewPaymentMethods
](#mapping-for-aws-portalviewpaymentmethods)
+ [

## Mapping for aws-portal:ViewUsage
](#mapping-for-aws-portalviewusage)
+ [

## Mapping for aws-portal:ModifyAccount
](#mapping-for-aws-portalmodifyaccount)
+ [

## Mapping for aws-portal:ModifyBilling
](#mapping-for-aws-portalmodifybilling)
+ [

## Mapping for aws-portal:ModifyPaymentMethods
](#mapping-for-aws-portalmodifypaymentmethods)
+ [

## Mapping for purchase-orders:ViewPurchaseOrders
](#mapping-for-purchase-ordersviewpurchaseorders)
+ [

## Mapping for purchase-orders:ModifyPurchaseOrders
](#mapping-for-purchase-ordersmodifypurchaseorders)

## Mapping for aws-portal:ViewAccount



|  New action  |  Description  |  Access level  | 
| --- | --- | --- | 
|  account:GetAccountInformation |  Grants permission to retrieve the account information for an account  |  Read  | 
|  account:GetAlternateContact  |  Grants permission to retrieve the alternate contacts for an account  |  Read  | 
|  account:GetContactInformation  |  Grants permission to retrieve the primary contact information for an account  |  Read  | 
|  billing:GetContractInformation  |  Grants permission to view the account's contract information including the contract number, end-user organization names, purchase order numbers, and if the account is used to service public-sector customers |  Read  | 
|  billing:GetIAMAccessPreference  |  Grants permission to retrieve the state of the Allow IAM Access billing preference |  Read  | 
|  billing:GetSellerOfRecord  |  Grants permission to retrieve the account's default seller of record |  Read  | 
|  payments:ListPaymentPreferences  |  Grants permission to get payment preferences (for example, preferred payment currency, preferred payment method)  |  Read  | 

## Mapping for aws-portal:ViewBilling



|  New action  |  Description  |  Access level  | 
| --- | --- | --- | 
|  account:GetAccountInformation  |  Grants permission to retrieve the account information for an account  |  Read  | 
|  billing:GetBillingData |  Grants permission to perform queries on billing information  |  Read  | 
|  billing:GetBillingDetails |  Grants permission to view detailed line item billing information  |  Read  | 
|  billing:GetBillingNotifications  |  Grants permission to view notifications sent by AWS related to your accounts billing information  |  Read  | 
|  billing:GetBillingPreferences |  Grants permission to view billing preferences such as Reserved Instances, Savings Plans, and credits sharing  |  Read  | 
|  billing:GetContractInformation |  Grants permission to view the account's contract information including the contract number, end-user organization names, purchase order numbers, and if the account is used to service public-sector customers  |  Read  | 
|  billing:GetCredits  |  Grants permission to view credits that have been redeemed  |  Read  | 
|  billing:GetIAMAccessPreference |  Grants permission to retrieve the state of the Allow IAM Access billing preference |  Read  | 
|  billing:GetSellerOfRecord |  Grants permission to retrieve the account's default seller of record  |  Read  | 
|  billing:ListBillingViews |  Grants permission to get billing information for your proforma billing groups |  List  | 
|  ce:DescribeNotificationSubscription |  Grants permission to view reservation expiration alerts  |  Read  | 
|  ce:DescribeReport  |  Grants permission to view Cost Explorer reports page  |  Read  | 
|  ce:GetAnomalies |  Grants permission to retrieve anomalies  |  Read  | 
|  ce:GetAnomalyMonitors  |  Grants permission to query anomaly monitors  |  Read  | 
|  ce:GetAnomalySubscriptions |  Grants permission to query anomaly subscriptions  |  Read  | 
|  ce:GetCostAndUsage  |  Grants permission to retrieve the cost and usage metrics for your account  |  Read  | 
|  ce:GetCostAndUsageWithResources  |  Grants permission to retrieve the cost and usage metrics with resources for your account  |  Read  | 
|  ce:GetCostCategories  |  Grants permission to query cost category names and values for a specified time period  |  Read  | 
|  ce:GetCostForecast |  Grants permission to retrieve a cost forecast for a forecast time period  |  Read  | 
|  ce:GetDimensionValues  |  Grants permission to retrieve all available filter values for a filter for a period of time  |  Read  | 
|  ce:GetPreferences |  Grants permission to view the Cost Explorer preferences page  |  Read  | 
|  ce:GetReservationCoverage  |  Grants permission to retrieve the reservation coverage for your account  |  Read  | 
|  ce:GetReservationPurchaseRecommendation |  Grants permission to retrieve the reservation recommendations for your account  |  Read  | 
|  ce:GetReservationUtilization  |  Grants permission to retrieve the reservation utilization for your account  |  Read  | 
|  ce:GetRightsizingRecommendation  |  Grants permission to retrieve the rightsizing recommendations for your account  |  Read  | 
|  ce:GetSavingsPlansCoverage  |  Grants permission to retrieve the Savings Plans coverage for your account  |  Read  | 
| ce:GetSavingsPlansPurchaseRecommendation  |  Grants permission to retrieve the Savings Plans recommendations for your account  |  Read  | 
|  ce:GetSavingsPlansUtilization  |  Grants permission to retrieve the Savings Plans utilization for your account  |  Read  | 
|  ce:GetSavingsPlansUtilizationDetails  |  Grants permission to retrieve the Savings Plans utilization details for your account  |  Read  | 
|  ce:GetTags  |  Grants permission to query tags for a specified time period  |  Read  | 
|  ce:GetUsageForecast  |  Grants permission to retrieve a usage forecast for a forecast time period  |  Read  | 
|  ce:ListCostAllocationTags  |  Grants permission to list cost allocation tags  |  List  | 
|  ce:ListSavingsPlansPurchaseRecommendationGeneration  |  Grants permission to retrieve a list of your historical recommendation generations  |  Read  | 
|  consolidatedbilling:GetAccountBillingRole  |  Grants permission to get account role (payer, linked, regular)  |  Read  | 
|  consolidatedbilling:ListLinkedAccounts  |  Grants permission to get list of member and linked accounts  |  List  | 
|  cur:GetClassicReport  |  Grants permission to get the CSV report for your bill |  Read  | 
|  cur:GetClassicReportPreferences  |  Grants permission to get the classic report enablement status for usage reports |  Read  | 
|  cur:ValidateReportDestination  |  Grants permission to validates if the Amazon S3 bucket exists with appropriate permissions for AWS CUR delivery  |  Read  | 
|  freetier:GetFreeTierAlertPreference  |  Grants permission to get AWS Free Tier alert preference (by email address)  |  Read  | 
|  freetier:GetFreeTierUsage  | Grants permission to get AWS Free Tier usage limits and month-to-date (MTD) usage status  |  Read  | 
|  invoicing:GetInvoiceEmailDeliveryPreferences  |  Grants permission to get invoice email delivery preferences  |  Read  | 
|  invoicing:GetInvoicePDF  |  Grants permission to get the invoice PDF  |  Read  | 
|  invoicing:ListInvoiceSummaries  |  Grants permission to get invoice summary information for your account or linked account  |  List  | 
|  payments:GetPaymentInstrument  |  Grants permission to get information about a payment instrument  |  Read  | 
|  payments:GetPaymentStatus  |  Grants permission to get payment status of invoices  |  Read  | 
|  payments:ListPaymentPreferences  |  Grants permission to get payment preferences (for example, preferred payment currency, preferred payment method)  |  Read  | 
|  tax:GetTaxInheritance  |  Grants permission to view tax inheritance status  |  Read  | 
|  tax:GetTaxRegistrationDocument  |  Grants permission to download tax registration documents  |  Read  | 
|  tax:ListTaxRegistrations  |  Grants permission to view tax registration  |  Read  | 

## Mapping for aws-portal:ViewPaymentMethods



|  New action  |  Description  |  Access level  | 
| --- | --- | --- | 
|  account:GetAccountInformation  |  Grants permission to retrieve the account information for an account  |  Read  | 
|  invoicing:GetInvoicePDF  |  Grants permission to get the invoice PDF  |  Read  | 
|  payments:GetPaymentInstrument  |  Grants permission to get information about a payment instrument  |  Read  | 
|  payments:GetPaymentStatus  |  Grants permission to get payment status of invoices  |  Read  | 
|  payments:ListPaymentPreferences  |  Grants permission to get payment preferences (for example, preferred payment currency, preferred payment method)  |  List  | 

## Mapping for aws-portal:ViewUsage



|  New action  |  Description  |  Access level  | 
| --- | --- | --- | 
|  cur:GetUsageReport  | Grants permission to get a list of AWS services, the usage type and operation for the usage report workflow, and to download usage reports  |  Read  | 

## Mapping for aws-portal:ModifyAccount



|  New action  |  Description  |  Access level  | 
| --- | --- | --- | 
|  account:CloseAccount  |  Grants permission to close an account  |  Write  | 
|  account:DeleteAlternateContact  |  Grants permission to delete the alternate contacts for an account  |  Write  | 
|  account:PutAlternateContact  |  Grants permission to modify the alternate contacts for an account  |  Write  | 
|  account:PutChallengeQuestions  |  Grants permission to modify the challenge questions for an account  |  Write  | 
|  account:PutContactInformation  | Grants permission to update the primary contact information for an account  |  Write  | 
|  billing:PutContractInformation  |  Grants permission to set the account's contract information end-user organization names and if the account is used to service public-sector customers  |  Write  | 
|  billing:UpdateIAMAccessPreference  |  Grants permission to update the Allow IAM Access billing preference |  Write  | 
|  payments:UpdatePaymentPreferences  |  Grants permission to update payment preferences (for example, preferred payment currency, preferred payment method)  |  Write  | 

## Mapping for aws-portal:ModifyBilling



|  New action  |  Description  |  Access level  | 
| --- | --- | --- | 
|  billing:PutContractInformation  |  Grants permission to set the account's contract information end-user organization names and if the account is used to service public-sector customers  |  Write  | 
|  billing:RedeemCredits  |  Grants permission to redeem an AWS credit  |  Write  | 
|  billing:UpdateBillingPreferences  |  Grants permission to update billing preferences such as Reserved Instances, Savings Plans, and credits sharing  |  Write  | 
|  ce:CreateAnomalyMonitor  |  Grants permission to create a new anomaly monitor  |  Write  | 
|  ce:CreateAnomalySubscription  |  Grants permission to create a new anomaly subscription  |  Write  | 
|  ce:CreateNotificationSubscription  |  Grants permission to create reservation expiration alerts  |  Write  | 
|  ce:CreateReport  |  Grants permission to create Cost Explorer reports  |  Write  | 
|  ce:DeleteAnomalyMonitor  |  Grants permission to delete an anomaly monitor  |  Write  | 
|  ce:DeleteAnomalySubscription  |  Grants permission to delete an anomaly subscription  |  Write  | 
|  ce:DeleteNotificationSubscription  |  Grants permission to delete reservation expiration alerts  |  Write  | 
|  ce:DeleteReport  |  Grants permission to delete Cost Explorer reports  |  Write  | 
|  ce:ProvideAnomalyFeedback  |  Grants permission to provide feedback on detected anomalies  |  Write  | 
|  ce:StartSavingsPlansPurchaseRecommendationGeneration  |  Grants permission to request a Savings Plans recommendation generation  |  Write  | 
|  ce:UpdateAnomalyMonitor  |  Grants permission to update an existing anomaly monitor  |  Write  | 
|  ce:UpdateAnomalySubscription  |  Grants permission to update an existing anomaly subscription  |  Write  | 
|  ce:UpdateCostAllocationTagsStatus  |  Grants permission to update existing cost allocation tags status  |  Write  | 
|  ce:UpdateNotificationSubscription  |  Grants permission to update reservation expiration alerts  |  Write  | 
|  ce:UpdatePreferences  |  Grants permission to edit the Cost Explorer preferences page  |  Write  | 
|  cur:PutClassicReportPreferences  |  Grants permission to enable classic reports  |  Write  | 
|  freetier:PutFreeTierAlertPreference  | Grants permission to set AWS Free Tier alert preference (by email address)  |  Write  | 
|  invoicing:PutInvoiceEmailDeliveryPreferences  |  Grants permission to update invoice email delivery preferences  |  Write  | 
|  payments:CreatePaymentInstrument  |  Grants permission to create a payment instrument  |  Write  | 
|  payments:DeletePaymentInstrument  |  Grants permission to delete a payment instrument  |  Write  | 
|  payments:MakePayment  |  Grants permission to make a payment, authenticate a payment, verify a payment method, and generate a funding request document for Advance Pay  |  Write  | 
|  payments:UpdatePaymentPreferences  |  Grants permission to update payment preferences (for example, preferred payment currency, preferred payment method) |  Write  | 
|  tax:BatchPutTaxRegistration  |  Grants permission to batch update tax registrations  |  Write  | 
|  tax:DeleteTaxRegistration  |  Grants permission to delete tax registration data  |  Write  | 
|  tax:PutTaxInheritance  |  Grants permission to set tax inheritance  |  Write  | 

## Mapping for aws-portal:ModifyPaymentMethods



|  New action  |  Description  |  Access level  | 
| --- | --- | --- | 
|  account:GetAccountInformation  |  Grants permission to retrieve the account information for an account  |  Read  | 
|  payments:DeletePaymentInstrument  |  Grants permission to delete a payment instrument  |  Write  | 
|  payments:CreatePaymentInstrument  |  Grants permission to create a payment instrument  |  Write  | 
|  payments:MakePayment  |  Grants permission to make a payment, authenticate a payment, verify a payment method, and generate a funding request document for Advance Pay  |  Write  | 
|  payments:UpdatePaymentPreferences  |  Grants permission to update payment preferences (for example, preferred payment currency, preferred payment method)  |  Write  | 

## Mapping for purchase-orders:ViewPurchaseOrders



|  New action  |  Description  |  Access level  | 
| --- | --- | --- | 
|  invoicing:GetInvoicePDF  |  Grants permission to get invoice PDF  |  Get  | 
|  payments:ListPaymentPreferences  |  Grants permission to get payment preferences (for example, preferred payment currency, preferred payment method)  |  List  | 
|  purchase-orders:GetPurchaseOrder  | Grants permission to get a purchase order  |  Read  | 
|  purchase-orders:ListPurchaseOrderInvoices | Grants permission to view purchase orders and details  |  List  | 
|  purchase-orders:ListPurchaseOrders  |  Grants permission to get all available purchase orders  |  List  | 

## Mapping for purchase-orders:ModifyPurchaseOrders



|  New action  |  Description  |  Access level  | 
| --- | --- | --- | 
|  purchase-orders:AddPurchaseOrder |  Grants permission to add a purchase order  |  Write  | 
| purchase-orders:DeletePurchaseOrder  |  Grants permission to delete a purchase order.  |  Write  | 
| purchase-orders:UpdatePurchaseOrder  |  Grants permission to update an existing purchase order  |  Write  | 
| purchase-orders:UpdatePurchaseOrderStatus  | Grants permission to set purchase order status  |  Write  | 

# AWS managed policies


Managed policies are standalone identity-based policies that you can attach to multiple users, groups, and roles in your AWS account. You can use AWS managed policies to control access in Billing.

An AWS managed policy is a standalone policy that's created and administered by AWS. AWS managed policies are designed to provide permissions for many common use cases. AWS managed policies make it easier for you to assign appropriate permissions to users, groups, and roles than if you had to write the policies yourself.

You can't change the permissions defined in AWS managed policies. AWS occasionally updates the permissions that are defined in an AWS managed policy. When this occurs, the update affects all principal entities (users, groups, and roles) that the policy is attached to.

Billing provides several AWS managed policies for common use cases.

**Topics**
+ [

## [https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AWSPurchaseOrdersServiceRolePolicy.html](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AWSPurchaseOrdersServiceRolePolicy.html)
](#security-iam-awsmanpol-AWSPurchaseOrdersServiceRolePolicy)
+ [

## [https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AWSBillingReadOnlyAccess.html](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AWSBillingReadOnlyAccess.html)
](#security-iam-awsmanpol-AWSBillingReadOnlyAccess)
+ [

## [https://docs.aws.amazon.com/aws-managed-policy/latest/reference/Billing.html](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/Billing.html)
](#security-iam-awsmanpol-Billing)
+ [

## [https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AWSAccountActivityAccess.html](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AWSAccountActivityAccess.html)
](#security-iam-awsmanpol-AWSAccountActivityAccess)
+ [

## [https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AWSPriceListServiceFullAccess.html](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AWSPriceListServiceFullAccess.html)
](#security-iam-awsmanpol-AWSPriceListServiceFullAccess)
+ [

## Updates to AWS managed policies for AWS Billing
](#security-iam-awsmanpol-updates)

## [https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AWSPurchaseOrdersServiceRolePolicy.html](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AWSPurchaseOrdersServiceRolePolicy.html)


This managed policy grants full access to the Billing and Cost Management console and to the purchase orders console. The policy allows the user to view, create, update, and delete the account's purchase orders.

To view the permissions for this policy, see [AWSPurchaseOrdersServiceRolePolicy](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AWSPurchaseOrdersServiceRolePolicy.html) in the *AWS Managed Policy Reference*.

## [https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AWSBillingReadOnlyAccess.html](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AWSBillingReadOnlyAccess.html)


This managed policy grants users read-only access to features in the AWS Billing and Cost Management console.

### Permissions details


This policy includes the following permissions:
+ `account` – Retrieve information about their AWS account.
+ `aws-portal` – Grants users overall viewing permission to the Billing and Cost Management console pages.
+ `billing` – Retrieve comprehensive access to AWS billing information, such as billing preference, active contracts, credits or discounts applied, IAM preferences, seller of record, and a list of billing reports.
+ `budgets` – Retrieve information about actions set for the AWS Budgets feature.
+ `ce` – Retrieve cost and usage information, tags, and dimension values to view the AWS Cost Explorer feature.
+ `consolidatedbilling` – Retrieve roles and details about the AWS accounts configured using the consolidated billing feature.
+ `cur` – Retrieve information about their AWS Cost and Usage Report data.
+ `freetier` – Retrieve information about AWS Free Tier alert and usage preferences.
+ `invoicing` – Retrieve information about their invoice preferences.
+ `mapcredits` – Retrieve spends and credits related to the Migration Acceleration Program (MAP) 2.0 agreement.
+ `payments` – Retrieve financing, payment status, and payment instrument information.
+ `purchase-orders` – Retrieve information about invoices associated with their purchase orders.
+ `sustainability` – Retrieve carbon footprint information based on their AWS usage.
+ `tax` – Retrieve registered tax information from tax settings.

To view the permissions for this policy, see [AWSBillingReadOnlyAccess](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AWSBillingReadOnlyAccess.html) in the *AWS Managed Policy Reference*.

## [https://docs.aws.amazon.com/aws-managed-policy/latest/reference/Billing.html](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/Billing.html)


This managed policy grants users permission to view and edit the AWS Billing and Cost Management console. This includes viewing account usage, modifying budgets and payment methods.

To view the permissions for this policy, see [Billing](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/Billing.html) in the *AWS Managed Policy Reference*.

## [https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AWSAccountActivityAccess.html](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AWSAccountActivityAccess.html)


This managed policy grants users permission to view the **Account activity** page.

To view the permissions for this policy, see [AWSAccountActivityAccess](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AWSAccountActivityAccess.html) in the *AWS Managed Policy Reference*.

## [https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AWSPriceListServiceFullAccess.html](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AWSPriceListServiceFullAccess.html)


This managed policy grants users full access to the AWS Price List Service.

To view the permissions for this policy, see [AWSPriceListServiceFullAccess](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AWSPriceListServiceFullAccess.html) in the *AWS Managed Policy Reference*.

## Updates to AWS managed policies for AWS Billing
Policy updates

View details about updates to AWS managed policies for AWS Billing since this service began tracking these changes. For automatic alerts about changes to this page, subscribe to the RSS feed on the AWS Billing Document history page.


| Change | Description | Date | 
| --- | --- | --- | 
| [Billing](#security-iam-awsmanpol-Billing) and [AWSBillingReadOnlyAccess](#security-iam-awsmanpol-AWSBillingReadOnlyAccess) – Update to existing policies |  We added the following cost categories permission to `Billing`: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/managed-policies.html) We added the following cost categories permission to `AWSBillingReadOnlyAccess`: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/managed-policies.html)  | April 08, 2026 | 
| [Billing](#security-iam-awsmanpol-Billing) and [AWSBillingReadOnlyAccess](#security-iam-awsmanpol-AWSBillingReadOnlyAccess) – Update to existing policies |  We added the following invoicing permissions to `Billing`: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/managed-policies.html) We added the following invoicing permissions to `AWSBillingReadOnlyAccess`: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/managed-policies.html)  | November 19, 2025 | 
| [Billing](#security-iam-awsmanpol-Billing) and [AWSBillingReadOnlyAccess](#security-iam-awsmanpol-AWSBillingReadOnlyAccess) – Update to existing policies |  We added the following invoicing permissions to `Billing`: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/managed-policies.html) We added the following invoicing permissions to `AWSBillingReadOnlyAccess`: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/managed-policies.html)  | October 1, 2025 | 
| [AWSBillingReadOnlyAccess](#security-iam-awsmanpol-AWSBillingReadOnlyAccess) – Update to existing policies | We added the following permissions to `AWSBillingReadOnlyAccess`: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/managed-policies.html) | August 21, 2025 | 
| [AWSBillingReadOnlyAccess](#security-iam-awsmanpol-AWSBillingReadOnlyAccess) – Update to existing policies | We added the following AWS Free Tier permissions to `AWSBillingReadOnlyAccess`: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/managed-policies.html) | July 09, 2025 | 
| [Billing](#security-iam-awsmanpol-Billing) and [AWSBillingReadOnlyAccess](#security-iam-awsmanpol-AWSBillingReadOnlyAccess) – Update to existing policies | We added the following MAP 2.0 permissions to `Billing` and `AWSBillingReadOnlyAccess`: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/managed-policies.html) | March 27, 2025 | 
| [Billing](#security-iam-awsmanpol-Billing) – Update to existing policies | We added the following invoicing permissions to `Billing` : [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/managed-policies.html) | January 17, 2025 | 
| [AWSPurchaseOrdersServiceRolePolicy](#security-iam-awsmanpol-AWSPurchaseOrdersServiceRolePolicy), [Billing](#security-iam-awsmanpol-Billing), and [AWSBillingReadOnlyAccess](#security-iam-awsmanpol-AWSBillingReadOnlyAccess) – Update to existing policies  |  We added the following invoicing permission to `AWSPurchaseOrdersServiceRolePolicy`: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/managed-policies.html) We added the following invoicing permissions to `AWSBillingReadOnlyAccess`: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/managed-policies.html) We added the following invoicing permissions to `Billing`: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/managed-policies.html)  |  December 1, 2024  | 
| [Billing](#security-iam-awsmanpol-Billing) and [AWSBillingReadOnlyAccess](#security-iam-awsmanpol-AWSBillingReadOnlyAccess) – Update to existing policies | We added the following payments permissions to `Billing`: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/managed-policies.html) We added the following payments permissions to `AWSBillingReadOnlyAccess`: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/managed-policies.html) | November 12, 2024 | 
|  [AWSPriceListServiceFullAccess ](#security-iam-awsmanpol-AWSPriceListServiceFullAccess) – Updated policy  |  We added the documentation for `AWSPriceListServiceFullAccess` policy for the AWS Price List Service. The policy was initially launched in 2017. We updated `Sid": "AWSPriceListServiceFullAccess` to the existing policy.  |  July 2, 2024  | 
|  [Billing](#security-iam-awsmanpol-Billing) and [AWSBillingReadOnlyAccess](#security-iam-awsmanpol-AWSBillingReadOnlyAccess) – Update to existing policies  |  We added the following cost allocation tag-related permissions to `Billing`: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/managed-policies.html) We added the following tag-related permission to `AWSBillingReadOnlyAccess`: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/managed-policies.html)  |  May 31, 2024  | 
|  [Billing](#security-iam-awsmanpol-Billing) and [AWSBillingReadOnlyAccess](#security-iam-awsmanpol-AWSBillingReadOnlyAccess) – Update to existing policies  |  We added the following cost allocation tag-related permissions to `Billing`: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/managed-policies.html) We added the following cost allocation tag-related permission to `AWSBillingReadOnlyAccess`: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/managed-policies.html)  | March 25, 2024 | 
| [Billing](#security-iam-awsmanpol-Billing) and [AWSBillingReadOnlyAccess](#security-iam-awsmanpol-AWSBillingReadOnlyAccess) – Update to existing policies |  We added the following cost allocation tag-related permissions to `Billing`: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/managed-policies.html) We added the following cost allocation tag-related permission to `AWSBillingReadOnlyAccess`: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/managed-policies.html)  | July 26, 2023 | 
|  [AWSPurchaseOrdersServiceRolePolicy](#security-iam-awsmanpol-AWSPurchaseOrdersServiceRolePolicy), [Billing](#security-iam-awsmanpol-Billing), and [AWSBillingReadOnlyAccess](#security-iam-awsmanpol-AWSBillingReadOnlyAccess) – Update to existing policies  |  We added the following purchase order tag-related permissions to `Billing` and `AWSPurchaseOrdersServiceRolePolicy`: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/managed-policies.html) We added the following tag-related permission to `AWSBillingReadOnlyAccess`: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/managed-policies.html)  | July 17, 2023 | 
|  [AWSPurchaseOrdersServiceRolePolicy](#security-iam-awsmanpol-AWSPurchaseOrdersServiceRolePolicy), [Billing](#security-iam-awsmanpol-Billing), and [AWSBillingReadOnlyAccess](#security-iam-awsmanpol-AWSBillingReadOnlyAccess) – Update to existing policies [AWSAccountActivityAccess](#security-iam-awsmanpol-AWSAccountActivityAccess) – New AWS managed policy documented for AWS Billing  | Added updated action set across all policies. | March 06, 2023 | 
|  [AWSPurchaseOrdersServiceRolePolicy](#security-iam-awsmanpol-AWSPurchaseOrdersServiceRolePolicy) – Update to an existing policy  |  AWS Billing removed unnecessary permissions.  | November 18, 2021 | 
|  AWS Billing started tracking changes  |  AWS Billing started tracking changes for its AWS managed policies.  | November 18, 2021 | 

# Troubleshooting AWS Billing identity and access
Troubleshooting

Use the following information to help you diagnose and fix common issues that you might encounter when working with Billing and IAM.

**Topics**
+ [

## I am not authorized to perform an action in Billing
](#security_iam_troubleshoot-no-permissions)
+ [

## I am not authorized to perform iam:PassRole
](#security_iam_troubleshoot-passrole)
+ [

## I want to view my access keys
](#security_iam_troubleshoot-access-keys)
+ [

## I'm an administrator and want to allow others to access Billing
](#security_iam_troubleshoot-admin-delegate)
+ [

## I want to allow people outside of my AWS account to access my Billing resources
](#security_iam_troubleshoot-cross-account-access)

## I am not authorized to perform an action in Billing


If the AWS Management Console tells you that you're not authorized to perform an action, then you must contact your administrator for assistance. Your administrator is the person who provided you with your sign-in credentials.

The following example error occurs when the `mateojackson` user tries to use the console to view details about a fictional `my-example-widget` resource but does not have the fictional `billing:GetWidget` permissions.

```
User: arn:aws:iam::123456789012:user/mateojackson is not authorized to perform: billing:GetWidget on resource: my-example-widget
```

In this case, Mateo asks his administrator to update his policies to allow him to access the `my-example-widget` resource using the `billing:GetWidget` action.

## I am not authorized to perform iam:PassRole


If you receive an error that you're not authorized to perform the `iam:PassRole` action, your policies must be updated to allow you to pass a role to Billing.

Some AWS services allow you to pass an existing role to that service instead of creating a new service role or service-linked role. To do this, you must have permissions to pass the role to the service.

The following example error occurs when an IAM user named `marymajor` tries to use the console to perform an action in Billing. However, the action requires the service to have permissions that are granted by a service role. Mary does not have permissions to pass the role to the service.

```
User: arn:aws:iam::123456789012:user/marymajor is not authorized to perform: iam:PassRole
```

In this case, Mary's policies must be updated to allow her to perform the `iam:PassRole` action.

If you need help, contact your AWS administrator. Your administrator is the person who provided you with your sign-in credentials.

## I want to view my access keys


After you create your IAM user access keys, you can view your access key ID at any time. However, you can't view your secret access key again. If you lose your secret key, you must create a new access key pair. 

Access keys consist of two parts: an access key ID (for example, `AKIAIOSFODNN7EXAMPLE`) and a secret access key (for example, `wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY`). Like a user name and password, you must use both the access key ID and secret access key together to authenticate your requests. Manage your access keys as securely as you do your user name and password.

**Important**  
Do not provide your access keys to a third party, even to help [find your canonical user ID](https://docs.aws.amazon.com/accounts/latest/reference/manage-acct-identifiers.html#FindCanonicalId). By doing this, you might give someone permanent access to your AWS account.

When you create an access key pair, you are prompted to save the access key ID and secret access key in a secure location. The secret access key is available only at the time you create it. If you lose your secret access key, you must add new access keys to your IAM user. You can have a maximum of two access keys. If you already have two, you must delete one key pair before creating a new one. To view instructions, see [Managing access keys](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html#Using_CreateAccessKey) in the *IAM User Guide*.

## I'm an administrator and want to allow others to access Billing


To allow others to access Billing, you must grant permission to the people or applications that need access. If you are using AWS IAM Identity Center to manage people and applications, you assign permission sets to users or groups to define their level of access. Permission sets automatically create and assign IAM policies to IAM roles that are associated with the person or application. For more information, see [Permission sets](https://docs.aws.amazon.com/singlesignon/latest/userguide/permissionsetsconcept.html) in the *AWS IAM Identity Center User Guide*.

If you are not using IAM Identity Center, you must create IAM entities (users or roles) for the people or applications that need access. You must then attach a policy to the entity that grants them the correct permissions in Billing. After the permissions are granted, provide the credentials to the user or application developer. They will use those credentials to access AWS. To learn more about creating IAM users, groups, policies, and permissions, see [IAM Identities](https://docs.aws.amazon.com/IAM/latest/UserGuide/id.html) and [Policies and permissions in IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html) in the *IAM User Guide*.

## I want to allow people outside of my AWS account to access my Billing resources


You can create a role that users in other accounts or people outside of your organization can use to access your resources. You can specify who is trusted to assume the role. For services that support resource-based policies or access control lists (ACLs), you can use those policies to grant people access to your resources.

To learn more, consult the following:
+ To learn whether Billing supports these features, see [How AWS Billing works with IAM](security_iam_service-with-iam.md).
+ To learn how to provide access to your resources across AWS accounts that you own, see [Providing access to an IAM user in another AWS account that you own](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_common-scenarios_aws-accounts.html) in the *IAM User Guide*.
+ To learn how to provide access to your resources to third-party AWS accounts, see [Providing access to AWS accounts owned by third parties](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_common-scenarios_third-party.html) in the *IAM User Guide*.
+ To learn how to provide access through identity federation, see [Providing access to externally authenticated users (identity federation)](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_common-scenarios_federated-users.html) in the *IAM User Guide*.
+ To learn the difference between using roles and resource-based policies for cross-account access, see [Cross account resource access in IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies-cross-account-resource-access.html) in the *IAM User Guide*.

# Using service-linked roles for AWS Billing
Using service-linked roles

AWS Billing uses AWS Identity and Access Management (IAM) [service-linked roles](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-service-linked-role). A service-linked role is a unique type of IAM role that is linked directly to AWS Billing. Service-linked roles are predefined by AWS Billing and include all the permissions that the service requires to call other AWS services on your behalf.

A service-linked role makes setting up AWS Billing easier because you don’t have to manually add the necessary permissions. AWS Billing defines the permissions of its service-linked roles, and unless defined otherwise, only AWS Billing can assume its roles. The defined permissions include the trust policy and the permissions policy, and that permissions policy cannot be attached to any other IAM entity.

You can delete a service-linked role only after first deleting their related resources. This protects your AWS Billing resources because you can't inadvertently remove permission to access the resources.

For information about other services that support service-linked roles, see [AWS services that work with IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-services-that-work-with-iam.html) and look for the services that have **Yes** in the **Service-linked roles** column. Choose a **Yes** with a link to view the service-linked role documentation for that service.

## Service-linked role permissions for AWS Billing


AWS Billing uses the service-linked role named **Billing** – Allows billing service to validate access to billing view data for derived billing views.

The Billing service-linked role trusts the following services to assume the role:
+ `billing.amazonaws.com`

The role permissions policy named AWSBillingServiceRolePolicy allows AWS Billing to complete the following actions on the specified resources:
+ Action: `billing:GetBillingViewData` on `arn:${Partition}:billing:::billingview/*`

You must configure permissions to allow your users, groups, or roles to create, edit, or delete a service-linked role. For more information, see [Service-linked role permissions](https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html#service-linked-role-permissions) in the *IAM User Guide*.

## Creating a service-linked role for AWS Billing


You don't need to manually create a service-linked role. When you create or associate a billing view using a billing view from a different account in the AWS Management Console, the AWS CLI, or the AWS API, AWS Billing creates the service-linked role for you. 

**Important**  
This service-linked role can appear in your account if you completed an action in another service that uses the features supported by this role. Also, if you were using the AWS Billing service before January 1, 2017, when it began supporting service-linked roles, then AWS Billing created the Billing role in your account. To learn more, see [A new role appeared in my AWS account](https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_roles.html#troubleshoot_roles_new-role-appeared).

## Editing a service-linked role for AWS Billing


AWS Billing does not allow you to edit the Billing service-linked role. After you create a service-linked role, you cannot change the name of the role because various entities might reference the role. However, you can edit the description of the role using IAM. For more information, see [Editing a service-linked role](https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html#edit-service-linked-role) in the *IAM User Guide*.

## Deleting a service-linked role for AWS Billing


If you no longer need to use a feature or service that requires a service-linked role, we recommend that you delete that role. That way you don’t have an unused entity that is not actively monitored or maintained. However, you must clean up your service-linked role before you can manually delete it.

### Manually delete the service-linked role


Use the IAM console, the AWS CLI, or the AWS API to delete the Billing service-linked role. For more information, see [Deleting a service-linked role](https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html#delete-service-linked-role) in the *IAM User Guide*.

## Supported Regions for AWS Billing service-linked roles


AWS Billing supports using service-linked roles in all of the Regions where the service is available. For more information, see [AWS Regions and endpoints](https://docs.aws.amazon.com/general/latest/gr/rande.html).

# Logging and monitoring in AWS Billing and Cost Management
Logging and monitoring

Monitoring is an important part of maintaining the reliability, availability, and performance of your AWS account. There are several tools available to monitor your Billing and Cost Management usage.

## AWS Cost and Usage Reports


AWS Cost and Usage Reports tracks your AWS usage and provides estimated charges associated with your account. Each report contains line items for each unique combination of AWS products, usage type, and operation that you use in your AWS account. You can customize the AWS Cost and Usage Reports to aggregate the information either by the hour or by the day.

For more information about AWS Cost and Usage Reports, see the [https://docs.aws.amazon.com/cur/latest/userguide/what-is-cur.html](https://docs.aws.amazon.com/cur/latest/userguide/what-is-cur.html).

## AWS CloudTrail


Billing and Cost Management is integrated with AWS CloudTrail, a service that provides a record of actions taken by a user, role, or an AWS service in Billing and Cost Management. CloudTrail captures all write and modify API calls for Billing and Cost Management as events, including calls from the Billing and Cost Management console and from code calls to the Billing and Cost Management APIs.

For more information about AWS CloudTrail, see the [Logging Billing and Cost Management API calls with AWS CloudTrail](logging-using-cloudtrail.md).

# Logging Billing and Cost Management API calls with AWS CloudTrail
Logging API calls with CloudTrail

Billing and Cost Management is integrated with AWS CloudTrail, a service that provides a record of actions taken by a user, role, or an AWS service in Billing and Cost Management. CloudTrail captures API calls for Billing and Cost Management as events, including calls from the Billing and Cost Management console and from code calls to the Billing and Cost Management APIs. For a full list of CloudTrail events related to Billing, see [AWS Billing CloudTrail events](#billing-cloudtrail-events).

If you create a trail, you can enable continuous delivery of CloudTrail events to an Amazon S3 bucket, including events for Billing and Cost Management. If you don't configure a trail, you can still view the most recent events in the CloudTrail console in **Event history**. Using the information collected by CloudTrail, you can determine the request that was made to Billing and Cost Management, the IP address from which the request was made, who made the request, when it was made, and additional details. 

To learn more about CloudTrail, including how to configure and enable it, see the [AWS CloudTrail User Guide](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/).

## AWS Billing CloudTrail events


This section shows a full list of the CloudTrail events related to Billing and Cost Management. 


****  

| Event name | Definition | Event source | 
| --- | --- | --- | 
|  `AddPurchaseOrder`  |  Logs the creation of a purchase order.  | purchase-orders.amazonaws.com | 
|  `AcceptFxPaymentCurrencyTermsAndConditions`  | Logs the acceptance of the terms and conditions of paying in a currency other than USD. | billingconsole.amazonaws.com | 
|  `CloseAccount`  | Logs the closing of an account. | billingconsole.amazonaws.com | 
|  `CreateCustomerVerificationDetails`  |  (For customers with an India billing or contact address only) Logs the creation of the customer verification details of the account.  | customer-verification.amazonaws.com | 
|  `CreateOrigamiReportPreference`  | Logs the creation of the cost and usage report; management account only. | billingconsole.amazonaws.com | 
|  `DeletePurchaseOrder`  |  Logs the deletion of a purchase order.  | purchase-orders.amazonaws.com | 
|  `DeleteOrigamiReportPreferences`  | Logs the deletion of the cost and usage report; management account only. | billingconsole.amazonaws.com | 
|  `DownloadCommercialInvoice`  | Logs the download of a commercial invoice. | billingconsole.amazonaws.com | 
|  `DownloadECSVForBillingPeriod`  | Logs the download of the eCSV file (monthly usage report) for a specific billing period. | billingconsole.amazonaws.com | 
|  `DownloadRegistrationDocument`  | Logs the download of the tax registration document. | billingconsole.amazonaws.com | 
|  `EnableBillingAlerts`  | Logs the opt-in of receiving CloudWatch billing alerts for estimated charges. | billingconsole.amazonaws.com | 
|  `FindECSVForBillingPeriod`  | Logs the retrieval of the ECSV file for a specific billing period. | billingconsole.amazonaws.com | 
|  `GetAccountEDPStatus`  | Logs the retrieval of the account’s EDP status. | billingconsole.amazonaws.com | 
|  `GetAddresses`  | Logs the access to tax address, billing address, and contact address of an account. | billingconsole.amazonaws.com | 
|  `GetAllAccounts`  | Logs the access to all member account numbers of the management account. | billingconsole.amazonaws.com | 
|  `GetBillsForBillingPeriod`  | Logs the access of the account's usage and charges for a specific billing period. | billingconsole.amazonaws.com | 
|  `GetBillsForLinkedAccount`  | Logs the access of a management account retrieving the usage and charges of one of the member accounts in the consolidated billing family for a specific billing period. | billingconsole.amazonaws.com | 
|  `GetCommercialInvoicesForBillingPeriod`  | Logs the access to the account's commercial invoices metadata for the specific billing period. | billingconsole.amazonaws.com | 
|  `GetConsolidatedBillingFamilySummary`  | Logs the access of the management account retrieving the summary of the entire consolidated billing family. | billingconsole.amazonaws.com | 
|  `GetCustomerVerificationEligibility`  |  (For customers with an India billing or contact address only) Logs the retrieval of the customer verification eligibility of the account.  | customer-verification.amazonaws.com | 
|  `GetCustomerVerificationDetails`  |  (For customers with an India billing or contact address only) Logs the retrieval of the customer verification details of the account.  | customer-verification.amazonaws.com | 
|  `GetLinkedAccountNames`  | Logs the retrieval from a management account of the member account names belonging to its consolidated billing family for a specific billing period. | billingconsole.amazonaws.com | 
|  `GetPurchaseOrder`  |  Logs the retrieval of a purchase order.  | purchase-orders.amazonaws.com | 
|  `GetSupportedCountryCodes`  | Logs the access to all country codes supported by tax console. | billingconsole.amazonaws.com | 
|  `GetTotal`  | Logs the retrieval of the account’s total charges. | billingconsole.amazonaws.com | 
|  `GetTotalAmountForForecast`  | Logs the access to the forecasted charges for the specific billing period. | billingconsole.amazonaws.com | 
|  `ListCostAllocationTags`  | Logs the retrieval and listing of cost allocation tags. | ce.amazonaws.com | 
|  `ListCostAllocationTagBackfillHistory`  | Logs the retrieval and listing of cost allocation tag backfill request history. | ce.amazonaws.com | 
|  `ListPurchaseOrders`  |  Logs the retrieval and listing of purchase orders.  | purchase-orders.amazonaws.com | 
|  `ListPurchaseOrderInvoices`   |  Logs of the retrieval and list of invoices associated to a purchase order.  | purchase-orders.amazonaws.com | 
|  `ListTagsForResource`   |  Lists the tags associated with a resource. For `payments`, this action refers to a payment method. For `purchase-orders`, this action refers to a purchase order.  | purchase-orders.amazonaws.com | 
|  `RedeemPromoCode`  | Logs the redemption of promotional credits for an account. | billingconsole.amazonaws.com | 
|  `SetAccountContractMetadata`  | Logs the creation, deletion, or update of the necessary contract information for public sector customers. | billingconsole.amazonaws.com | 
|  `SetAccountPreferences`  | Logs the updates of the account name, email, and password. | billingconsole.amazonaws.com | 
|  `SetAdditionalContacts`  | Logs the creation, deletion, or update of the alternate contacts for billing, operations, and security communications. | billingconsole.amazonaws.com | 
|  `SetContactAddress`  | Logs the creation, deletion, or update of the account owner contact information, including the address and phone number. | billingconsole.amazonaws.com | 
|  `SetCreatedByOptIn`  | Logs the opt-in of the awscreatedby cost allocation tag preference. | billingconsole.amazonaws.com | 
|  `SetCreditSharing`  | Logs the history of the credit sharing preference for the management account. | billingconsole.amazonaws.com | 
|  `SetFreetierBudgetsPreference`  | Logs the preference (opt-in or opt-out) of receiving Free Tier usage alerts. | billingconsole.amazonaws.com | 
|  `SetFxPaymentCurrency`  | Logs the creation, deletion, or update of the preferred currency used to pay your invoice. | billingconsole.amazonaws.com | 
|  `SetIAMAccessPreference`  | Logs the creation, deletion, or update of the IAM users ability to access to the billing console. This setting is only for customers with root access. | billingconsole.amazonaws.com | 
|  `SetPANInformation`  | Logs the creating, deletion, or update of PAN information under AWS India. | billingconsole.amazonaws.com | 
|  `SetPayInformation`  | Logs the payment method history (invoice or credit/debit card) for the account. | billingconsole.amazonaws.com | 
|  `SetRISharing`  | Logs the history of the RI/Savings Plans sharing preference for the management account. | billingconsole.amazonaws.com | 
|  `SetSecurityQuestions`  | Logs the creation, deletion, or update of the security challenge questions to help AWS identify you as the owner of the account. | billingconsole.amazonaws.com | 
|  `StartCostAllocationTagBackfill`  | Logs the creation of a backfill request for the activation status of all cost allocation tags. | ce.amazonaws.com | 
|  `TagResource`   |  Logs the tagging of a resource. For `payments`, this action refers to a payment method. For `purchase-orders`, this action refers to a purchase order.  | purchase-orders.amazonaws.com | 
|  `UntagResource`  |  Logs the deletion of tags from a resource. For `payments`, this action refers to a payment method. For `purchase-orders`, this action refers to a purchase order.  | purchase-orders.amazonaws.com | 
|  `UpdateCostAllocationTagsStatus`  | Logs the active or inactive state of a particular cost allocation tag. | ce.amazonaws.com | 
|  `UpdateCustomerVerificationDetails`  |  (For customers with an India billing or contact address only) Logs the update of the customer verification details of the account.  | customer-verification.amazonaws.com | 
|  `UpdateOrigamiReportPreference`  | Logs the update of the cost and usage report; management account only. | billingconsole.amazonaws.com | 
|  `UpdatePurchaseOrder`   |  Logs the update of a purchase order.  | purchase-orders.amazonaws.com | 
|  `UpdatePurchaseOrderStatus`  |  Logs the update of a purchase order status.  | purchase-orders.amazonaws.com | 
|  `ValidateAddress`  | Logs the validation of the tax address of an account. | billingconsole.amazonaws.com | 

### Payments CloudTrail events


This section shows a full list of the CloudTrail events for the **Payments** feature in the AWS Billing console. These CloudTrail events use `payments.amazonaws.com` instead of `billingconsole.amazonaws.com`.


****  

| Event name | Definition | 
| --- | --- | 
|  `Financing_AcceptFinancingApplicationTerms`  | Logs the acceptance of terms in a financing application. | 
| `Financing_CreateFinancingApplication` | Logs the creation of a financing application. | 
| `Financing_GetFinancingApplication` | Logs the access of a financing application. | 
| `Financing_GetFinancingApplicationDocument` | Logs the access of a document associated with a financing application. | 
| `Financing_GetFinancingLine` | Logs the access of a financing line. | 
| `Financing_GetFinancingLineWithdrawal` | Logs the access of a financing line withdrawal. | 
| `Financing_GetFinancingLineWithdrawalDocument` | Logs the access of a document associated with a financing line withdrawal. | 
| `Financing_GetFinancingLineWithdrawalStatements` | Logs the access of statements associated with a financing line withdrawal. | 
| `Financing_GetFinancingOption` | Logs the access of a financing option. | 
| `Financing_ListFinancingApplications` | Logs the list of financing application metadata. | 
| `Financing_ListFinancingLines` | Logs the list of financing line metadata. | 
| `Financing_ListFinancingLineWithdrawals` | Logs the list of financing line withdrawal metadata. | 
| `Financing_UpdateFinancingApplication` | Logs the update of a financing application. | 
| Instruments\$1Authenticate | Logs the payment instrument authentication. | 
|  `Instruments_Create`  | Logs the creation of payment instruments. | 
|  `Instruments_Delete`  | Logs the deletion of payment instruments. | 
|  `Instruments_Get`  | Logs the access of payment instruments. | 
|  `Instruments_List`  | Logs the list of payment instrument metadata. | 
|  `Instruments_StartCreate`  | Logs the operations before payment instrument creation. | 
|  `Instruments_Update`  | Logs the update of payment instruments. | 
|  `ListTagsForResource`  |  Logs the list of tags associated with a payments resource.  | 
|  `Policy_GetPaymentInstrumentEligibility`  | Logs the access of payment instrument eligibility. | 
|  `Preferences_BatchGetPaymentProfiles`  | Logs the access of payment profiles. | 
|  `Preferences_CreatePaymentProfile`  | Logs the creation of payment profiles. | 
|  `Preferences_DeletePaymentProfile`  | Logs the deletion of payment profiles. | 
|  `Preferences_ListPaymentProfiles`  | Logs the list of payment profiles metadata. | 
|  `Preferences_UpdatePaymentProfile`  | Logs the update of payment profiles. | 
| `Programs_ListPaymentProgramOptions` | Logs the list of payment program options. | 
| `Programs_ListPaymentProgramStatus` | Logs the list of payment program eligiblity and enrolment status. | 
|  `TagResource`  | Logs the tagging of a payments resource. | 
|  `TermsAndConditions_AcceptTermsAndConditionsForProgramByAccountId`  | Logs the accepted payments terms and conditions. | 
|  `TermsAndConditions_GetAcceptedTermsAndConditionsForProgramByAccountId`  | Logs the access of accepted terms and conditions. | 
|  `TermsAndConditions_GetRecommendedTermsAndConditionsForProgram`  | Logs the access of recommended terms and conditions. | 
|  `UntagResource`  | Logs the deletion of tags from a payments resource. | 

### Tax settings CloudTrail events


This section shows a full list of the CloudTrail events for the **Tax settings** feature in the AWS Billing console. These CloudTrail events use `taxconsole.amazonaws.com` or `tax.amazonaws.com` instead of `billingconsole.amazonaws.com`.


**CloudTrail events for Tax settings console**  

| Event name | Definition | Event source | 
| --- | --- | --- | 
|  `BatchGetTaxExemptions`  | Logs the access to US tax exemptions of an account, and any linked accounts.  | taxconsole.amazon.com | 
| `CreateCustomerCase` | Logs the creation of a customer support case to validate US tax exemption for an account. | taxconsole.amazon.com | 
|  `DownloadTaxInvoice`  | Logs the download of a tax invoice. | taxconsole.amazon.com | 
|  `GetTaxExemptionTypes`  | Logs the access to all supported US exemption types by tax console. | taxconsole.amazon.com | 
|  `GetTaxInheritance`  | Logs the access to tax inheritance preference (turning on or off) of an account. | taxconsole.amazon.com | 
|  `GetTaxInvoicesMetadata`  | Logs the retrieval of tax invoices metadata. | taxconsole.amazon.com | 
|  `GetTaxRegistration`  | Logs the access to the tax registration number of an account. | taxconsole.amazon.com | 
|  `PreviewTaxRegistrationChange`  | Logs the preview of tax registration changes before confirmation. | taxconsole.amazon.com | 
|  `SetTaxInheritance`  | Logs the preference (opt-in or opt-out) of tax inheritance. | taxconsole.amazon.com | 


**CloudTrail events for Tax settings API**  

| Event name | Definition | Event source | 
| --- | --- | --- | 
|  `BatchDeleteTaxRegistration`  | Logs the batch deletion of the tax registration for multiple accounts. | tax.amazonaws.com | 
| `BatchGetTaxExemptions` | Logs the access to tax exemptions of one or multiple accounts. | tax.amazonaws.com | 
|  `BatchPutTaxRegistration`  |  Logs the settings of the tax registration of multiple accounts.  | tax.amazonaws.com  | 
|  `DeleteTaxRegistration`  |  Logs the deletion of the tax registration number for an account.  | tax.amazonaws.com  | 
|  `GetTaxExemptionTypes`  | Logs the access to all supported tax exemption types by the tax console. | tax.amazonaws.com | 
|  `GetTaxInheritance`  | Logs the access to tax inheritance preference (turning on or off) of an account. | tax.amazonaws.com | 
|  `GetTaxRegistration`  | Logs the access to the tax registration of an account. | tax.amazonaws.com | 
|  `GetTaxRegistrationDocument`  | Logs retrieving the tax registration document of an account. | tax.amazonaws.com | 
|  `ListTaxExemptions`  | Logs the access to tax exemptions of the AWS organization accounts. | tax.amazonaws.com | 
|  `ListTaxRegistrations`  |  Logs the access to tax registration details of all member accounts of the management account.  | tax.amazonaws.com  | 
|  `PutTaxExemption`  |  Logs setting tax exemption of one or multiple accounts.  | tax.amazonaws.com  | 
|  `PutTaxInheritance`  | Logs setting the preference (opt in or opt out) of tax inheritance. | tax.amazonaws.com | 
|  `PutTaxRegistration`  | Logs the settings of the tax registration of an account. | tax.amazonaws.com | 

### Invoicing CloudTrail events


This section shows a full list of the CloudTrail events for the **Invoicing** feature in the AWS Billing console. These CloudTrail events use `invoicing.amazonaws.com`.


****  

| Event name | Definition | 
| --- | --- | 
|  `CreateInvoiceUnit`  | Logs the creation of an invoice unit.  | 
|  `DeleteInvoiceUnit`  | Logs the deletion of an invoice unit. | 
|  `GetInvoiceProfiles`  |  Logs the access of an account's invoice profile.  | 
|  `GetInvoiceUnit`  | Logs the access of an invoice unit. | 
|  `ListInvoiceUnits`  | Logs the retrieval and listing of invoice units. | 
| `UpdateInvoiceUnit` | Logs the update of an invoice unit. | 

## Billing and Cost Management information in CloudTrail


CloudTrail is enabled on your AWS account when you create the account. When supported event activity occurs in Billing and Cost Management, that activity is recorded in a CloudTrail event along with other AWS service events in **Event history**. You can view, search, and download recent events in your AWS account. For more information, see [Viewing Events with CloudTrail Event History](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/view-cloudtrail-events.html) in the *AWS CloudTrail User Guide*. 

For an ongoing record of events in your AWS account, including events for Billing and Cost Management, create a trail. A trail enables CloudTrail to deliver log files to an Amazon S3 bucket. By default, when you create a trail in the console, the trail applies to all AWS Regions. The trail logs events from all Regions in the AWS partition and delivers the log files to the Amazon S3 bucket that you specify. Additionally, you can configure other AWS services to further analyze and act upon the event data collected in CloudTrail logs. 

For more information, see the following: 
+ [Overview for Creating a Trail](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-create-and-update-a-trail.html)
+ [CloudTrail Supported Services and Integrations](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-aws-service-specific-topics.html#cloudtrail-aws-service-specific-topics-integrations)
+ [Configuring Amazon SNS Notifications for CloudTrail](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/getting_notifications_top_level.html)
+ [Receiving CloudTrail Log Files from Multiple Regions](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/receive-cloudtrail-log-files-from-multiple-regions.html) and [Receiving CloudTrail Log Files from Multiple Accounts](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-receive-logs-from-multiple-accounts.html)

Every event or log entry contains information about who generated the request. The identity information helps you determine the following: 
+ Whether the request was made with root or IAM user credentials.
+ Whether the request was made with temporary security credentials for a role or federated user.
+ Whether the request was made by another AWS service.

For more information, see the [CloudTrail userIdentity Element](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-event-reference-user-identity.html) in the *AWS CloudTrail User Guide*.

## CloudTrail log entry examples


The following examples are provided for specific Billing and Cost Management CloudTrail log entry scenarios.

**Topics**
+ [

### Billing and Cost Management log file entries
](#understanding-service-name-entries)
+ [

### Tax console
](#CT-example-tax)
+ [

### Payments
](#CT-example-payments-create)

### Billing and Cost Management log file entries


 A *trail* is a configuration that enables delivery of events as log files to an Amazon S3 bucket that you specify. CloudTrail log files contain one or more log entries. An event represents a single request from any source and includes information about the requested action, the date and time of the action, request parameters, and so on. CloudTrail log files are not an ordered stack trace of the public API calls, so they don't appear in any specific order.

The following example shows a CloudTrail log entry that demonstrates the `SetContactAddress` action.

```
{
        "eventVersion": "1.05",
        "userIdentity": {
            "accountId": "111122223333",
            "accessKeyId": "AIDACKCEVSQ6C2EXAMPLE"
        },
        "eventTime": "2018-05-30T16:44:04Z",
        "eventSource": "billingconsole.amazonaws.com",
        "eventName": "SetContactAddress",
        "awsRegion": "us-east-1",
        "sourceIPAddress": "100.100.10.10",
        "requestParameters": {
            "website": "https://amazon.com",
            "city": "Seattle",
            "postalCode": "98108",
            "fullName": "Jane Doe",
            "districtOrCounty": null,
            "phoneNumber": "206-555-0100",
            "countryCode": "US",
            "addressLine1": "Nowhere Estates",
            "addressLine2": "100 Main Street",
            "company": "AnyCompany",
            "state": "Washington",
            "addressLine3": "Anytown, USA",
            "secondaryPhone": "206-555-0101"
        },
        "responseElements": null,
        "eventID": "5923c499-063e-44ac-80fb-b40example9f",
        "readOnly": false,
        "eventType": "AwsConsoleAction",
        "recipientAccountId": "1111-2222-3333"
    }
```

### Tax console


The following example shows a CloudTrail log entry that uses the `CreateCustomerCase` action.

```
{
   "eventVersion":"1.05",
   "userIdentity":{
      "accountId":"111122223333",
      "accessKeyId":"AIDACKCEVSQ6C2EXAMPLE"
   },
   "eventTime":"2018-05-30T16:44:04Z",
   "eventSource":"taxconsole.amazonaws.com",
   "eventName":"CreateCustomerCase",
   "awsRegion":"us-east-1",
   "sourceIPAddress":"100.100.10.10",
   "requestParameters":{
      "state":"NJ",
      "exemptionType":"501C",
      "exemptionCertificateList":[
         {
            "documentName":"ExemptionCertificate.png"
         }
      ]
   },
   "responseElements":{
      "caseId":"case-111122223333-iris-2022-3cd52e8dbf262242"
   },
   "eventID":"5923c499-063e-44ac-80fb-b40example9f",
   "readOnly":false,
   "eventType":"AwsConsoleAction",
   "recipientAccountId":"1111-2222-3333"
}
```

### Payments


The following example shows a CloudTrail log entry that uses the `Instruments_Create` action.

```
{
    "eventVersion": "1.08",
    "userIdentity": {
        "type": "Root",
        "principalId": "111122223333",
        "arn": "arn:aws:iam::111122223333:<iam>",
        "accountId": "111122223333",
        "accessKeyId": "AIDACKCEVSQ6C2EXAMPLE",
        "sessionContext": {
            "sessionIssuer": {},
            "webIdFederationData": {},
            "attributes": {
                "creationDate": "2024-05-01T00:00:00Z",
                "mfaAuthenticated": "false"
            }
        }
    },
    "eventTime": "2024-05-01T00:00:00Z",
    "eventSource": "payments.amazonaws.com",
    "eventName": "Instruments_Create",
    "awsRegion": "us-east-1",
    "sourceIPAddress": "100.100.10.10",
    "userAgent": "AWS",
    "requestParameters": {
        "accountId": "111122223333",
        "paymentMethod": "CreditCard",
        "address": "HIDDEN_DUE_TO_SECURITY_REASONS",
        "accountHolderName": "HIDDEN_DUE_TO_SECURITY_REASONS",
        "cardNumber": "HIDDEN_DUE_TO_SECURITY_REASONS",
        "cvv2": "HIDDEN_DUE_TO_SECURITY_REASONS",
        "expirationMonth": "HIDDEN_DUE_TO_SECURITY_REASONS",
        "expirationYear": "HIDDEN_DUE_TO_SECURITY_REASONS",
        "tags": {
            "Department": "Finance"
        }
    },
    "responseElements": {
        "paymentInstrumentArn": "arn:aws:payments::111122223333:payment-instrument:4251d66c-1b05-46ea-890c-6b4acf6b24ab",
        "paymentInstrumentId": "111122223333",
        "paymentMethod": "CreditCard",
        "consent": "NotProvided",
        "creationDate": "2024-05-01T00:00:00Z",
        "address": "HIDDEN_DUE_TO_SECURITY_REASONS",
        "accountHolderName": "HIDDEN_DUE_TO_SECURITY_REASONS",
        "expirationMonth": "HIDDEN_DUE_TO_SECURITY_REASONS",
        "expirationYear": "HIDDEN_DUE_TO_SECURITY_REASONS",
        "issuer": "Visa",
        "tail": "HIDDEN_DUE_TO_SECURITY_REASONS"
    },
    "requestID": "7c7df9c2-c381-4880-a879-2b9037ce0573",
    "eventID": "c251942f-6559-43d2-9dcd-2053d2a77de3",
    "readOnly": true,
    "eventType": "AwsApiCall",
    "managementEvent": true,
    "recipientAccountId": "111122223333",
    "eventCategory": "Management",
    "sessionCredentialFromConsole": "true"
}
```

# Compliance validation for AWS Billing and Cost Management
Compliance validation

Third-party auditors assess the security and compliance of AWS services as part of multiple AWS compliance programs. Billing and Cost Management is not in scope of any AWS compliance programs.

For a list of AWS services in scope of specific compliance programs, see [AWS Services in Scope by Compliance Program](https://aws.amazon.com/compliance/services-in-scope/). For general information, see [AWS Compliance Programs](https://aws.amazon.com/compliance/programs/).

You can download third-party audit reports using AWS Artifact. For more information, see [Downloading Reports in AWS Artifact](https://docs.aws.amazon.com/artifact/latest/ug/downloading-documents.html).

Your compliance responsibility when using Billing and Cost Management is determined by the sensitivity of your data, your company's compliance objectives, and applicable laws and regulations. AWS provides the following resources to help with compliance:
+ [Security and Compliance Quick Start Guides](https://aws.amazon.com/quickstart/?awsf.quickstart-homepage-filter=categories%23security-identity-compliance) – These deployment guides discuss architectural considerations and provide steps for deploying security- and compliance-focused baseline environments on AWS.
+ [AWS Compliance Resources](https://aws.amazon.com/compliance/resources/) – This collection of workbooks and guides might apply to your industry and location.
+ [Evaluating Resources with Rules](https://docs.aws.amazon.com/config/latest/developerguide/evaluate-config.html) in the *AWS Config Developer Guide* – The AWS Config service assesses how well your resource configurations comply with internal practices, industry guidelines, and regulations.
+ [AWS Security Hub CSPM](https://docs.aws.amazon.com/securityhub/latest/userguide/what-is-securityhub.html) – This AWS service provides a comprehensive view of your security state within AWS that helps you check your compliance with security industry standards and best practices.

# Resilience in AWS Billing and Cost Management
Resilience

The AWS global infrastructure is built around AWS Regions and Availability Zones. AWS Regions provide multiple physically separated and isolated Availability Zones, which are connected with low-latency, high-throughput, and highly redundant networking. With Availability Zones, you can design and operate applications and databases that automatically fail over between zones without interruption. Availability Zones are more highly available, fault tolerant, and scalable than traditional single or multiple data center infrastructures. 

For more information about AWS Regions and Availability Zones, see [AWS Global Infrastructure](https://aws.amazon.com/about-aws/global-infrastructure/).

# Infrastructure security in AWS Billing and Cost Management
Infrastructure security

As a managed service, AWS Billing and Cost Management is protected by AWS global network security. For information about AWS security services and how AWS protects infrastructure, see [AWS Cloud Security](https://aws.amazon.com/security/). To design your AWS environment using the best practices for infrastructure security, see [Infrastructure Protection](https://docs.aws.amazon.com/wellarchitected/latest/security-pillar/infrastructure-protection.html) in *Security Pillar AWS Well‐Architected Framework*.

You use AWS published API calls to access Billing and Cost Management through the network. Clients must support the following:
+ Transport Layer Security (TLS). We require TLS 1.2 and recommend TLS 1.3.
+ Cipher suites with perfect forward secrecy (PFS) such as DHE (Ephemeral Diffie-Hellman) or ECDHE (Elliptic Curve Ephemeral Diffie-Hellman). Most modern systems such as Java 7 and later support these modes.

# Access AWS Billing and Cost Management using an interface endpoint (AWS PrivateLink)
AWS PrivateLink

You can use AWS PrivateLink to create a private connection between your VPC and AWS Billing and Cost Management. You can access Billing and Cost Management as if it were in your VPC, without the use of an internet gateway, NAT device, VPN connection, or Direct Connect connection. Instances in your VPC don't need public IP addresses to access Billing and Cost Management.

You establish this private connection by creating an *interface endpoint*, powered by AWS PrivateLink. We create an endpoint network interface in each subnet that you enable for the interface endpoint. These are requester-managed network interfaces that serve as the entry point for traffic destined for Billing and Cost Management.

For more information, see [Access AWS services through AWS PrivateLink](https://docs.aws.amazon.com/vpc/latest/privatelink/privatelink-access-aws-services.html) in the *AWS PrivateLink Guide*.

For a complete list of service names, see [AWS services that integrate with AWS PrivateLink](https://docs.aws.amazon.com/vpc/latest/privatelink/aws-services-privatelink-support.html).

## Considerations for Billing and Cost Management
Considerations

Before you set up an interface endpoint for Billing and Cost Management, review [Considerations](https://docs.aws.amazon.com/vpc/latest/privatelink/create-interface-endpoint.html#considerations-interface-endpoints) in the *AWS PrivateLink Guide*.

Billing and Cost Management supports making calls to all of its API actions through the interface endpoint.

VPC endpoint policies are not supported for Billing and Cost Management. By default, full access to Billing and Cost Management is allowed through the interface endpoint. Alternatively, you can associate a security group with the endpoint network interfaces to control traffic to Billing and Cost Management through the interface endpoint.

## Create an interface endpoint for Billing and Cost Management
Create an interface endpoint

You can create an interface endpoint for Billing and Cost Management using either the Amazon VPC console or the AWS Command Line Interface (AWS CLI). For more information, see [Create an interface endpoint](https://docs.aws.amazon.com/vpc/latest/privatelink/create-interface-endpoint.html#create-interface-endpoint-aws) in the *AWS PrivateLink Guide*.

Create an interface endpoint for Billing and Cost Management using the following service name:

```
com.amazonaws.region.service-name
```

If you enable private DNS for the interface endpoint, you can make API requests to Billing and Cost Management using its default Regional DNS name. For example, `service-name.us-east-1.amazonaws.com`.

## Create an endpoint policy for your interface endpoint
Create an endpoint policy

An endpoint policy is an IAM resource that you can attach to an interface endpoint. The default endpoint policy allows full access to Billing and Cost Management through the interface endpoint. To control the access allowed to Billing and Cost Management from your VPC, attach a custom endpoint policy to the interface endpoint.

An endpoint policy specifies the following information:
+ The principals that can perform actions (AWS accounts, IAM users, and IAM roles).
+ The actions that can be performed.
+ The resources on which the actions can be performed.

For more information, see [Control access to services using endpoint policies](https://docs.aws.amazon.com/vpc/latest/privatelink/vpc-endpoints-access.html) in the *AWS PrivateLink Guide*.

**Example: VPC endpoint policy for AWS Price List API**  
The following is an example of a custom endpoint policy. When you attach this policy to your interface endpoint, all users that have access to the endpoint are can access AWS Price List API.

```
{
    "Statement": [
        {
            "Action": "pricing:*",
            "Effect": "Allow",
            "Principal": "*",
            "Resource": "*"
        }
    ]
}
```

To use the bulk file download for Price List API through AWS PrivateLink, you must also enable Amazon S3 access through AWS PrivateLink. For more information, see [AWS PrivateLink for Amazon S3](https://docs.aws.amazon.com/AmazonS3/latest/userguide/privatelink-interface-endpoints.html) in the *Amazon S3 User Guide*.