test_aws.run()[source]¶This script demonstrate the solution of the challenge at:
https://github.com/picussecurity/picus-challenge-questions/blob/master/devops/Fleet.md
Simply run this script (adjusting the call procedure you desire) to demonstrate all 7 challenge or call directly “foo” module in bash as written in challenge’s github page.
Note
Before running this script, follow the steps if not available;
2.1. Select Access Type as “Programmatic access” for this user. Thus, enables an access key ID and secret access key for the AWS API, CLI, SDK, and other development tools.
2.2. Attach “AmazonEC2FullAccess”,”AmazonSSMFullAccess” and “IAMFullAccess” policy for the user.
2.3. Set “AWS_CRED_FILE” env. variable showing access key ID & secret access key a in a csv file downloaded from AWS (2.1).
2.4. Set “COMPANY_PUBKEY” env. variable showing Public Key to import key pair on EC2 service.
Important
AMI (Amazon Machine Image) is selected as Amazon Linux AMI. Region is selected as Frankfurt and hard coded AMI (ami-c7ee5ca8) is in also Frankfurt (eu-central-1) region.