Amazon S3 Connector > Amazon S3 Sources and Targets > Amazon S3 Targets
  

Amazon S3 Targets

You can use an Amazon S3 object as a single target in a synchronization task, mapping, or mapping task.
You can also create an Amazon S3 target based on the input source. When you configure the advanced target properties, you configure properties specific to Amazon S3. If a mapping includes a flat file or an Amazon S3 target, you can choose to use an existing target or create a new target at run time.

Client-side Encryption for Amazon S3 Targets

Client-side encryption is a technique to encrypt data before transmitting the data to the Amazon S3 server.
When you enable client-side encryption for Amazon S3 targets, the Secure Agent fetches the data from the source, encrypts the data, and then writes the data to an Amazon S3 bucket.
To enable client-side encryption, you must provide a master symmetric key or customer master key in the connection properties and select the Client Side Encryption option in the advanced target properties. The Secure Agent encrypts the data by using the master symmetric key or customer master key.

Distribution Column

You can write multiple files to Amazon S3 target from a single source. Configure the Distribution Column option in the advanced target properties.
You can specify one column name in the Distribution Column field to create multiple target files during run time. When you specify the column name, the Secure Agent creates multiple target files in the column based on the column values that you specify in Distribution Column.
Each target file name is appended with the Distribution Column value in the following format:
<Target_fileName>+_+<Distribution column value>+<file extension>
Each target file contains all the columns of the table including the column that you specify in the Distribution Column field.
For example, the name of the target file is Region.csv that contains the values North America and South America. The following target files are created based on the values in the Distribution Column field:
Region_North America.csv
Region_South America.csv
You cannot specify two column names in the Distribution Column field. If you specify a column name that is not present in target field column, the task fails.
When you specify a column that contains value with special characters in the Distribution Column field, the Secure Agent fails to create target file if the corresponding Operating System do not support the special characters.
For example, the Secure Agent fails to create target file if the column contains date value in the following format: YYYY/MM/DD

Object Tag

You can add a tag to the object stored on the Amazon S3 bucket. Each tag contains a key value pair.
Tagging an object helps to categorize the storage. You can add the object tags in the Object Tags field under the advanced target properties. Enter the object tag in the Key=Value format. You can also enter multiple object tags in the following format:
Key1=Value1
Key2=Value2
You can either enter the key value pairs or the specify the file path that contains the key value pairs. For example, you can specify the file path in the C:\object\tags.txt format. You can specify any file path on which the Secure Agent is installed.
When you upload new objects in the Amazon S3 bucket, you can add tags to the new objects or add tags to the existing objects. If the Secure Agent overrides a file that contains a tag in the Amazon S3 bucket, the tag is not retained. You must add a new tag for the overridden file. If you upload multiple files to the Amazon S3 bucket, each file that you upload must have the same set of tags associated with the multiple objects.
To add tags in the Amazon S3 target object, you must add the s3:PutObjectTagging permission in the Amazon S3 policy. Following is the sample policy:
{
"Version": "2012-10-17",
"Id": "Policy1500966932533",
"Statement": [
{
"Sid": "Stmt1500966903029",
"Effect": "Allow",
"Principal": "*",
"Action": [
"s3:DeleteObject",
"s3:GetBucketPolicy",
"s3:GetObject",
"s3:ListBucket",
"s3:PutObject",
"s3:PutObjectTagging"
],
"Resource": [
"arn:aws:s3:::<bucket_name>/*",
"arn:aws:s3:::<bucket_name>"
]
}
]
}
The following table lists the special characters that Amazon S3 Connector supports during entering the key value pair:
Special Characters
Support
+
Yes
-
Yes
=
No
.
Yes
_
Yes
:
Yes
/
Yes

Rules and guidelines for tagging an object

Use the following rules and guidelines for tagging an object:

Partitioning

You can configure partitioning to optimize the mapping performance at run time when you write data to Amazon S3 targets.
The partition type controls how the agent distributes data among partitions at partition points. You can define the partition type as passthrough partitioning. With partitioning, the Secure Agent distributes rows of target data based on the number of threads that you define as partition.
You can configure the Merge Partition Files options in the advanced target properties. You can specify whether the Secure Agent must merge the number of partition files as a single file or maintain separate files based on the number of partitions specified to write data to the Amazon S3 targets.
If you do not select the Merge Partition Files option, separate files are created based on the number of partitions specified. The file name is appended with a number starting from 0 in the following format: <file name>_<number>
For example, the number of threads for the Region.csv file is three. If you do not select the Merge Partition Files option, the Secure Agent writes three separate files in the Amazon S3 target in the following format:
<Region_0>
<Region_1>
<Region_2>
If you configure the Merge Partition Files option, the Secure Agent merges all the partitioned files as a single file and writes the file to Amazon S3 target.