1**To create a CloudFront origin access identity**
2
3The following example creates a CloudFront origin access identity (OAI) by
4providing the OAI configuration as a command line argument::
5
6    aws cloudfront create-cloud-front-origin-access-identity \
7        --cloud-front-origin-access-identity-config \
8            CallerReference="cli-example",Comment="Example OAI"
9
10You can accomplish the same thing by providing the OAI configuration in a JSON
11file, as shown in the following example::
12
13    aws cloudfront create-cloud-front-origin-access-identity \
14        --cloud-front-origin-access-identity-config file://OAI-config.json
15
16The file ``OAI-config.json`` is a JSON document in the current directory that
17contains the following::
18
19    {
20        "CallerReference": "cli-example",
21        "Comment": "Example OAI"
22    }
23
24Whether you provide the OAI configuration with a command line argument or a
25JSON file, the output is the same::
26
27    {
28        "Location": "https://cloudfront.amazonaws.com/2019-03-26/origin-access-identity/cloudfront/E74FTE3AEXAMPLE",
29        "ETag": "E2QWRUHEXAMPLE",
30        "CloudFrontOriginAccessIdentity": {
31            "Id": "E74FTE3AEXAMPLE",
32            "S3CanonicalUserId": "cd13868f797c227fbea2830611a26fe0a21ba1b826ab4bed9b7771c9aEXAMPLE",
33            "CloudFrontOriginAccessIdentityConfig": {
34                "CallerReference": "cli-example",
35                "Comment": "Example OAI"
36            }
37        }
38    }
39