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#, then instructions for these are also provided.

In addition to custom scripts, you can also perform failure injection experiments using AWS Fault Injection Simulator (FIS).

2.1 Setup AWS CloudShell

If you will be using bash, Java, or Python, and are comfortable with Linux, it is highly recommended you use AWS CloudShell for this lab. If you will not be using AWS CloudShell, then skip to Step 2.2

  1. Go to the AWS CloudShell console here

  2. If this is your first time running CloudShell, then it will take less than a minute to create the environment. When you see a prompt like [cloudshell-user@ip-10-0-49-48 ~]$, then you can continue

  3. Validate that credentials are properly setup.

    • execute the command aws sts get-caller-identity
    • If the command succeeds, and the Arn contains assumed-role/TeamRole/MasterKey, then you can continue
  4. Adjust font size and theme using the gear icon on the upper right

  5. Explore the Actions menu (upper-right) - you can upload/download files or create new tabs

  6. Skip to Step 2.3

2.2 Setup AWS credentials and configuration

If you have chosen to use AWS CloudShell or Windows PowerShell, then skip this step

Otherwise, your execution environment needs to be configured to enable access to the AWS account you are using for the workshop. This includes:

  • Credentials - You identified these credentials back in step 1

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

    • Region: us-east-2
    • Default output: JSON

Note: us-east-2 is the Ohio region

  • If you already know how to configure these, please do so now.
  • If you need help, then follow these instructions
  • If you are using PowerShell for this lab, skip this step and continue to Step 2.3

2.3 Set up the programming language environment

Choose the appropriate section below for your language

Using bash is an effective way to execute the failure injection tests for this workshop. The bash scripts make use of the AWS CLI. Or if you wish, you may choose one of the other languages and scripts.

Click here for instructions if using bash:
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:

2.4 IAM Role for FIS

In this lab, some of the experiments will be executed AWS Fault Injection Simulator (FIS) in addition to using custom scripts. FIS needs a service role to inject failures for various components of a workload.

This IAM Role has already been created for you as part of the infrastructure deployment

You may proceed to the next step.

If you would like to view the instructions on how to create the IAM Role for FIS (for your information), then click here: