<commit_before>=========
AWS / EC2
=========

.. _`get-started`:

Get started
===========

Step 1: Get your AWS credentials
--------------------------------

See :doc:`Get credentials <get_credentials/index>`.

Remember your *Access Key* and *Secret Access Key*.


Step 2: Connect to your region
------------------------------

.. image:: change_region.jpg


Step 3: Create a security group
-------------------------------
 
See :doc:`Create a security group <create_security_group/index>`.


Step 4: Choose an AMI
---------------------

Public AMI are available for theses regions:

- eu-west-1: i-2d7b465a


If you cannot find your region, you can :doc:`Copy an AMI from a region to another <copy_ami_to_region/index>`.


Step 5: Update configuration
----------------------------

Open :code:`conf.json`::

  {
    "providers": {
      "type": "awsec2",
      
      "awsec2": {
        "region": "eu-west-1",
        "instance": {
          "InstanceType": "t1.micro",
          "ImageId": "ami-2d7b465a",
          "SecurityGroups": [ "forward-proxy" ],
        }
      }
    }
  }

And update *region* and *ImageId* with your parameters.


.. _configure-scrapoxy-awsec2:

Configure Scrapoxy
==================

Options: awsec2
---------------

For credentials, there is 2 choices:

1. Add credentials in the configuration file;
2. Or Use your own credentials (from profile, see the `AWS documentation`_).

=============== ============= ==================================================
Option          Default value Description
=============== ============= ==================================================
accessKeyId     none          Credentials for AWS (optional)
secretAccessKey none          Credentials for AWS (optional)
region          none          AWS region (example: eu-west-1)
tag             Proxy         Name of the AWS / EC2 instance
instance        none          see :ref:`awsec2 / instance <awsec2-instance>`<commit_msg>fix(docs): change AMI number in AWSEC2 tutorial<commit_after>=========
AWS / EC2
=========

.. _`get-started`:

Get started
===========

Step 1: Get your AWS credentials
--------------------------------

See :doc:`Get credentials <get_credentials/index>`.

Remember your *Access Key* and *Secret Access Key*.


Step 2: Connect to your region
------------------------------

.. image:: change_region.jpg


Step 3: Create a security group
-------------------------------
 
See :doc:`Create a security group <create_security_group/index>`.


Step 4: Choose an AMI
---------------------

Public AMI are available for theses regions:

- eu-west-1: ami-1aa0ea6d 


If you cannot find your region, you can :doc:`Copy an AMI from a region to another <copy_ami_to_region/index>`.


Step 5: Update configuration
----------------------------

Open :code:`conf.json`::

  {
    "providers": {
      "type": "awsec2",
      
      "awsec2": {
        "region": "eu-west-1",
        "instance": {
          "InstanceType": "t1.micro",
          "ImageId": "ami-1aa0ea6d",
          "SecurityGroups": [ "forward-proxy" ],
        }
      }
    }
  }

And update *region* and *ImageId* with your parameters.


.. _configure-scrapoxy-awsec2:

Configure Scrapoxy
==================

Options: awsec2
---------------

For credentials, there is 2 choices:

1. Add credentials in the configuration file;
2. Or Use your own credentials (from profile, see the `AWS documentation`_).

=============== ============= ==================================================
Option          Default value Description
=============== ============= ==================================================
accessKeyId     none          Credentials for AWS (optional)
secretAccessKey none          Credentials for AWS (optional)
region          none          AWS region (example: eu-west-1)
tag             Proxy         Name of the AWS / EC2 instance
instance        none          see :ref:`awsec2 / instance <awsec2-instance>`
{'fraction_non_alphanumeric': 0.2636664124078312, 'fraction_numerical': 0.014492753623188406, 'mean_word_length': 2.2620232172470978, 'pattern_counts': {'":': 16, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5311828', 'n_tokens_mistral': 1104, 'n_tokens_neox': 1035, 'n_words': 343}