CmdID

CmdID / aws / aws cloudfront

aws cloudfront create-field-level-encryption-profile

Create a field-level encryption profile. AWS CLI reference

1 example 1 option Its page in the AWS CLI reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

To create a CloudFront field-level encryption profile

The following create-field-level-encryption-profile example creates a field-level encryption profile by providing the parameters in a JSON file named fle-profile-config.json. Before you can create a field-level encryption profile, you must have a CloudFront public key. To create a CloudFront public key, see the create-public-key command.

aws cloudfront create-field-level-encryption-profile --field-level-encryption-profile-config file://fle-profile-config.jsonIdentify
--field-level-encryption-profile-configThe request to create a field-level encryption profile.

Contents of fle-profile-config.json:

{
    "Name": "ExampleFLEProfile",
    "CallerReference": "cli-example",
    "Comment": "FLE profile for AWS CLI example",
    "EncryptionEntities": {
        "Quantity": 1,
        "Items": [
            {
                "PublicKeyId": "K2K8NC4HVFE3M0",
                "ProviderId": "ExampleFLEProvider",
                "FieldPatterns": {
                    "Quantity": 1,
                    "Items": [
                        "ExampleSensitiveField"
                    ]
                }
            }
        ]
    }
}
Its output
{
    "Location": "https://cloudfront.amazonaws.com/2019-03-26/field-level-encryption-profile/PPK0UOSIF5WSV",
    "ETag": "E2QWRUHEXAMPLE",
    "FieldLevelEncryptionProfile": {
        "Id": "PPK0UOSIF5WSV",
        "LastModifiedTime": "2019-12-10T01:03:16.537Z",
        "FieldLevelEncryptionProfileConfig": {
            "Name": "ExampleFLEProfile",
            "CallerReference": "cli-example",
            "Comment": "FLE profile for AWS CLI example",
            "EncryptionEntities": {
                "Quantity": 1,
                "Items": [
                    {
                        "PublicKeyId": "K2K8NC4HVFE3M0",
                        "ProviderId": "ExampleFLEProvider",
                        "FieldPatterns": {
                            "Quantity": 1,
                            "Items": [
                                "ExampleSensitiveField"
                            ]
                        }
                    }
                ]
            }
        }
    }
}

For more information, see Use field-level encryption to help protect sensitive data in the Amazon CloudFront Developer Guide.

Options

1 in the AWS CLI reference
--field-level-encryption-profile-configThe request to create a field-level encryption profile.