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

[id='obtaining-aws-credentials_{context}']
= Obtaining AWS credentials for creating connections to Amazon services

To create a connection to an Amazon service, you must have an access
key that is associated with an AWS account. This is the AWS account 
that created, or will create, the resource that you want the 
{prodname} connection to access. The resource can be an S3 bucket, 
an SNS topic, or an SQS queue. 

An AWS access key has two parts: 

* Amazon access key ID
* Amazon secret access key

AWS uses access keys to authenticate requests from a {prodname}
connection. There is plenty of AWS documentation about creating and managing 
access keys. If you already created an AWS Identity and Access Management (IAM)
user and captured the access key associated with that user, you can specify
those values to create a {prodname} connection to S3, SNS, or SQS. 

If you need to obtain an access key, the procedure below is one way to 
do it. 

.Prerequisites

* Login credentials for the AWS account that created the 
resource that you want a connection to access. 
* Or, login credentials for the AWS account that you want 
the connection to use to create a new resource. 

.Procedure

. Go to link:https://aws.amazon.com/[] and sign in to the console.

. In the console, in the upper right, click the down arrow next to
the user name and click *My Security Credentials*.

. In the popup dialog, click *Get Started with IAM Users*. 
+
If a popup with this button does not appear, then on the left, click *Users*.
. Add a user:
.. Click *Add User* 
.. Enter a user name and select *Programmatic Access*. 
.. Click *Next: Permissions*. 
.. Respond to the prompts for adding the new user to a group. 
.. Click *Next: Tags*. 
.. Skip adding tags and click *Next: Review*. 
.. Click *Create User*. 
. Click *Download .csv* to obtain a local copy of the access key. The
downloaded file contains the access key ID and the secret access key, 
which you must specify to create a connection to an Amazon service. 
. Click *Close*. 

.Additional resources
* link:https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html[Managing Access Keys for IAM Users]
* link:https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html[IAM Best Practices]
