<commit_before>---
layout: "aws"
page_title: "AWS: aws_caller_identity"
sidebar_current: "docs-aws-datasource-caller-identity"
description: |-
  Get information about the identity of the caller for the provider
  connection to AWS.
---

# aws\_caller\_identity

Use this data source to get the access to the effective Account ID in
which Terraform is working.

~> **NOTE on `aws_caller_identity`:** - an Account ID is only available
if `skip_requesting_account_id` is not set on the AWS provider. In such
cases, the data source will return an error.

## Example Usage

```
data "aws_caller_identity" "current" {}

output "account_id" {
  value = "${data.aws_caller_identity.current.account_id}"
}
```

## Argument Reference

There are no arguments available for this data source.

## Attributes Reference

`account_id` is set to the ID of the AWS account.<commit_msg>provider/aws: Update calling_identity<commit_after>---
layout: "aws"
page_title: "AWS: aws_caller_identity"
sidebar_current: "docs-aws-datasource-caller-identity"
description: |-
  Get information about the identity of the caller for the provider
  connection to AWS.
---

# aws\_caller\_identity

Use this data source to get the access to the effective Account ID, User ID, and ARN in
which Terraform is authorized.

~> **NOTE on `aws_caller_identity`:** - an Account ID is only available
if `skip_requesting_account_id` is not set on the AWS provider. In such
cases, the data source will return an error.

## Example Usage

```
data "aws_caller_identity" "current" {}

output "account_id" {
  value = "${data.aws_caller_identity.current.account_id}"
}

output "caller_arn" {
  value = "${data.aws_caller_identity.current.arn}"
}

output "caller_user" {
  value = "${data.aws_caller_identity.current.user_id}"
}
```

## Argument Reference

There are no arguments available for this data source.

## Attributes Reference

`account_id` - The AWS Account ID number of the account that owns or contains the calling entity.
`arn` - The AWS ARN associated with the calling entity.
`user_id` - The unique identifier of the calling entity.
{'fraction_non_alphanumeric': 0.09575988565983802, 'fraction_numerical': 0.0, 'mean_word_length': 4.630026809651475, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4915149', 'n_tokens_mistral': 641, 'n_tokens_neox': 634, 'n_words': 240}