AWS Builder Center

AWS Security Fundamentals

Security on AWS starts with understanding who is responsible for what. Most real-world cloud breaches come from misconfiguration, not from flaws in AWS itself, so knowing the basics goes a long way.

The shared responsibility model

AWS is responsible for the security of the cloud: the physical data centers, hardware, and the foundational software that runs the services. You are responsible for security in the cloud: your data, your access controls, your network configuration, and your application code. The exact split varies by service. With EC2, you patch the operating system. With a managed service such as S3 or DynamoDB, AWS handles that layer, but you still decide who can access your data.

IAM: the heart of AWS security

AWS Identity and Access Management (IAM) defines who can do what. The key concepts are:
  • Users represent individual people or applications.
  • Groups bundle users so you can manage permissions together.
  • Roles provide temporary credentials that services or users can assume, which is safer than long-lived access keys.
  • Policies are documents that allow or deny specific actions on specific resources.
The guiding principle is least privilege: grant only the permissions a person or service actually needs, and nothing more. A Lambda function that reads one S3 bucket should not have access to every bucket in the account.

Protect the root account

The root user has unrestricted power over the account. Enable MFA on it, avoid creating access keys for it, and keep its credentials locked away. Do daily work with IAM roles or users that have limited permissions.

Common mistakes to avoid

  • Leaving S3 buckets publicly accessible by accident. Keep S3 Block Public Access turned on unless you truly need a public bucket.
  • Committing access keys to a code repository. Use IAM roles and secret-management tools instead.
  • Opening security groups to the whole internet on sensitive ports such as SSH (22) or database ports.
  • Using one overly powerful role for everything.

Encryption, monitoring, and detection

Use AWS KMS to manage encryption keys and enable encryption at rest for storage and databases. Use HTTPS for data in transit. Turn on AWS CloudTrail to record API activity in your account, and use Amazon GuardDuty to flag suspicious behavior. AWS Config can check whether your resources follow your rules over time.

A starter checklist

Enable MFA everywhere, apply least privilege, block public S3 access by default, encrypt data, log activity with CloudTrail, and review permissions regularly. None of these steps is complicated, but together they prevent the majority of common incidents.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article