# tS3Configuration properties for Apache Spark Batch

These properties are used to configure tS3Configuration running in the Spark Batch Job framework.

The Spark Batch tS3Configuration component belongs to the Storage family.

The component in this framework is available in all subscription-based Talend products with Big Data and Talend Data Fabric.

## Basic settings

| Properties | Description |
| --- | --- |
| Access Key | Enter the access<br>key ID that uniquely identifies an AWS Account. For further information about how to<br>get your Access Key and Secret Key, see [Getting Your AWS Access<br>Keys](http://docs.aws.amazon.com/ses/latest/DeveloperGuide/get-aws-keys.html). |
| Secret Key | Enter the secret access key,<br>constituting the security credentials in combination with the access Key.<br><br>To enter the secret key, click the [...]<br>button next to the secret key field, and then in the pop-up dialog box enter the password<br>between double quotes and click OK to save the<br>settings. |
| Hadoop S3 version | Select the Hadoop version you are using from the drop-down list.<br><br>If the<br>cluster has S3 libraries, select Use cluster's libraries<br>to avoid conflicts by uploading non aligned dependencies. If the cluster does<br>not have S3 libraries, select the version that matches the Hadoop libraries on<br>the cluster.<br><br>This parameter is not available when the Spark Job is<br>running on Spark Universal in Databricks,<br>Local, or Standalone<br>modes. |
| File System | Select the file system type from the drop-down list:<br><br><ul> <li><span>S3A File System</span> to use the standard Hadoop connector                        for accessing Amazon S3.</li> <li><span>EMR File System</span> to leverage Amazon EMR's connector                        with features like Consistent View and advanced AWS integration.</li> </ul><br><br>This field is only available when you have selected the Inherit<br>credentials from AWS check box. |
| Use EMRFS consistent view | Select this check box to use the EMR File System (EMRFS) consistent view.<br>This option allows EMR clusters to check for list and read-after-write consistency<br>for Amazon S3 objects that are written by or synced with EMRFS.<br><br>Information noteNote: Avoid<br>alternatively switching the consistent view on and off on a single bucket, as<br>it might create inconsistency errors. If this issue occurs, you can fix the<br>inconsistencies using the sync command in the EMRFS CLI. For<br>more information, see [EMRFS CLI Reference](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emrfs-cli-reference.html).<br><br>This feature is<br>available when you are using the Amazon EMR 5.29 distribution. |
| EMRFS metadata table | Enter the name of the metadata DynamoDB table to be used.<br><br>Information noteNote: The<br>default metadata table name is<br>EmrFSMetadata.<br><br>This field is only available<br>when you have selected the Use EMRFS<br>consistent view check box. |
| Bucket name | Enter the bucket name and its folder you need to use. You<br>need to separate the bucket name and the folder name using a slash (/). |
| Temp folder | Enter the location of the temp folder in S3.<br>This folder will be automatically created if it has not existed by the time of the<br>execution. |
| Inherit credentials from AWS | Select this check box to obtain AWS security credentials from your IAM role.<br>This option is available for Amazon EMR and Databricks on AWS clusters. To use<br>this option, the cluster must be started and your Job must be running on this<br>cluster. For more information, see [Using an IAM Role to Grant Permissions to Applications<br>Running on Amazon EC2 Instances](http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2.html)<br>.<br><br>This option enables you to develop your Job without having to put any<br>AWS keys in the Job, thus easily comply with the security policy of your<br>organization. |
| Use SSE encryption | Select this check box<br>to use the SSE-KMS encryption service enabled on AWS to read or write the<br>encrypted data on S3.<br><br>On the EMR side, the SSE-KMS service must have been enabled with the<br>Default encryption feature and a customer managed CMK<br>specified for the encryption.<br><br>For further information<br>about the AWS SSE-KMS encryption, see [Protecting Data Using Server-Side Encryption](https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html) from<br>the AWS documentation.<br><br>For further information about how to enable the Default<br>Encryption feature for an Amazon S3 bucket, see [Default encryption](https://docs.aws.amazon.com/AmazonS3/latest/user-guide/default-bucket-encryption.html) from the AWS documentation.<br><br>This property is available only when you are using Amazon EMR<br>distributions. |
| Bucket encryption | Select the default encryption you used for your bucket from the drop-down list:<br><br><ul> <li> <span>aws:kms</span>: server side encryption with AWS KMS-Managed                           Keys (SSE-KMS)</li> <li> <span>SSE-S3</span>: server side encryption with Amazon S3-Managed                           Keys (SSE-S3)</li> </ul><br><br>This property is available only when you are using Amazon EMR<br>distributions. |
| Use 'in-transit' encryption | Select this check box to enable the encryption of data in transit.<br><br>Information noteNote: The in-transit encryption is selected by default. If you deactivate this<br>option, you do not have to set up a KMS encrypted EMR cluster.<br><br>This property is available only when you are using Amazon EMR<br>distributions with SSE-KMS encryption. |
| Assume role | Select this check box to make your Job temporarily<br>assume a role and the permissions associated with this role.<br><br>Ensure that access to this<br>role has been granted to your user account by the trust policy associated to<br>this role. If you are not certain about this, ask the owner of this role or<br>your AWS administrator.<br><br>After selecting this check box, specify the parameters the administrator of the<br>AWS system to be used defined for this role.<br><br><ul> <li><p><span>ARN</span>: the Amazon Resource Name (ARN) of the role to                           assume. You can find this ARN name on the <span>Summary</span>                           page of the role to be used on your AWS portal, for example, this role                           ARN could read like                              <kbd>am:aws:iam::[aws_account_number]:role/[role_name]</kbd>.                           </p><span>Role session name</span>: enter the                        name you want to use to uniquely identify your assumed role session. This                        name can contain upper- and lower-case alphanumeric characters with no                        spaces. You can also include underscores or any of the following characters:                        =,.@-. </li> <li> <p><span>Session duration                              (minutes)</span>: the duration (in minutes) for which you want                           the assumed role session to be active. This duration cannot exceed the                           maximum duration which your AWS administrator has set. The duration                           defaults to 3600 seconds if you give it no value. </p> </li> </ul><br><br>The External<br>ID parameter is required only if your AWS administrator<br>or the owner of this role has defined an external ID when they set up a<br>trust policy for this role.<br><br><ul> <li> <span>Policy</span>:                                    enter an IAM policy in JSON format that you want to use as a                                    session policy. Use session policies to limit the permissions of                                    the session. The resulting session's permissions are the                                    intersection of the role's identity-based policy and the session                                    policies.</li> <li> <span>Policy                                        ARNs</span>: enter the Amazon Resource Names (ARNs) of                                    the IAM managed policies that you want to use as managed session                                    policies. Use managed session policies to limit the permissions                                    of the session. The policies must exist in the same account as                                    the role. The resulting session's permissions are the                                    intersection of the role's identity-based policy and the session                                    policies.</li> <li> <span>Serial                                        Number</span>: when you assume a role, the trust policy                                    of this role might require Multi-Factor Authentication (MFA). In                                    this case, you must indicate the identification number of the                                    hardware or virtual MFA device that is associated with the user                                    who assumes the role.</li> <li> <span>Tags</span>:                                    list session tags in the form of key-value pairs. You can then                                    use these session tags in policies to allow or deny access to                                    requests.</li> <li> <span>Token                                        Code</span>: when you assume a role, the trust policy                                    of this role might require Multi-Factor Authentication (MFA). In                                    this case, you must indicate a token code. This token code is a                                    time-based one-time password produced by the MFA device.</li> <li> <span>Transitive Tag                                        Keys</span>: list session tags in the form of key-value                                    pairs that you want to persist to the next role in a role                                    chain.</li> </ul><br><br>In addition, if the AWS administrator has enabled the<br>STS endpoints for given regions you want to use for better response<br>performance, use the Set STS region check box or the<br>Set STS endpoint check box in the<br>Advanced settings tab.<br><br>This check box is available only for the following distributions Talend supports:<br><br><ul> <li> <p>CDH 5.10 and onwards (including the dynamic support for the latest                              Cloudera distributions)</p> </li> <li> <p>HDP 2.5 and onwards</p> </li> <li> <p>EMR 5.15 and onwards</p> </li> <li>CDP Private Cloud Base 7.1 </li> </ul><br><br>This check box is also available when you are using<br>Spark V1.6 and onwards in the Local Spark mode in the Spark configuration tab. |
| KMS key id | Enter the ID of the customer managed CMK you want to use for the<br>encryption.<br><br>Information noteNote: You can either use one of the following format:<br><br><ul> <li>arn:aws:kms:region:account-id:key/key-id</li> <li>key-id</li> </ul><br><br>The KMS key id field is only available when you select<br>the Use SSE encryption check box. This feature is<br>available when you are using Amazon EMR distribution with Spark. |
| Set region | Select this check box and select the region<br>to connect to.<br><br>This feature is available when you are<br>using one of the following distributions with Spark:<br><br><ul> <li> <p>Amazon                            EMR V4.5 and up to V5.15. EMR uses EMRFS from V5.29</p> </li> <li> <p>MapR                            V5.0 and onwards </p> </li> <li> <p>Hortonworks Data Platform V2.4 and onwards </p> </li> <li> <p>Cloudera V5.8 and onwards. For Cloudera V5.8, the Spark version must be                            2.0.</p> </li> <li>Cloudera                        Altus</li> </ul> |
| Set endpoint | Select this<br>check box and in the Endpoint<br>field that is displayed, enter the Amazon region endpoint you need to use. For a<br>list of the available endpoints, see [Regions and Endpoints](http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region).<br><br>If you leave this check box clear, the endpoint will be the default<br>one defined by your Hadoop distribution, while this check box is not available when<br>you have selected the Set<br>region check box and in this situation the value selected from the<br>Set region list is<br>used.<br><br>This feature is available when you are<br>using one of the following distributions with Spark:<br><br><ul> <li> <p>Amazon                            EMR V4.5 and up to V5.15. EMR uses EMRFS from V5.29</p> </li> <li> <p>MapR                            V5.0 and onwards </p> </li> <li> <p>Hortonworks Data Platform V2.4 and onwards </p> </li> <li> <p>Cloudera V5.8 and onwards. For Cloudera V5.8, the Spark version must be                            2.0.</p> </li> <li>Cloudera                        Altus</li> </ul> |

## Advanced settings

| Properties | Description |
| --- | --- |
| Set region and Set endpoint | If the AWS<br>administrator has enabled the STS endpoints for the regions you want to use for<br>better response performance, select the Set<br>region check box and then select the regional endpoint to be<br>used.<br><br>If the endpoint you<br>want to use is not available in this regional endpoint list, clear the<br>Set<br>region check box, then select the Set<br>endpoint check box and enter the endpoint to be used.<br><br>This service allows you to request<br>temporary, limited-privilege credentials for the AWS user authentication.<br>Therefore, you still need to provide the access key and secret key to<br>authenticate the AWS account to be used.<br><br>For a list of the STS endpoints you can<br>use, see [AWS Security Token Service](https://docs.aws.amazon.com/general/latest/gr/rande.html#sts_region). For<br>further information about the STS temporary credentials, see [Temporary Security Credentials](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html).<br>Both articles are from the AWS documentation. |

## Usage

| Usage guidance | Description |
| --- | --- |
| **Usage rule** | This component is used with no need to be connected to other<br>components.<br><br>Multiple tS3Configuration components are allowed per Job. The Assume<br>Role option can be added to multiple tS3Configuration<br>components.<br><br>You need to drop tS3Configuration along with the file system related<br>subJob to be run in the same Job so that the configuration is used by the whole Job<br>at runtime. |
| Spark Connection | In the Spark<br>Configuration tab in the Run<br>view, define the connection to a given Spark cluster for the whole Job. In<br>addition, since the Job expects its dependent jar files for execution, you must<br>specify the directory in the file system to which these jar files are<br>transferred so that Spark can access these files:<br><br><ul> <li> <div> <span>Yarn mode</span> (Yarn client or Yarn cluster):<ul> <li> <p>When using Google Dataproc, specify a bucket in the                                            <span>Google Storage staging bucket</span>                                        field in the <span>Spark configuration</span>                                        tab.</p> </li> <li> <p>When using HDInsight, specify the blob to be used for Job                                        deployment in the <span>Windows Azure Storage                                            configuration</span> area in the <span>Spark                                            configuration</span> tab.</p> </li> <li>When using Altus, specify the S3 bucket or the Azure                                    Data Lake Storage for Job deployment in the <span>Spark                                        configuration</span> tab.</li> <li> <p>When using on-premises distributions, use                                        the configuration component corresponding to the file system                                        your cluster is using. Typically, this system is HDFS and so                                        use <a href="https://help.qlik.com/talend/r/en-US/8.0/components/hdfs/thdfsconfiguration">tHDFSConfiguration</a>.</p> </li> </ul> </div> </li> <li> <p> <span>Standalone mode</span>: use the                            configuration component corresponding to the file system your cluster is                            using, such as <a href="https://help.qlik.com/talend/r/en-US/8.0/components/hdfs/thdfsconfiguration-properties-for-apache-spark-batch">tHDFSConfiguration Apache Spark Batch</a> or <a href="https://help.qlik.com/talend/r/en-US/8.0/components/amazon-s3/ts3configuration-properties-for-apache-spark-batch">tS3Configuration Apache Spark Batch</a>.</p> <p>If you are using Databricks without any configuration component present                            in your Job, your business data is written directly in DBFS (Databricks                            Filesystem).</p> </li> </ul><br><br>This connection is effective on a per-Job basis. |
| Limitation | Due to license incompatibility, one or more JARs required to use this component<br>are not provided. You can install the missing JARs for this particular component by<br>clicking the Install button on the Component tab view. You can also find out and add all missing<br>JARs easily on the Modules tab in the Integration perspective of Talend Studio. For<br>details, see [Installing external modules](https://help.qlik.com/talend/r/en-US/8.0/studio-user-guide/installing-external-modules). |