|
| 1 | +--- |
| 2 | +sidebar_label: Check your live infrastructure is CIS AWS v1.4 compliant |
| 3 | +--- |
| 4 | + |
| 5 | +# Step 1: Check your live infrastructure is CIS AWS v1.4 compliant |
| 6 | + |
| 7 | +The later steps in this guide assume that you are upgrading from CIS AWS Foundations Benchmark v1.4 to v1.5. |
| 8 | + |
| 9 | +Before you update to CIS AWS Foundations Benchmark v1.5, we strongly recommend that you confirm that your live |
| 10 | +infrastructure is compliant with the CIS AWS Foundations Benchmark v1.4. |
| 11 | + |
| 12 | +If you do not have existing tooling in place to confirm this, then we suggest that you run the |
| 13 | +[Steampipe CIS v1.4.0](https://hub.steampipe.io/mods/turbot/aws_compliance/controls/benchmark.cis_v140) check against |
| 14 | +your infrastructure. |
| 15 | + |
| 16 | +In the final step in this guide, we suggest you run Steampipe to verify that your infrastructure is CIS AWS Foundations |
| 17 | +Benchmark v1.5 compliant. |
| 18 | + |
| 19 | +## 1.1 Download and install Steampipe |
| 20 | + |
| 21 | +Homebrew is the recommended way to install Steampipe for Mac. Instructions for different OS versions can be found at |
| 22 | +https://steampipe.io/downloads. |
| 23 | + |
| 24 | +``` |
| 25 | +brew tap turbot/tap |
| 26 | +brew install steampipe |
| 27 | +``` |
| 28 | + |
| 29 | +Next install the AWS plugin with Steampipe: |
| 30 | + |
| 31 | +``` |
| 32 | +steampipe plugin install aws |
| 33 | +``` |
| 34 | + |
| 35 | +## 1.2 Configure Steampipe with AWS credentials |
| 36 | + |
| 37 | +The [Steampipe AWS plugin](https://hub.steampipe.io/plugins/turbot/aws) supports a range of options for granting |
| 38 | +Steampipe access to your AWS accounts. |
| 39 | + |
| 40 | +In order for the compliance checks to work correctly, you need to: |
| 41 | +- Configure [multi-region connections](https://hub.steampipe.io/plugins/turbot/aws#multi-region-connections) so that Steampipe can access to all the regions you are using |
| 42 | +- Configure [multi-account connections](https://hub.steampipe.io/plugins/turbot/aws#multi-account-connections) so that Steampipe can access all the accounts you are using |
| 43 | + |
| 44 | +## 1.3 Clone the Steampipe AWS Compliance Mod |
| 45 | + |
| 46 | +The [AWS Compliance Mod](https://hub.steampipe.io/mods/turbot/aws_compliance#aws-compliance-mod) includes compliance |
| 47 | +checks for CIS AWS Foundations Benchmark v1.4 and v1.5. |
| 48 | + |
| 49 | +Clone: |
| 50 | + |
| 51 | +``` |
| 52 | +git clone https://github.com/turbot/steampipe-mod-aws-compliance.git |
| 53 | +cd steampipe-mod-aws-compliance |
| 54 | +``` |
| 55 | + |
| 56 | +## 1.4 Run the CIS v1.4.0 compliance check |
| 57 | + |
| 58 | +Before running, an IAM credential report needs to be generated: |
| 59 | + |
| 60 | +``` |
| 61 | +aws iam generate-credential-report |
| 62 | +``` |
| 63 | + |
| 64 | +Run the check while authenticated to the AWS account you want to verify: |
| 65 | + |
| 66 | +``` |
| 67 | +steampipe check aws_compliance.benchmark.cis_v140 |
| 68 | +``` |
| 69 | + |
| 70 | +Example: |
| 71 | + |
| 72 | +``` |
| 73 | +aws-vault exec dev -- aws iam generate-credential-report |
| 74 | +aws-vault exec dev -- steampipe check aws_compliance.benchmark.cis_v140 |
| 75 | +``` |
| 76 | + |
| 77 | +## Next steps |
| 78 | + |
| 79 | +If you've confirmed that your live infrastructure is compliant with the CIS AWS Foundations Benchmark v1.4 then you're |
| 80 | +ready to move to [step 2](step-2-update-references-to-the-gruntwork-infrastructure-as-code-library.md) and update your |
| 81 | +references to the Gruntwork Infrastructure as Code Library. Otherwise, if some checks are failing you should check the [Manual steps](/guides/build-it-yourself/achieve-compliance/deployment-walkthrough/manual-steps) section, that contains extra steps to achieve CIS compliance. |
0 commit comments