Amazon Simple Email Service
Developer Guide

Create a Shared Credentials File

The following procedure shows how to create a shared credentials file in your home directory. For the SDK sample code to function properly, you must create this file.

  1. In a text editor, create a new file. In the file, paste the following code:

    [default] aws_access_key_id = YOUR_AWS_ACCESS_KEY_ID aws_secret_access_key = YOUR_AWS_SECRET_ACCESS_KEY
  2. In the text file you just created, replace YOUR_AWS_ACCESS_KEY with your unique AWS access key ID, and replace YOUR_AWS_SECRET_ACCESS_KEY with your unique AWS secret access key.

  3. Save the file. The following table shows the correct location and file name for your operating system.

    If you're using... Save the file as...
    Windows

    C:\Users\<yourUserName>\.aws\credentials

    Note

    In Windows, to create a directory with a name that begins with a period, you have to use the Command Prompt. You can't use the Windows File Explorer to create this directory.

    To create the .aws directory, type the following command at the Windows Command Prompt:

    mkdir "%UserProfile%\.aws"
    Linux, macOS, or Unix

    ~/.aws/credentials

    Note

    In Linux, macOS, or Unix, to create a directory with a name that begins with a period, you have to use the terminal. You can't use graphical file managers to create this directory.

    To create the .aws directory, type the following command in a terminal window:

    mkdir ~/.aws

    Important

    Don't include a file extension when saving the credentials file.