After completing this tutorial, you will be able to:
Building on the foundational concepts of cloud computing and security introduced in Tutorial 8.2, this tutorial dives into the architectural and control layer of cloud security. While Tutorial 8.2 focused on what the cloud is and who is responsible for what, Tutorial 8.3 addresses the how: the specific security controls, services, and governance mechanisms that organizations must implement to protect their cloud environments.
The architecture of cloud security is not a single product or service; it is a system of interconnected controls that span identity, data, networks, applications, and operations. The shared responsibility model provides the overarching framework, but the details of implementation vary significantly based on the service model (IaaS, PaaS, SaaS, FaaS) and the organization's risk appetite, compliance obligations, and operational maturity.
We begin with an in-depth exploration of the shared responsibility model, clarifying the boundaries between provider and customer for each service type. We then examine the core security controls that every cloud architecture must incorporate: Identity and Access Management (IAM), encryption and key management, network security, and monitoring and logging. These controls are the pillars of cloud security; without them, even the most sophisticated architecture is vulnerable.
We then move to cloud security services—the automation, orchestration, and advanced monitoring capabilities that enable organizations to scale security operations. We examine how Security Orchestration, Automation, and Response (SOAR) platforms and cloud-native services (e.g., AWS GuardDuty, Azure Sentinel) can accelerate detection and response. Finally, we discuss cloud governance: the policies, compliance frameworks, and risk management processes that ensure security controls are consistently applied and continuously improved.
Throughout the tutorial, we integrate real-world case studies—such as the Capital One breach, the Uber breach, and the notorious S3 bucket misconfigurations—to illustrate the consequences of control failures. We also provide worked examples and design patterns to bridge theory and practice.
By the end of this tutorial, you will have the knowledge to design a robust cloud security architecture, select appropriate controls, and implement governance that aligns with industry best practices and regulatory requirements. This tutorial is a critical step toward becoming a cloud security professional capable of securing modern, dynamic cloud environments.
The shared responsibility model is the fundamental security doctrine for cloud computing. It formalizes the division of security responsibilities between the cloud service provider (CSP) and the customer. The model is dynamic: as the abstraction level increases (from IaaS to PaaS to SaaS), the provider assumes more responsibility, and the customer's burden decreases—but so does the customer's control over the environment.
Understanding the model is critical because it prevents assumptions about who is securing what. For example, a common misconception is that "the cloud is secure" meaning the customer doesn't need to do anything. In reality, the provider secures the cloud (infrastructure), but the customer secures their use of the cloud (data, applications, access). Misunderstanding this has led to numerous breaches, as we will see in the case studies.
The following table provides a detailed breakdown for each service model, categorizing responsibilities across key domains:
| Responsibility Domain | IaaS (e.g., EC2) | PaaS (e.g., Elastic Beanstalk) | SaaS (e.g., Salesforce) | FaaS (e.g., Lambda) |
|---|---|---|---|---|
| Physical Infrastructure | Provider | Provider | Provider | Provider |
| Hypervisor / Virtualization | Provider | Provider | Provider | Provider |
| Network Infrastructure (core) | Provider | Provider | Provider | Provider |
| Operating System | Customer | Provider | Provider | Provider |
| Runtime / Middleware | Customer | Provider | Provider | Provider |
| Application Code | Customer | Customer | Provider | Customer |
| Data (customer data) | Customer | Customer | Customer (classification, access) | Customer |
| IAM for customer resources | Customer | Customer | Customer (user management) | Customer |
| Network security (VPC, SG, NACL) | Customer | Partial (some config) | Provider | Customer (VPC config) |
| Encryption (data at rest/in transit) | Customer | Customer (config) | Provider & Customer | Customer |
| Logging & monitoring (application) | Customer | Customer | Provider (some logs) | Customer |
This table highlights that the customer retains responsibility for data, access management, and application-layer security across all models. The provider's responsibility grows from infrastructure to the runtime and even application code in SaaS.
The shared responsibility model assumes that the provider's security controls are robust and that the customer understands and implements their responsibilities. However, there are limitations:
Cloud security controls are the mechanisms that enforce security objectives. They are typically categorized into preventive, detective, and corrective controls. In this section, we cover the four foundational control domains: IAM, encryption, network security, and monitoring/logging.
IAM is the control plane for all cloud resources. It governs who can access what under what conditions. In the cloud, IAM is more critical than ever because the perimeter is dissolved. IAM encompasses:
A robust IAM architecture includes a central identity provider (e.g., Azure AD, Okta) that federates with cloud providers. Users authenticate via SSO with MFA; conditional access policies require compliant devices. IAM roles are assigned to EC2 instances and Lambda functions via instance profiles or execution roles. Service control policies at the organizational unit level enforce guardrails.
Encryption is the cornerstone of data protection. In the cloud, encryption must be applied to data at rest, data in transit, and increasingly, data in use (via confidential computing). Key management is equally critical—keys must be securely generated, stored, rotated, and revoked.
Limitation: Encryption at rest does not protect against attacks that access data via legitimate means (e.g., compromised IAM credentials). Encryption must be combined with robust IAM and monitoring.
Cloud network security involves securing traffic between and within cloud environments. Key controls:
Monitoring and logging provide visibility into cloud operations and security events. A comprehensive strategy includes:
Limitations: Logging can generate high costs; data retention and search capabilities must be balanced. SIEM integration requires skill and ongoing tuning.
Security Orchestration, Automation, and Response (SOAR) platforms enable security teams to automate repetitive tasks, orchestrate workflows, and accelerate incident response. In the cloud, SOAR integrates with cloud-native security services (e.g., GuardDuty, Security Hub) and ticketing systems.
Cloud providers offer a suite of security monitoring services:
These services provide continuous monitoring, threat intelligence, and vulnerability management with minimal configuration. They are essential for modern cloud security operations.
Many organizations leverage third-party SECaaS offerings (e.g., CrowdStrike, Zscaler, Palo Alto Prisma Cloud) to augment or replace native controls. These provide advanced threat detection, web filtering, and cloud security posture management (CSPM). The key is integration with cloud APIs for seamless operation.
Compliance is a shared responsibility. Cloud providers obtain certifications (SOC 2, ISO 27001, HIPAA, PCI DSS) to demonstrate their compliance, but customers must ensure their configuration and data handling meet requirements. Key practices:
Policies define expected security configurations and behaviors. They can be enforced at multiple levels:
Cloud risk management involves identifying, assessing, and mitigating risks specific to cloud environments. Key steps:
Governance in the cloud is challenging due to the dynamic nature of resources. Policies must be continuously updated; automation is critical. Moreover, governance is only effective if combined with a culture of security awareness and accountability.
Answer the following questions to test your understanding. Click each "Answer" summary to reveal the solution.
b) Operating system patching and d) Network security group configuration. Hypervisor patching (a) and physical security (c) are the provider's responsibility.
The principle of least privilege means granting only the minimum permissions required to perform a task. It is critical because it limits the blast radius of a compromised identity and reduces the risk of accidental or malicious misuse of privileges.
Server-side encryption is performed by the cloud provider before storing data; the customer may use provider-managed or customer-managed keys. Client-side encryption is performed by the customer before data is sent to the cloud; the provider never sees plaintext. Client-side encryption gives the customer full control and is stronger from a confidentiality perspective, but key management is entirely the customer's responsibility.
A WAF protects web applications from common exploits such as SQL injection, cross-site scripting, and other OWASP Top 10 vulnerabilities. It filters, monitors, and blocks HTTP/HTTPS traffic to and from web applications.
1. Cloud-native logs: API activity logs (CloudTrail), resource logs (CloudWatch), and
network flow logs (VPC Flow Logs).
2. SIEM integration: Ingest logs into a SIEM for correlation, alerting, and incident
response.
3. Anomaly detection: Use cloud-native or third-party tools to detect unusual
activities (e.g., GuardDuty, Azure Defender).
SCPs are policies that set permission guardrails at the organization or organizational unit level. They limit the maximum permissions that can be granted by IAM policies within accounts, ensuring that even if an IAM policy allows broad permissions, the SCP can restrict them. They are an essential tool for multi-account governance.
A Security Group is a stateful firewall that operates at the instance level (ENI). It supports only allow rules. A Network ACL is a stateless firewall that operates at the subnet level and supports both allow and deny rules. Security groups are evaluated before NACLs for inbound traffic.
The cloud provider is responsible for patching the operating system and underlying platform in a PaaS environment. The customer is responsible only for their application code and data.
AWS CloudTrail records all API activity in an AWS account, including calls made via the console, SDK, CLI, and other services. It provides a complete audit trail of who did what, when, and from which IP address. It is essential for security auditing, compliance, and incident investigation.
Crypto agility is the ability to quickly change cryptographic algorithms, keys, and protocols without significant disruption. In cloud key management, this means using a KMS that supports multiple key types and algorithms, and designing applications to accept new keys and algorithms via configuration, enabling a smooth transition to post-quantum cryptography or new standards.
Encryption at rest does not protect against attacks that access data through legitimate means, such as compromised IAM credentials or application vulnerabilities. It also does not prevent data exfiltration if the attacker has valid access. Therefore, encryption must be combined with strong IAM, monitoring, and application security.
IAM roles provide temporary credentials that are automatically rotated by the STS service. This eliminates the risk of storing long-term static credentials in code or configuration files, reducing the risk of credential compromise. Roles also simplify permission management because they can be attached to resources (e.g., EC2 instances) and updated centrally.
These practical exercises will help you apply the concepts. Suggested solutions are hidden beneath each exercise.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:GetObject"
],
"Resource": "arn:aws:s3:::my-app-bucket/*"
},
{
"Effect": "Allow",
"Action": [
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"Resource": "arn:aws:logs:us-east-1:123456789012:log-group:/my-app/*"
},
{
"Effect": "Allow",
"Action": [
"lambda:InvokeFunction"
],
"Resource": "arn:aws:lambda:us-east-1:123456789012:function:my-function"
}
]
}
Note: The policy includes only the specific actions and resources needed, following least privilege. Additional conditions (e.g., IP restrictions) could be added.
Web Tier SG:
Inbound: HTTP (80) and HTTPS (443) from 0.0.0.0/0 (or restricted CIDR).
Outbound: Allow all to internet (for updates) and to app-tier SG on application port (e.g., 8080).
App Tier SG:
Inbound: Allow from web-tier SG on application port (e.g., 8080).
Outbound: Allow to database-tier SG on database port (e.g., 3306).
Database Tier SG:
Inbound: Allow from app-tier SG on database port (e.g., 3306).
Outbound: Allow only essential (e.g., to VPC endpoints).
NACLs (stateless):
Public subnet NACL: allow inbound 80/443, allow outbound ephemeral ports and responses.
Private subnet NACL: allow inbound from web-tier subnet, allow outbound to internet (for updates)
and to database subnet.
Strategy:
1. Use server-side encryption with customer-managed keys (SSE-KMS) using AWS KMS.
2. Create a dedicated KMS key for the bucket, with key policy that restricts key usage to specific
IAM roles and limits deletion.
3. Enable automatic key rotation annually (AWS KMS supports automatic rotation).
4. Use bucket policies to enforce encryption (e.g., deny PutObject if encryption not specified).
5. Implement client-side encryption for highly sensitive fields, using a separate key.
6. Enable S3 Object Lock to prevent deletion and support immutable audit trails.
7. Audit key usage via CloudTrail and KMS logs.
Log sources: CloudTrail (API), CloudWatch (metrics/logs), VPC Flow Logs,
GuardDuty findings, WAF logs, application logs.
Alerting thresholds: GuardDuty findings (high severity), failed logins (5+ per
minute), unusual API calls (e.g., DeleteTrail), excessive data transfer.
Escalation: Tier 1 analyst validates alert; if confirmed, escalate to Tier 2/3
and incident commander. Notify CISO and legal as appropriate.
Playbook for credential compromise:
1. Receive alert (e.g., GuardDuty: UnauthorizedAccess:IAMUser/InstanceCredentialExfiltration).
2. Validate: check CloudTrail for the related API calls; identify affected IAM role/user.
3. Contain: revoke the compromised credentials; rotate the affected IAM key; isolate the instance
(if EC2).
4. Investigate: determine what data was accessed; scope the breach.
5. Remediate: patch vulnerabilities; update IAM policies; enhance monitoring.
6. Document and report.
Cloud Governance Policy:
1. Tagging: All resources must be tagged with "CostCenter", "Environment", "Owner",
and "Compliance". Resources without required tags will be flagged and automatically remediated
via AWS Config.
2. Encryption: All storage services (S3, EBS, RDS) must have encryption enabled
using AWS KMS with customer-managed keys. Encryption in transit is required for all APIs and data
transfers using TLS 1.2 or higher.
3. IAM: MFA must be enabled for all IAM users. Use IAM roles for EC2 instances
and Lambda functions. Review IAM policies quarterly; remove unused roles and keys.
4. Compliance Monitoring: AWS Config rules will enforce compliance: e.g.,
"s3-bucket-public-read-prohibited", "ec2-encrypted-volumes", "iam-password-policy". Non-compliant
resources will be flagged and automatically remediated via SSM Automation.
These assignments require research, analysis, and synthesis. Use external resources to support your responses.
A strong answer would:
– Choose AWS with EC2 (IaaS), Elastic Beanstalk (PaaS), S3 or WorkDocs (SaaS), and Lambda (FaaS).
– For each, list provider and customer responsibilities based on official documentation.
– Identify gray areas: e.g., in EC2, who is responsible for patching the AMI's base OS? (Provider
provides patches, but customer must apply them).
– Provide recommendations: e.g., use AWS Systems Manager for patching; enable CloudTrail for
auditing; use AWS Config for compliance.
A strong answer would outline:
– Organization structure: root, OU for production, OU for development, OU for sandbox.
– SCPs: restrict regions, restrict resource types, enforce encryption.
– IAM roles: centralize identity via AWS SSO with Azure AD federation; assign roles based on
job function.
– Automation: use AWS Config rules to detect unused IAM users, roles, and keys; use AWS IAM
Access Analyzer to identify overly permissive policies; use CI/CD to deploy IAM policies as
code (Terraform).
– Monitoring: CloudTrail for all accounts, send logs to central S3 bucket and SIEM.
A strong response would cover:
– Use AWS KMS with Customer-Managed Keys (CMK) and CloudHSM for FIPS 140-2 Level 3 validation.
– Key lifecycle: create keys with key policies that restrict usage to specific roles and conditions;
enable automatic rotation annually; set deletion window (e.g., 30 days).
– For PCI DSS, ensure key management processes align with requirements (e.g., dual control, split
knowledge).
– In case of key compromise, immediately revoke the key, rotate all data encrypted with that key
(using re-encrypt), and audit access logs to determine scope. Plan for a controlled key
revocation process.
A robust design would include:
– IAM: Use IAM roles for ECS tasks; fine-grained permissions; MFA for admins.
– Network: Private subnets for containers; VPC endpoints for AWS services;
WAF in front of API Gateway.
– Encryption: KMS for EBS volumes, S3 server-side encryption, RDS encryption;
TLS for all external traffic.
– Monitoring: CloudTrail, CloudWatch, GuardDuty; integrate with SIEM.
– Incident response: Automated playbooks for common scenarios; use AWS
Systems Manager for remote remediation; maintain immutable backups.
– Justify each control based on threats (e.g., data breach, account compromise).
For example, on Capital One:
– Timeline: SSRF via misconfigured WAF allowed credential exposure; attacker accessed S3 bucket.
– Root cause: IAM role overly permissive, WAF misconfiguration, lack of monitoring for anomalous
S3 access.
– Shared responsibility: customer (Capital One) was responsible for WAF configuration and IAM
roles; provider (AWS) provided the infrastructure.
– Recommendations: implement strict IAM least privilege, use S3 access logging and GuardDuty,
regular security assessments, implement CSPM tools, and automate incident response.
Tutorial 8.3 has provided a comprehensive exploration of cloud security architecture and controls. We began with the shared responsibility model, detailing the division of duties between providers and customers across IaaS, PaaS, SaaS, and FaaS. We emphasized that while the provider secures the infrastructure, customers must actively secure their data, applications, and access—a distinction that is often misunderstood and leads to breaches.
We then delved into the four foundational security control domains: Identity and Access Management (IAM), which is the control plane for all permissions and requires strict enforcement of least privilege and MFA; encryption and key management, which protects data at rest and in transit, with a focus on customer-managed keys and crypto agility; network security, encompassing VPCs, security groups, NACLs, and WAFs; and monitoring and logging, which provides visibility and enables threat detection through cloud-native tools and SIEM integration.
We examined cloud security services—automation, orchestration, and advanced threat detection—that enable organizations to scale security operations. We also covered cloud governance, including compliance, policy management, and risk management, emphasizing that governance must be automated and continuously enforced to keep pace with dynamic cloud environments.
Real-world case studies (Uber, Capital One) illustrated the consequences of control failures, reinforcing the importance of a holistic, well-designed security architecture. The exercises and homework provided opportunities to apply these concepts in practical scenarios, from writing IAM policies to designing VPCs and governance frameworks.
This tutorial is the second of three on cloud security. In Tutorial 8.4, we will turn our attention to cloud threats, risks, and incident response, building on the control foundations laid here. The knowledge gained in this tutorial is essential for any cybersecurity professional working with cloud technologies, as it forms the basis for securing modern, cloud-native applications and services.