Walkthrough: Accessing your data
This topic explains how to access your organization's data using the Amazon Web Services Command Line Interface (AWS CLI).
This walkthrough assumes that you have:
-
An Amazon Web Services (AWS) account with access to the AWS Management Console and permission to create an IAM role.
-
The AWS Command Line Interface (AWS CLI), configured to access your AWS instance using the IAM role.
To prepare to access your data, you first collect required details about your Sitecore CDP instance. Then, you create an IAM role. Next, you contact your Sitecore representative to request access to your data by authorizing the IAM role. After the IAM role is authorized, you use the IAM role in the AWS CLI to securely access the data.
This walkthrough describes how to:
-
Collect required details.
-
Create an IAM role.
-
Request access to your data.
-
Access your data.
Collect required details
During the access process, you have to provide details about your Sitecore CDP instance, so we recommend you collect the following necessary information before you request access to your data.
Client key
In Sitecore CDP, the client key is your organization's unique and public identifier.
To find your client key, in Sitecore CDP, on the navigation pane, click > API access > Client key.
Deployment environment
The deployment environment is production
unless your Sitecore representative informs you otherwise.
Region code
The region code depends on the environment of your Sitecore CDP instance.
To find the region code, in Sitecore CDP, on the navigation pane, click > Company information > Environment.
Environment |
Region code |
---|---|
AP Region |
|
EU Region |
|
JP Region |
|
US Region |
|
Create an IAM role
To create an IAM role:
-
In the AWS Management Console, create an IAM role that will be authorized to access the data.
-
To make a note of the IAM role in the Amazon Resource Name (ARN) format, in the following, replace
<aws_account_id>
with your AWS account ID and<role_name_with_path>
with a valid path.
Request access
After you create an IAM role, contact your Sitecore representative to request access to your data. You must provide your Sitecore representative with the IAM role in the ARN format.
Then, your Sitecore representative will work with you to authorize the IAM role.
Access your data
After the IAM role is authorized, you can use it in the AWS Command Line Interface (AWS CLI) to securely access your organization's data. For example, in the export folder, you can perform any Amazon S3 action that starts with Get or List. You can also use aws s3 cp
commands to download your data or copy it to another Amazon S3 bucket of your choice. This walkthrough describes how to use aws s3 cp
commands to access your data.
You must have the AWS CLI installed and configured to access your AWS instance using the IAM role.
To access your data:
-
Use
aws s3 cp
commands.
Download all your data to your local machine:
aws s3 cp s3://bx-<client_key>-<env>-<region_code>/analytics/bdl/exports/data . --recursive
Download a specific day's data to your local machine:
aws s3 cp s3://bx-<client_key>-<env>-<region_code>/analytics/bdl/exports/data/<date> . --recursive
Copy all your data to another Amazon S3 bucket of your choice:
aws s3 cp s3://bx-<client_key>-<env>-<region_code>/analytics/bdl/exports/data <destination> --recursive
Copy a specific day's data to another Amazon S3 bucket of your choice:
aws s3 cp s3://bx-<client_key>-<env>-<region_code>/analytics/bdl/exports/data/<date> <destination> --recursive
In the example commands, replace the placeholder values with the required details from your Sitecore CDP instance and with export details depending your export needs.
Attribute |
Type |
Description |
Example |
---|---|---|---|
|
string |
Your Sitecore CDP client key. |
|
|
string |
The deployment environment. |
|
|
string |
The region code. |
Must be one of:
|
|
string |
A date in the past or today's date. Format: |
|
|
string |
The Amazon S3 bucket URL that you want to copy your data to. |
|
After you run one of these commands, your organization's data is either downloaded locally or copied to another Amazon S3 bucket of your choice.