In This Guide
- The Shared Responsibility Model: What the Cloud Secures vs What You Secure
- IAM: Identity Is the New Perimeter
- Encryption: At Rest and In Transit
- Network Security: VPCs, Security Groups, NACLs
- Secrets Management: Never Hardcode Credentials
- Logging and Monitoring: You Can't Protect What You Can't See
- The 7 Most Common Cloud Security Mistakes
- Compliance Basics: SOC 2, HIPAA, FedRAMP
- Frequently Asked Questions
Key Takeaways
- Shared responsibility: AWS/Azure/GCP secure the physical infrastructure. You are responsible for everything built on top: IAM configuration, data encryption, network rules, application code, and secrets management.
- Identity is the perimeter: In the cloud, there is no physical network boundary. Every access decision runs through IAM. Misconfigured IAM is the #1 cause of cloud data breaches.
- Principle of least privilege: Every user, service, and application should have only the permissions it needs to do its specific job — nothing more. This single principle prevents most lateral movement in breach scenarios.
- Encrypt everything: Enable encryption at rest for all storage (S3, RDS, EBS). Use HTTPS/TLS for all data in transit. Use AWS KMS or Azure Key Vault to manage encryption keys, not hardcoded strings.
In 2025, the most common cause of cloud data breaches was not sophisticated hacking — it was misconfigured IAM permissions and exposed S3 buckets. Companies spent millions on firewalls and intrusion detection systems while leaving storage buckets publicly readable or giving EC2 instances admin-level permissions they never needed.
Cloud security is not optional and it is not only the security team's job. Every developer who builds in the cloud — writing Lambda functions, deploying containers, provisioning RDS databases — makes security decisions constantly. Most of those decisions happen without a security review, which means the developer is the last line of defense.
This guide covers the concepts every developer needs to make good security decisions in the cloud, without requiring a security engineering background.
The Shared Responsibility Model: What the Cloud Secures vs What You Secure
Every major cloud provider operates on a shared responsibility model: the cloud secures the infrastructure (hardware, facilities, hypervisor, physical network), and the customer secures everything built on top of it (OS configuration, application code, data, network rules, IAM).
What AWS is responsible for:
- Physical security of data centers
- Hardware (servers, storage, networking equipment)
- Managed service infrastructure (the underlying servers running RDS, Lambda, S3)
- Hypervisor isolation between customers
What you are responsible for:
- IAM configuration: who has access to what
- Data encryption: choosing to enable it and managing keys
- Network configuration: security groups, VPC rules, public vs private access
- Operating system patches on EC2 instances you manage
- Application code and its vulnerabilities
- Secrets management: API keys, passwords, certificates
- Compliance: meeting regulatory requirements for your industry
The Mental Model That Matters
Think of the cloud like renting office space. The building owner (AWS) secures the building, the elevators, and the electrical system. You are responsible for locking your office door, controlling who has keys, and not leaving sensitive documents on the lobby coffee table. The building cannot be held responsible if you leave your door open.
IAM: Identity Is the New Perimeter
In traditional networking, security meant building walls (firewalls, VPNs, DMZs) to keep attackers outside your network. In the cloud, those walls do not exist by default — your S3 bucket is reachable from anywhere in the world unless you explicitly restrict it. Identity and Access Management (IAM) is the replacement for the network perimeter.
Every action in AWS — reading an S3 object, launching an EC2 instance, writing to DynamoDB — is an API call that requires authentication (who is making this call?) and authorization (are they allowed to make this call?). IAM is the system that answers both questions.
Key IAM concepts:
- Users: Human identities with long-term credentials (access keys, passwords). Avoid creating users for machine-to-machine access.
- Roles: Assumed identities with temporary credentials. Lambda functions, EC2 instances, and ECS containers should always use roles — never long-term access keys.
- Policies: JSON documents that define what actions are allowed on which resources. Policies are attached to users, groups, or roles.
- Groups: Collections of users that share the same policies. Manage permissions at the group level, not individually.
The three IAM rules that prevent most breaches:
- Never use root account credentials for anything except account setup. The root account has unlimited permissions and cannot be restricted. Enable MFA on root and lock the credentials in a secure vault.
- Follow least privilege for every policy. Start with no permissions and add only what is explicitly needed. Never attach AdministratorAccess to a service role.
- Rotate and audit credentials regularly. Use IAM Access Analyzer to find unused permissions and overly permissive policies. Delete unused users and roles.
Encryption: At Rest and In Transit
Enable encryption at rest for every storage service: S3, RDS, EBS volumes, DynamoDB, and any other data store. Enable HTTPS/TLS for every network connection. These are not optional security enhancements — they are the baseline that every security audit, compliance framework, and enterprise contract requires.
Encryption at rest:
- S3: Enable default encryption on every bucket (SSE-S3 is the minimum; SSE-KMS gives you key control and audit logs). Takes one checkbox in the console.
- RDS: Enable encryption when creating the database instance. You cannot enable encryption on an existing unencrypted RDS instance — you must create a snapshot, encrypt the snapshot, and restore. Do this right the first time.
- EBS volumes: Enable EBS encryption by default in each AWS region. This applies to all new volumes. Existing volumes require snapshot + encrypt + restore.
- DynamoDB: Encrypted by default (AWS-managed keys). For compliance that requires customer-managed keys, enable SSE with KMS.
Encryption in transit:
- Always use HTTPS endpoints. Never serve content over plain HTTP.
- Enable SSL/TLS for all database connections. RDS supports TLS — require it in your connection string.
- Use ACM (AWS Certificate Manager) for free, auto-renewing TLS certificates on CloudFront, API Gateway, and Application Load Balancers.
- For internal service-to-service communication, use VPC endpoints or service mesh (App Mesh) rather than routing through the public internet.
Key management: Use AWS KMS for managing encryption keys. Never hardcode encryption keys in application code or environment variables. KMS integrates directly with S3, RDS, Secrets Manager, and most other AWS services — you reference a key ARN, and KMS handles the encryption/decryption transparently.
Network Security: VPCs, Security Groups, NACLs
All production workloads should run inside a VPC with private subnets for databases and application servers. Security groups control traffic at the instance level. NACLs control traffic at the subnet level. Public subnets should contain only load balancers, bastion hosts, and NAT gateways — not databases or application servers.
VPC architecture basics:
- Public subnets: Have a route to the internet gateway. Place load balancers, NAT gateways, and bastion hosts here.
- Private subnets: No route to the internet gateway. Place EC2 instances, RDS databases, Lambda functions, and containers here. Use a NAT gateway for outbound internet access.
- Multiple AZs: Deploy across at least two availability zones for high availability. All critical resources should exist in 2+ AZs.
Security group rules:
- Security groups are stateful: if you allow inbound traffic, the response is automatically allowed outbound.
- Default deny: security groups deny all traffic by default. You explicitly allow only what is needed.
- Reference security groups, not IP ranges, for internal traffic. Allow the application server's security group to connect to the database's security group on port 5432 — not an IP range that can change.
- Never open port 22 (SSH) or 3389 (RDP) to 0.0.0.0/0 (the entire internet). Use Systems Manager Session Manager for SSH-free instance access.
Secrets Management: Never Hardcode Credentials
API keys, database passwords, OAuth secrets, and encryption keys must never appear in source code, environment variable files committed to git, or application logs. Use AWS Secrets Manager or Parameter Store to store secrets and inject them at runtime.
The most common pattern for exposed credentials in 2026 is still the same as it was in 2016: a developer hardcodes an API key in a config file, commits it to a public GitHub repository, and automated bots find it within minutes and start running up AWS bills or exfiltrating data.
The right way to handle secrets in AWS:
- Store secrets in AWS Secrets Manager (for sensitive credentials that rotate) or SSM Parameter Store (for non-sensitive config and secrets that do not need automatic rotation).
- Give your Lambda function, ECS task, or EC2 instance an IAM role with permission to read the specific secret — nothing else.
- Retrieve the secret at runtime using the AWS SDK:
secretsmanager.get_secret_value(SecretId='my-db-password'). - Never log secret values, even in debug mode.
Enable git-secrets or a pre-commit hook to scan for secrets before they are committed. AWS offers free tools (Secrets Manager rotation, Security Hub findings for exposed credentials) to help detect and respond to accidental exposure.
The 7 Most Common Cloud Security Mistakes
These are the mistakes I see repeatedly in production environments, security audits, and post-breach analyses:
- Public S3 buckets with sensitive data: S3 buckets are private by default, but developers frequently disable Block Public Access to "test something quickly" and forget to re-enable it. Audit all buckets quarterly.
- Over-permissioned IAM roles: Attaching AdministratorAccess to Lambda functions or ECS tasks because it is "easier." Every role should have a specific, minimal policy.
- Hardcoded credentials in code or environment variables: Use Secrets Manager. Always.
- No MFA on admin accounts: Every AWS account with console access should have MFA enabled. Root account MFA is mandatory.
- Unencrypted databases: RDS and DynamoDB encryption are checkbox operations. There is no excuse for unencrypted production databases.
- Security groups open to 0.0.0.0/0: SSH, RDP, and database ports should never be open to the entire internet. Use VPN, bastion hosts, or Session Manager.
- No logging or alerting: CloudTrail, VPC Flow Logs, and GuardDuty are the minimum logging stack. If you are not logging, you cannot detect or investigate incidents.
Compliance Basics: SOC 2, HIPAA, FedRAMP
If you work with enterprise customers, healthcare data, or government contracts, you will encounter compliance requirements. Here is what the major frameworks require from a cloud architecture perspective:
SOC 2: Focuses on security, availability, processing integrity, confidentiality, and privacy. AWS is SOC 2 compliant for its infrastructure. Your application needs: access controls, encryption, audit logging, incident response procedures, and vendor management documentation.
HIPAA: Applies to any application that stores, processes, or transmits Protected Health Information (PHI). AWS services that are HIPAA-eligible are listed in the AWS HIPAA compliance page. You must sign a Business Associate Agreement (BAA) with AWS. Key technical requirements: encryption at rest and in transit, access logging, backup and disaster recovery, and minimum necessary access controls.
FedRAMP: Required for cloud services used by US federal agencies. FedRAMP authorization is a rigorous, expensive process. Unless you are targeting government contracts specifically, you will consume FedRAMP-authorized services (like AWS GovCloud) rather than building your own authorization. AWS GovCloud (US) has FedRAMP High authorization and is the standard cloud for federal workloads.
For most startups and SMBs, the practical compliance checklist is: enable CloudTrail, enable encryption everywhere, configure least-privilege IAM, document your security controls, and get a SOC 2 Type 2 report when enterprise sales require it.
Frequently Asked Questions
What is the most common cause of cloud security breaches?
Misconfigured IAM permissions and public S3 buckets with sensitive data are consistently the top two causes of cloud data breaches. Both are preventable with basic hygiene: follow least privilege for all IAM policies and enable S3 Block Public Access on all buckets unless explicitly required to be public.
Do I need a security certification to work in cloud security?
Not to get started. Understanding the shared responsibility model, IAM, encryption, and network security will take you far as a developer. If you want to specialize in cloud security, AWS Security Specialty and the CompTIA Security+ are the most recognized certifications. CISPs and CEHs are valued at senior levels.
How does encryption at rest work in S3?
When you enable SSE-S3 (server-side encryption with AWS-managed keys), AWS automatically encrypts every object when it is written to S3 and decrypts it when it is read by an authorized caller. This happens transparently — your application reads and writes S3 objects exactly as before. The encryption protects against physical media theft from AWS data centers but does not protect against misconfigured access policies.
What is AWS GuardDuty and should I enable it?
GuardDuty is AWS's managed threat detection service. It analyzes CloudTrail logs, VPC Flow Logs, and DNS logs to detect threats like unusual API calls, compromised credentials, cryptomining, and reconnaissance activity. It costs roughly $0.80 per million events analyzed. For any production account, GuardDuty should be enabled — the cost is trivial compared to the detection value.
Security is not optional. Build it right from the start. Get the skills.
Join professionals from Denver, NYC, Dallas, LA, and Chicago for two days of hands-on AI and tech training. $1,490. October 2026. Seats are limited.
Reserve Your SeatNote: Information in this article reflects the state of the field as of early 2026. Technology evolves rapidly — verify specific version numbers, pricing, and service availability directly with vendors before making decisions.