Securing MariaDB and Building a Minimal EC2 Read-Only IAM Policy on AWS
A hands-on DevOps exercise covered two security tasks: hardening a fresh MariaDB installation and creating a least-privilege IAM policy for AWS EC2 read access. Running mysql_secure_installation after installing MariaDB removes insecure defaults such as an empty root password, anonymous users, and remote root login that ship enabled out of the box. On the database side, user grants must specify both a username and a host, meaning localhost and wildcard host permissions are treated as entirely separate identities. For the AWS task, a read-only EC2 IAM policy requires more than just ec2:Describe permissions, since the EC2 console also pulls data from Elastic Load Balancing, Auto Scaling, and CloudWatch, each needing its own describe actions. Both tasks reflect the same security principle: start from a closed state and deliberately open only what is needed, rather than starting open and attempting to lock things down later.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in