<commit_before>---
description: Amazon Web Services driver for machine
keywords:
- machine, Amazon Web Services, driver
menu:
  main:
    parent: smn_machine_drivers
title: Amazon Web Services
---

# Amazon Web Services

Create machines on [Amazon Web Services](http://aws.amazon.com).

To create machines on [Amazon Web Services](http://aws.amazon.com), you must supply two parameters: the AWS Access Key ID and the AWS Secret Access Key.

## Configuring credentials

Before using the amazonec2 driver, ensure that you've configured credentials. The driver uses Amazon's default credentials chain
to lookup credentials unless they are explicitly provided on the command line. The credential chain uses the following providers
to authenticate with AWS:

1.  Command line flags
1.  Environment variables
1.  AWS credentials file
1.  EC2 Instance Role

For more information, see the [AWS SDK for Go Developer's Guide](http://docs.aws.amazon.com/sdk-for-go/v1/developerguide/configuring-sdk.html).
 
### Command line flags

The first way to specify credentials is with the flags `--amazonec2-access-key` and `--amazonec2-secret-key` on the command line:

    $ docker-machine create --driver amazonec2 --amazonec2-access-key AKI******* --amazonec2-secret-key 8T93C*******  aws01

### Environment variables

You can use environment variables:

    $ export AWS_ACCESS_KEY_ID=AKID1234567890
    $ export AWS_SECRET_ACCESS_KEY=MY-SECRET-KEY
    $ docker-machine create --driver amazonec2 aws01

### AWS credentials file

You can also configure the standard credential file for Amazon AWS, `~/.aws/credentials`, which might look like:

    [default]
    aws_access_key_id = AKID1234567890
    aws_secret_access_key = MY-SECRET-KEY

On Mac OS or various flavors of Linux you can install the [AWS Command Line Interface](http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html#cli-quick-configuration)
(`aws cli`) in the terminal and use the `aws configure` command which guides you through the creation of the credentials file.

This is the simplest method. You can then create a new machine with:

    $ docker-machine create --driver amazonec2 aws01

### EC2 Instance Role

If you are running docker-machine from an existing EC2 instance, the amazonec2 driver will use the credentials for the IAM role
assigned to the instance if they are configured.

## Options

-   `--amazonec2-access-key`: Your access key id for the Amazon Web Services API.
-   `--amazonec2-secret-key`: Your secret access key for the Amazon Web Services API.<commit_msg>Revert "Merge pull request #36 from mrburrito/aws-iam-roles"<commit_after>---
description: Amazon Web Services driver for machine
keywords:
- machine, Amazon Web Services, driver
menu:
  main:
    parent: smn_machine_drivers
title: Amazon Web Services
---

# Amazon Web Services

Create machines on [Amazon Web Services](http://aws.amazon.com).

To create machines on [Amazon Web Services](http://aws.amazon.com), you must supply two parameters: the AWS Access Key ID and the AWS Secret Access Key.

## Configuring credentials

Before using the amazonec2 driver, ensure that you've configured credentials.

### AWS credential file

One way to configure credentials is to use the standard credential file for Amazon AWS `~/.aws/credentials` file, which might look like:

    [default]
    aws_access_key_id = AKID1234567890
    aws_secret_access_key = MY-SECRET-KEY

On Mac OS or various flavors of Linux you can install the [AWS Command Line Interface](http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html#cli-quick-configuration) (`aws cli`) in the terminal and use the `aws configure` command which guides you through the creation of the credentials file.

This is the simplest method, you can then create a new machine with:

    $ docker-machine create --driver amazonec2 aws01

### Command line flags

Alternatively, you can use the flags `--amazonec2-access-key` and `--amazonec2-secret-key` on the command line:

    $ docker-machine create --driver amazonec2 --amazonec2-access-key AKI******* --amazonec2-secret-key 8T93C*******  aws01

### Environment variables

You can use environment variables:

    $ export AWS_ACCESS_KEY_ID=AKID1234567890
    $ export AWS_SECRET_ACCESS_KEY=MY-SECRET-KEY
    $ docker-machine create --driver amazonec2 aws01

## Options

-   `--amazonec2-access-key`: Your access key id for the Amazon Web Services API.
-   `--amazonec2-secret-key`: Your secret access key for the Amazon Web Services API.
{'fraction_non_alphanumeric': 0.08584070796460178, 'fraction_numerical': 0.019690265486725665, 'mean_word_length': 4.2025316455696204, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6850077', 'n_tokens_mistral': 1354, 'n_tokens_neox': 1269, 'n_words': 520}