Before you begin
As for any Amazon service, you will need your Amazon credentials. You can enter your credentials in the Access Key and Secret Key fields, or use context variables, as mentioned in the Amazon EMR - Getting Started article.
- In a Standard Job, add a tS3Connection component and open the Component view.
You may choose any resource location; however, we recommend not using the
EU (Frankfurt) region:
To check if a bucket already exists, you can use the
tS3BucketExist component. Add a
tS3BucketExist component and connect it to the
tS3Connection component with an
This component can reuse the connection information from the tS3Connection component:
This component reports the existence of the S3 bucket as a Boolean global
variable named tS3BucketExist_1.BUCKET_EXIST:
To create the bucket if it doesn't already exist, add a
tS3BucketCreate component and connect it to
tS3BucketExist with a Run If
Set the condition on the Run If trigger as follows:
This condition means that the tS3BucketCreate will execute only if the bucket does not exist.
Open the Component view of the
tS3BucketCreate component and provide the bucket
- Run your Job.
When the Job has executed, from the Amazon Web Services home page, navigate to S3:
You will reach the Amazon S3 home page, where you can see the list of your buckets. You should find your new bucket created from the Talend Studio:
In a similar way, you can delete an existing bucket using the tS3BucketDelete component.Warning:
Make sure that your bucket name is unique. Otherwise, you may inadvertently work on someone else's bucket.