AWS CLI credentials

  • Now let’s set up the AWS credentials for CLI as an environment variable. Execute the given commands in the terminal with correct values (use text editor to populate these field and paste them into terminal) as these values will be used by Greengrass installer later on.

Using your own AWS Account

Let’s create IAM user using AWS IAM Console by going to Cloud9 dashboard and selecting IAM service.



  1. From IAM Dashboard click on Users then click Add user and give User name such as workshop_user_delete_later, Programmatic access would be sufficient enough.
  2. Click on Attach existing policies
  3. Click Create policy (this should open up new tab)
  4. In Create policy screen select JSON tab and delete lines 1-4 Policy
  5. Obtain minimal policy from here and copy / paste JSON (make sure all the previous JSON were deleted)
  6. Give policy name workshop_policy_delete_later and create
  7. Back at Add user screen search for policy name workshop_policy_delete_later to attach the policy and create user (If you don’t see above created policy click refresh button)
  8. Click through keeping default settings as presented and finally select Create user
  9. Once user is created download the CSV file as it contains the details we will need to configure AWS credentials. AWS_C9_show_home

Populate Cloud9 AWS credentials details

Here we will set AWS credentials using aws configure as well as enviroment variable which Greengrass v2 installer will use during install.

Setup aws configure

On terminal window type aws configure and populate all the given fields i.e.

> aws configure
AWS Access Key ID [None]: xxxxxxxxxxxxxx
AWS Secret Access Key [None]: xxxxxxxxxxxxxxxxxxxxxxxxxx
Default region name [None]: eu-west-1
Default output format [None]: json

Setup environment variable

Switching back to Cloud9 window (terminal), Using the details from above populate each parameter i.e. as below

export AWS_DEFAULT_REGION="Region you want to use, e.g.for Ireland: eu-west-1" 
export AWS_ACCESS_KEY_ID="The AccessKeyId value of the result above"
export AWS_SECRET_ACCESS_KEY="The SecretAccessKey value of the result above"

Let’s just check these are all set correctly (you should see values you have set above echoed back):


You will see parameters being set from what you defined as above.

If you encounter any issues during the workshop, first see if you can find your solution in Troubleshooting section