Configure Execution Environment

Failure injection is a means of testing resiliency by which a specific failure type is simulated on a service and its response is assessed.

You have a choice of environments from which to execute the failure injections for this lab. Bash scripts are a good choice and can be used from a Linux command line. If you prefer Python, Java, Powershell, or C# instructions for these are also provided.

2.1 Setup AWS credentials and configuration

Your execution environment needs to be configured to enable access to the AWS account you are using for the workshop. This includes

  • Credentials

    • AWS access key
    • AWS secret access key
    • AWS session token (used in some cases)
  • Configuration

    • Region: us-east-2 (or region where you deployed your WebApp)
    • Default output: JSON

Note: us-east-2 is the Ohio region

  • If you already know how to configure these, please do so now and proceed to the next step 2.2 Set up the bash environment
  • If you need help then follow the instructions in either Option A or Option B below

Option A - AWS CLI

This option uses the AWS CLI. If you do not have this installed, or do not want to install it, then use Option B

  1. To see if the AWS CLI is installed:

       $ aws --version
       aws-cli/1.16.249 Python/3.6.8...
    
    • AWS CLI version 1.1 or higher is fine
    • If you instead got command not found then either install the AWS CLI or use Option B
  2. Run aws configure and provide the following values:

     $ aws configure
     AWS Access Key ID [*************xxxx]: <Your AWS Access Key ID>
     AWS Secret Access Key [**************xxxx]: <Your AWS Secret Access Key>
     Default region name: [us-east-2]: us-east-2 (or your chosen region)
     Default output format [None]: json
    

Option B - Manually creating credential files

If you already did Option A, then skip this

  1. create a .aws directory under your home directory

     mkdir ~/.aws
    
  2. Change directory to there

     cd ~/.aws
    
  3. Use a text editor (vim, emacs, notepad) to create a text file (no extension) named credentials. In this file you should have the following text.

     [default]
     aws_access_key_id = <Your access key>
     aws_secret_access_key = <Your secret key>
    
  4. Create a text file (no extension) named config. In this file you should have the following text:

     [default]
     region = us-east-2 (or your chosen region)
     output = json
    

2.2 Set up the bash environment

Click here for instructions if using bash:

2.3 Set up the programming language environment (for Python, Java, C#, or PowerShell)

Choose the appropriate section below for your language

Click here for instructions if using Python:
Click here for instructions if using Java:
Click here for instructions if using C#:
Click here for instructions if using PowerShell: