• AWS
  • Cloud Engineering
  • Infrastructure

AWS Security Baseline: What Every Team Should Have in Place

Most AWS security incidents are not sophisticated attacks. They are the predictable consequence of a small number of missing controls — controls that AWS documents, that are straightforward to implement, and that most teams intend to add but never quite get to. The compromised access key in a public repository. The database accessible from the internet. The account with no audit trail. These are not novel failure modes, and they are largely preventable.

What follows is the baseline we verify on every AWS engagement. It is not a comprehensive security programme — it is the minimum that should be in place before a system handles real users and real data.

Identity and access

Root account: the AWS root account should have MFA enabled and no access keys attached. It should almost never be used. Create an EventBridge rule that triggers on any root account activity in CloudTrail and sends an alert — this gives you an immediate signal if the root account is used, whether legitimately or not.

Human access: IAM users should be the exception, not the rule, for human access to AWS. Use IAM Identity Center (formerly AWS SSO) to federate human access through your identity provider. Users get temporary credentials scoped to specific accounts and roles, with no long-lived keys to rotate, leak, or forget. In our experience, teams that are still issuing IAM users with permanent access keys are maintaining a credential hygiene problem they do not fully appreciate.

Least privilege: audit all IAM roles and policies using IAM Access Analyzer. Any policy with "Action": "*" or "Resource": "*" is worth reviewing — wildcards are sometimes necessary but should be the exception and should be documented. The most common finding is roles created with broad permissions during development that were never narrowed before production.

Service credentials: applications running on EC2, ECS, or Lambda should access AWS services via instance profiles and task roles, not access keys injected as environment variables. Environment variables leak — into logs, crash reports, and process listings. IAM roles do not.

Network

Default VPC: do not use the default VPC for production workloads. It exists for convenience and its default configuration is too permissive. Production environments should live in a purpose-built VPC with explicit subnet design, routing, and security group rules.

Security groups: audit inbound rules for 0.0.0.0/0 on any port other than 80 and 443. SSH (22) and RDP (3389) open to the world are the most common finding and the most exploited. Use AWS Systems Manager Session Manager for instance access instead of SSH — it requires no open ports and leaves a complete audit trail.

RDS publicly accessible: database instances should almost never have PubliclyAccessible: true. Database access should come from within the VPC, from specific security groups belonging to the application tier. Direct database access over the internet is a significant risk that is trivially avoided.

Logging and audit trail

CloudTrail: enable CloudTrail in all regions with log file validation turned on. Send logs to an S3 bucket in a separate AWS account — this ensures that if the primary account is compromised, the attacker cannot delete the audit trail. Without CloudTrail, a post-incident investigation starts from almost nothing.

VPC Flow Logs: enable flow logs on all production VPCs. They capture metadata about network traffic (source, destination, port, bytes, accept/reject) without capturing packet contents. They are essential for diagnosing unusual network behaviour and for confirming the blast radius of a security incident.

GuardDuty: enable it. It is priced per GB of data analysed and costs almost nothing for most accounts. It analyses CloudTrail, VPC Flow Logs, and DNS logs automatically, and flags credential misuse, unusual API call patterns, communication with known malicious IPs, and cryptocurrency mining behaviour. The signal-to-noise ratio is better than most teams expect. There is no good reason not to have it on.

Secrets management

No secrets in environment variables or source code: use AWS Secrets Manager for database credentials, API keys, and other secrets. Use SSM Parameter Store with SecureString for configuration values that are sensitive but do not require rotation. Environment variables in task definitions and Lambda functions are visible to anyone with access to the AWS console — they are not secure storage.

Rotation: Secrets Manager supports automatic rotation for RDS credentials with a built-in Lambda rotation function. Enable it. A credential that rotates automatically cannot be indefinitely exploited after a leak.

CI/CD credentials: if you are using GitHub Actions, use OIDC federation to obtain temporary AWS credentials rather than storing long-lived access keys as GitHub secrets. The setup takes about 30 minutes and eliminates an entire category of credential management problem.

S3

Block Public Access: enable the Block Public Access setting at the account level. This prevents any bucket or object from being made public, regardless of bucket policy. Individual exceptions — for genuinely public static assets — should be explicit and documented. The default should be private.

Bucket policies: audit all bucket policies for statements with "Principal": "*". These grant access to any AWS principal or unauthenticated public user, depending on the action. Most should not exist.

Encryption: S3 server-side encryption is now on by default for new buckets. For sensitive data, SSE-KMS with a customer-managed key gives you control over the encryption key and an audit trail of every decryption operation via CloudTrail.

The one-hour audit

Two AWS-native tools surface most of the above gaps automatically: AWS Trusted Advisor (Security pillar, available on Business and Enterprise support plans) and AWS Security Hub with the CIS AWS Foundations Benchmark enabled. Run both. Work through the high-severity findings before anything else.

None of these controls are exotic. They are the baseline that AWS itself recommends and that any team should have in place before going to production. In our experience, most teams have most of them — but the gaps are consistent and the gaps are where incidents happen. A one-day security review against this baseline is one of the highest-leverage investments an engineering team can make before scaling.

Cloudomation helps engineering teams adopt AI development tools with the discipline and guardrails to make the results sustainable.

Book a free Assessment →