// This module is included in the following assemblies:
// as_connecting-to-amazon-s3.adoc

[id='create-s3-connection_{context}']
= Creating Amazon S3 connections

You must create an Amazon S3 connection before you can add an
Amazon S3 connection to an integration.

.Prerequisites

* AWS access key. See link:{LinkSyndesisConnectorGuide}#obtaining-aws-credentials_aws[Obtaining AWS credentials].

* If the bucket that you want the connection to access already exists, 
you must know:
** The region that the bucket is in. 
** The bucket's name or Amazon Resource Name (ARN). 

.Procedure

. In {prodname}, in the left panel, click *Connections* to
display any available connections.
. Click *Create Connection* to display
{prodname} connectors.
. Click the *Amazon S3* connector.
. In the *Access Key* field, enter an Amazon access key ID that is 
part of a user access key in the AWS account that manages 
the bucket that you want the connection to access. 
+
If the bucket that you want the connection to
access does not already exist then when {prodname} tries to start running the 
integration, it uses the AWS account associated with this access key to 
create the bucket. However, if the bucket already exists in some other 
AWS account, then the connection cannot create the bucket and the 
integration cannot start. 

. In the *Secret Key* field, enter the Amazon secret access key for the 
Amazon access key ID that you specified.

. In the *Region* field, select the AWS region in which the bucket resides.
If the connection creates the bucket, then it creates it in the
selected region.

. In the *Bucket Name or Amazon Resource Name* field, enter the name of
the bucket that you want this connection to access or enter the bucket's ARN.
+
If the bucket you specify does not yet exist then the connection
tries to create a bucket with the name that you specify.  
Because S3 allows a bucket to be used as a URL that can be accessed publicly, 
the bucket name that you specify must be globally unique. Also, it must meet
https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-s3-bucket-naming-requirements.html[S3 bucket naming requirements].

. Click *Validate*. {prodname} immediately tries to validate the
connection and displays a message that indicates whether or not
validation is successful. If validation fails, revise the configuration
details as needed and try again.
. When validation is successful, click *Next*.
. In the *Name* field, enter your choice of a name that
helps you distinguish this connection from any other connections.
For example, enter `Obtain S3 Data`.
. In the *Description* field, optionally enter any information that
is helpful to know about this connection. For example,
enter `*Sample S3 connection
that obtains data from a northeast bucket.*`
. Click *Save* to see that the connection you
created is now available. If you entered the example name, you would
see that *Obtain S3 Data* appears as a connection that you can 
choose to add to an integration.
