AWS Linux (RHEL/CentOS, Ubuntu, OpenSUSE) Hardening Process

There are various guideline for hardening Linux, like SCAP, CIS.

However, I can’t find specific version tuned for AWS Linux (in general, not Amazon Linux)

Are all those points still valid on AWS environment? For example, partitioning the tmp or var path, Red Hat subscription check, etc. I know there’re paid version of hardened AMI but which guideline are you guys using?


Related discussions:

Generally SELinux and the NIST guidelines are a good place to start.

SCAP is not a hardening guideline, it is a protocol standard, a reporting format(sorry about being picky).

Read the NIST standards and look at STIGs if you have access.

I’ve always liked this: https://github.com/openstack/ansible-hardening. It implements security hardening based off the STIGs.

It’s under the OpenStack repo, but it’s not specifically for OpenStack (it has support for all the major linux distro’s).

Edit: While this doesn’t actually answer your AWS question, the modules have a “private cloud” (OpensStack) in mind during their development so I assume there are similarities.

I use this one… https://github.com/awslabs/ami-builder-packer

https://github.com/MindPointGroup/RHEL7-CIS is another option

I think this is what you are looking for: https://www.cisecurity.org/benchmark/amazon_linux/

Most of the points are valid for AWS and other cloud platforms. I personally suggest using a combination like you normally would: something like Ansible/Puppet, Lynis, OpenSCAP, etc.

This gets ran to build our base AMI. Highly recommend using this, makes a lot of things easy and is well documented so you can map controls to specific configurations.