CrackedRuby CrackedRuby

Overview

Cloud security encompasses the policies, technologies, and controls that protect data, applications, and infrastructure in cloud computing environments. Unlike traditional on-premises security where organizations control the entire stack, cloud security operates under a shared responsibility model where the cloud provider secures the infrastructure while customers secure their data and applications.

The fundamental shift to cloud computing introduces distinct security challenges. Resources exist outside traditional network perimeters, data moves across provider networks, and infrastructure changes dynamically through APIs. Cloud environments expose services to the internet by default, handle multi-tenant infrastructure, and distribute data across geographic regions.

Three major cloud providers dominate the market: Amazon Web Services (AWS), Microsoft Azure, and Google Cloud Platform (GCP). Each implements security differently, though common principles apply across platforms. AWS uses Identity and Access Management (IAM) for permissions, Azure relies on Azure Active Directory, and GCP employs Cloud IAM. Understanding these platform-specific implementations matters when securing cloud resources.

The shared responsibility model defines security boundaries clearly. Cloud providers secure the physical infrastructure, networking hardware, and virtualization layer. Customers secure operating systems, applications, data, and access controls. For managed services, the provider assumes more responsibility. For Infrastructure as a Service (IaaS), customers handle most security tasks. This division requires clear understanding to avoid security gaps.

# AWS SDK configuration with security credentials
require 'aws-sdk-s3'

# Using environment variables for credentials (secure approach)
s3_client = Aws::S3::Client.new(
  region: 'us-east-1',
  credentials: Aws::Credentials.new(
    ENV['AWS_ACCESS_KEY_ID'],
    ENV['AWS_SECRET_ACCESS_KEY']
  )
)

# Checking bucket encryption settings
response = s3_client.get_bucket_encryption(bucket: 'secure-data-bucket')
puts response.server_side_encryption_configuration

Cloud security requires continuous monitoring because infrastructure changes constantly. Manual security reviews cannot keep pace with automated deployments. Security must integrate into development workflows through Infrastructure as Code and automated compliance checking.

Key Principles

Identity and Access Management forms the foundation of cloud security. Every action in cloud environments requires authentication and authorization. IAM controls who can access resources and what actions they can perform. Cloud platforms implement IAM through users, groups, roles, and policies. Users represent individual identities, groups collect users with similar permissions, roles provide temporary credentials for services, and policies define specific permissions.

The principle of least privilege applies strictly in cloud environments. Grant only the minimum permissions required for tasks. Avoid wildcard permissions that allow any action on any resource. Instead, specify exact resources and actions. Review permissions regularly as requirements change. Unused permissions create security risks without providing value.

Encryption protects data both at rest and in transit. Encryption at rest secures stored data on disks, databases, and object storage. Encryption in transit protects data moving between services or to clients. Cloud providers offer encryption by default for many services, but configuration remains the customer's responsibility. Key management determines who can decrypt data. Cloud providers offer key management services, but customers can manage keys separately for additional control.

Network security controls traffic flow between resources and the internet. Traditional firewalls inspected traffic at network perimeters. Cloud networks require distributed security controls. Security groups act as virtual firewalls for instances, controlling inbound and outbound traffic. Network access control lists (NACLs) provide subnet-level filtering. Private networks isolate resources from public internet access entirely.

Logging and monitoring detect security incidents and provide audit trails. Cloud platforms generate logs for API calls, resource access, and configuration changes. Centralized log aggregation enables analysis across services. Real-time monitoring alerts on suspicious activity. Log retention meets compliance requirements and supports forensic investigation.

Compliance frameworks define security requirements for regulated industries. Cloud providers obtain certifications for standards like SOC 2, ISO 27001, and PCI DSS. These certifications cover provider infrastructure but not customer configurations. Customers must configure services correctly to maintain compliance. Automated compliance checking verifies configurations against required standards.

Resource isolation prevents unauthorized access between tenants and between environments. Separate AWS accounts or GCP projects for development, staging, and production. This isolation limits blast radius when security incidents occur. Service accounts and roles prevent applications from sharing credentials.

Security Implications

Public cloud infrastructure introduces attack surfaces that differ from traditional data centers. APIs become primary attack vectors because all cloud operations occur through API calls. Attackers who compromise API credentials gain the same access as legitimate users. Unlike physical access controls in data centers, cloud access depends entirely on credential security.

Misconfigurations cause the majority of cloud security breaches. Default settings often prioritize ease of use over security. S3 buckets default to private, but incorrect permissions can expose them publicly. Security groups might allow unrestricted inbound access during development and remain misconfigured in production. IAM policies with overly broad permissions grant unnecessary access.

Data exposure risks increase when organizations move to cloud storage. Object storage like S3 stores data accessible via HTTP URLs. If bucket policies grant public read access, anyone with the URL can retrieve data. Unlike file systems with hierarchical permissions, object storage applies permissions at the bucket or object level. Understanding this model prevents accidental exposure.

Insider threats persist in cloud environments but manifest differently. Employees with administrative access can create resources, modify security settings, or exfiltrate data. Cloud provider employees cannot access customer data due to architectural controls, but customer employees with valid credentials pose risks. Audit logging tracks all actions, but detecting malicious activity requires analysis.

Credential compromise represents the most critical security risk. Hardcoded credentials in source code, committed to version control, leak through public repositories. Long-lived access keys stored on developer machines get stolen through malware. Service account keys with excessive permissions enable lateral movement. Stolen credentials grant immediate access without triggering authentication alerts.

API security requires different approaches than traditional application security. Rate limiting prevents abuse, but cloud APIs already implement this. Authentication happens through signing requests with secret keys rather than session cookies. Request authorization occurs server-side based on IAM policies. API versioning ensures backward compatibility, but old versions might contain vulnerabilities.

# Detecting overly permissive IAM policies
require 'aws-sdk-iam'

iam_client = Aws::IAM::Client.new

# List all policies and check for dangerous wildcards
policies = iam_client.list_policies(scope: 'Local').policies

policies.each do |policy|
  policy_version = iam_client.get_policy_version(
    policy_arn: policy.arn,
    version_id: policy.default_version_id
  )
  
  document = JSON.parse(URI.decode_www_form_component(
    policy_version.policy_version.document
  ))
  
  document['Statement'].each do |statement|
    if statement['Effect'] == 'Allow' && 
       statement['Action'] == '*' && 
       statement['Resource'] == '*'
      puts "WARNING: Policy #{policy.policy_name} grants full access"
    end
  end
end

Multi-cloud environments compound security complexity. Each provider implements security differently. IAM policies written for AWS do not transfer to GCP. Network security controls require separate configuration per provider. Centralized security monitoring must integrate multiple provider APIs. Security teams need expertise across platforms.

Ruby Implementation

The AWS SDK for Ruby provides comprehensive access to AWS security services. Installing the SDK requires adding the gem to the application's dependencies. Individual service gems can be installed separately to reduce dependencies.

# Gemfile
gem 'aws-sdk-s3'
gem 'aws-sdk-kms'
gem 'aws-sdk-iam'
gem 'aws-sdk-cloudtrail'

# Bundle install to fetch dependencies

IAM operations through Ruby enable programmatic access control management. Creating IAM users, attaching policies, and managing access keys all occur through API calls. Production systems should minimize direct IAM user creation, preferring roles for services.

require 'aws-sdk-iam'

iam = Aws::IAM::Client.new

# Create a restricted IAM policy for S3 read-only access
policy_document = {
  Version: '2012-10-17',
  Statement: [{
    Effect: 'Allow',
    Action: [
      's3:GetObject',
      's3:ListBucket'
    ],
    Resource: [
      'arn:aws:s3:::specific-bucket',
      'arn:aws:s3:::specific-bucket/*'
    ]
  }]
}.to_json

response = iam.create_policy(
  policy_name: 'S3ReadOnlySpecificBucket',
  policy_document: policy_document,
  description: 'Read-only access to specific S3 bucket'
)

puts "Created policy: #{response.policy.arn}"

Key Management Service (KMS) integration protects sensitive data through encryption. KMS manages encryption keys separately from data, providing an additional security layer. Applications encrypt data before storage and decrypt on retrieval.

require 'aws-sdk-kms'
require 'aws-sdk-s3'

kms_client = Aws::KMS::Client.new
s3_client = Aws::S3::Client.new

# Encrypt data using KMS before S3 upload
def encrypt_and_upload(data, bucket, key, kms_key_id)
  # Encrypt data using KMS
  encrypted_response = kms_client.encrypt(
    key_id: kms_key_id,
    plaintext: data
  )
  
  # Upload encrypted data to S3
  s3_client.put_object(
    bucket: bucket,
    key: key,
    body: encrypted_response.ciphertext_blob,
    metadata: {
      'kms-key-id' => kms_key_id
    }
  )
end

# Decrypt data after S3 download
def download_and_decrypt(bucket, key)
  # Download encrypted data
  response = s3_client.get_object(bucket: bucket, key: key)
  encrypted_data = response.body.read
  
  # Decrypt using KMS (automatically determines correct key)
  decrypted_response = kms_client.decrypt(
    ciphertext_blob: encrypted_data
  )
  
  decrypted_response.plaintext
end

Server-side encryption for S3 occurs transparently when properly configured. S3 encrypts objects during upload and decrypts during download. Three encryption options exist: S3-managed keys (SSE-S3), KMS-managed keys (SSE-KMS), and customer-provided keys (SSE-C).

# Enforce encryption at upload time
s3_client.put_object(
  bucket: 'secure-bucket',
  key: 'sensitive-data.txt',
  body: 'confidential information',
  server_side_encryption: 'AES256'  # SSE-S3
)

# Using KMS encryption
s3_client.put_object(
  bucket: 'secure-bucket',
  key: 'highly-sensitive.txt',
  body: 'top secret data',
  server_side_encryption: 'aws:kms',
  ssekms_key_id: 'arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012'
)

# Verify encryption on existing objects
response = s3_client.head_object(
  bucket: 'secure-bucket',
  key: 'sensitive-data.txt'
)

puts "Encryption: #{response.server_side_encryption}"

Google Cloud Ruby client libraries follow similar patterns with platform-specific implementations. Authentication uses service account JSON keys or Application Default Credentials.

require 'google/cloud/storage'

# Initialize with service account
storage = Google::Cloud::Storage.new(
  project_id: 'my-project',
  credentials: 'path/to/service-account.json'
)

bucket = storage.bucket 'secure-bucket'

# Upload with encryption
file = bucket.create_file(
  'local-file.txt',
  'encrypted-file.txt',
  encryption_key: encryption_key
)

# List files with decryption key
bucket.files(encryption_key: encryption_key).each do |file|
  puts file.name
end

CloudTrail logging captures all AWS API calls for security auditing. Ruby applications can query CloudTrail logs to track resource access and detect suspicious activity.

require 'aws-sdk-cloudtrail'

cloudtrail = Aws::CloudTrail::Client.new

# Query recent API events
response = cloudtrail.lookup_events(
  lookup_attributes: [{
    attribute_key: 'EventName',
    attribute_value: 'DeleteBucket'
  }],
  start_time: Time.now - 86400,  # Last 24 hours
  max_results: 50
)

response.events.each do |event|
  puts "User: #{event.username}"
  puts "Time: #{event.event_time}"
  puts "Event: #{event.event_name}"
  puts "Resources: #{event.resources}"
  puts "---"
end

Implementation Approaches

Zero Trust architecture assumes no implicit trust based on network location. Traditional perimeter-based security trusted internal networks. Zero Trust verifies every request regardless of origin. Implementation requires strong identity verification, device compliance checking, and continuous authorization validation.

Every service request must authenticate using valid credentials. Network location provides no automatic authorization. Services behind private networks still require authentication. This approach prevents lateral movement after initial compromise. Implementation complexity increases but security improves significantly.

# Zero Trust API authentication middleware
class ZeroTrustAuth
  def initialize(app)
    @app = app
  end
  
  def call(env)
    request = Rack::Request.new(env)
    
    # Verify JWT token
    token = extract_token(request)
    return unauthorized unless token
    
    # Validate token signature
    payload = verify_token(token)
    return unauthorized unless payload
    
    # Check service permissions
    return forbidden unless authorized?(payload, request.path)
    
    # Verify device compliance
    return forbidden unless device_compliant?(payload['device_id'])
    
    # Add user context to request
    env['user'] = payload
    @app.call(env)
  end
  
  private
  
  def verify_token(token)
    JWT.decode(token, public_key, true, algorithm: 'RS256')[0]
  rescue JWT::DecodeError
    nil
  end
  
  def authorized?(payload, path)
    # Check user permissions against requested resource
    permissions = fetch_user_permissions(payload['user_id'])
    permissions.include?(path)
  end
  
  def device_compliant?(device_id)
    # Verify device meets security requirements
    device = fetch_device_status(device_id)
    device['encrypted'] && device['updated'] && !device['jailbroken']
  end
end

Defense in depth layers multiple security controls to protect resources. Single security control failure should not compromise the system. Combine network isolation, authentication, authorization, encryption, and monitoring. Each layer provides independent protection.

Network security groups restrict traffic at the instance level. NACLs add subnet-level filtering. Web application firewalls inspect HTTP traffic. All three layers work together, each catching different attack types.

Least privilege access limits permissions to exactly what each identity requires. Start with no permissions and add specific grants. Review permissions quarterly to remove unused access. Temporary credentials expire automatically, reducing long-term exposure risk.

# Generate temporary credentials with limited scope
require 'aws-sdk-sts'

sts = Aws::STS::Client.new

# Assume role with specific permissions
response = sts.assume_role(
  role_arn: 'arn:aws:iam::123456789012:role/TemporaryS3Access',
  role_session_name: "session-#{Time.now.to_i}",
  duration_seconds: 3600,  # 1 hour
  policy: {
    Version: '2012-10-17',
    Statement: [{
      Effect: 'Allow',
      Action: ['s3:GetObject'],
      Resource: 'arn:aws:s3:::specific-bucket/specific-path/*'
    }]
  }.to_json
)

# Use temporary credentials
temp_credentials = Aws::Credentials.new(
  response.credentials.access_key_id,
  response.credentials.secret_access_key,
  response.credentials.session_token
)

s3 = Aws::S3::Client.new(credentials: temp_credentials)

Infrastructure as Code applies security controls consistently across environments. Terraform, CloudFormation, or Pulumi define security settings in version-controlled files. Manual configuration drifts over time. IaC ensures production matches tested configurations.

Security policies encoded in IaC undergo code review before deployment. Automated testing validates security requirements. Configuration changes create audit trails through version control commits. Rollback capabilities restore previous secure configurations quickly.

Multi-cloud security strategies unify controls across providers. Centralized identity management federates authentication to multiple clouds. Common logging aggregation collects security events from all platforms. Unified policy enforcement applies consistent rules regardless of provider.

# Abstract cloud provider interface for consistent security
class CloudSecurityManager
  def initialize(provider)
    @provider = provider
  end
  
  def enable_encryption(resource_id, encryption_config)
    case @provider
    when :aws
      enable_aws_encryption(resource_id, encryption_config)
    when :gcp
      enable_gcp_encryption(resource_id, encryption_config)
    when :azure
      enable_azure_encryption(resource_id, encryption_config)
    end
  end
  
  def enforce_network_isolation(resource_id, rules)
    case @provider
    when :aws
      configure_security_groups(resource_id, rules)
    when :gcp
      configure_firewall_rules(resource_id, rules)
    when :azure
      configure_nsg_rules(resource_id, rules)
    end
  end
  
  private
  
  def enable_aws_encryption(resource_id, config)
    s3 = Aws::S3::Client.new
    s3.put_bucket_encryption(
      bucket: resource_id,
      server_side_encryption_configuration: {
        rules: [{
          apply_server_side_encryption_by_default: {
            sse_algorithm: config[:algorithm],
            kms_master_key_id: config[:kms_key]
          }
        }]
      }
    )
  end
end

Tools & Ecosystem

AWS provides comprehensive security services integrated across the platform. IAM controls access, KMS manages encryption keys, GuardDuty detects threats, Security Hub aggregates findings, and WAF protects web applications. Each service addresses specific security requirements.

AWS IAM defines fine-grained permissions through policies. Policies attach to users, groups, or roles. Service Control Policies (SCPs) enforce organization-wide restrictions. IAM Access Analyzer identifies resources shared with external entities. Credential reports list all users and access key status.

AWS Key Management Service creates and controls encryption keys. KMS integrates with most AWS services for transparent encryption. Customer master keys (CMKs) never leave KMS. Applications receive data encryption keys wrapped with CMKs. Key rotation occurs automatically on schedule.

GuardDuty monitors AWS accounts for malicious activity using machine learning. It analyzes CloudTrail logs, VPC Flow Logs, and DNS logs. Findings identify compromised instances, reconnaissance activity, and unusual API calls. Integration with CloudWatch enables automated response.

Security Hub aggregates security findings from GuardDuty, Inspector, Macie, and third-party tools. It provides a unified view of security posture across accounts. Automated security standards checking validates configurations against CIS benchmarks. Custom insights create focused views of specific security concerns.

require 'aws-sdk-securityhub'

security_hub = Aws::SecurityHub::Client.new

# Enable Security Hub
security_hub.enable_security_hub(
  tags: {
    'Environment' => 'Production',
    'Team' => 'Security'
  }
)

# Get findings with high severity
response = security_hub.get_findings(
  filters: {
    severity_label: [{
      value: 'HIGH',
      comparison: 'EQUALS'
    }],
    workflow_status: [{
      value: 'NEW',
      comparison: 'EQUALS'
    }]
  }
)

response.findings.each do |finding|
  puts "Title: #{finding.title}"
  puts "Severity: #{finding.severity.label}"
  puts "Resource: #{finding.resources.first.id}"
  puts "Description: #{finding.description}"
  puts "---"
end

Google Cloud offers similar security services with different implementations. Cloud IAM manages access, Cloud KMS handles encryption, Security Command Center provides threat detection, and Cloud Armor protects against DDoS attacks.

Cloud IAM uses a hierarchical resource model. Permissions granted at organization level cascade to folders, projects, and resources. Predefined roles group common permissions. Custom roles create precise permission sets. Service accounts authenticate applications without user credentials.

Azure security centers on Azure Active Directory for identity management. Key Vault stores secrets and encryption keys. Security Center assesses security posture. Sentinel provides security information and event management (SIEM). Defender protects servers, containers, and applications.

Third-party tools extend cloud security capabilities. HashiCorp Vault manages secrets across multiple platforms. Terraform applies infrastructure as code with built-in security validation. Prisma Cloud scans infrastructure for misconfigurations. Datadog monitors security metrics alongside application performance.

# HashiCorp Vault integration for secret management
require 'vault'

Vault.configure do |config|
  config.address = 'https://vault.example.com'
  config.token = ENV['VAULT_TOKEN']
end

# Store secret
Vault.logical.write(
  'secret/data/database',
  data: {
    username: 'app_user',
    password: SecureRandom.hex(32)
  }
)

# Retrieve secret
secret = Vault.logical.read('secret/data/database')
db_password = secret.data[:data][:password]

# Use dynamic database credentials
db_creds = Vault.logical.read('database/creds/readonly')
connection = PG.connect(
  host: 'database.example.com',
  user: db_creds.data[:username],
  password: db_creds.data[:password],
  dbname: 'production'
)

Common Pitfalls

Overly permissive IAM policies grant unnecessary access and violate least privilege. Wildcard permissions on all actions and resources create security risks. Developers add broad permissions during development but forget to restrict them for production. Regular policy audits identify and remediate excessive permissions.

# BAD: Wildcard permissions
{
  "Version": "2012-10-17",
  "Statement": [{
    "Effect": "Allow",
    "Action": "*",
    "Resource": "*"
  }]
}

# GOOD: Specific permissions
{
  "Version": "2012-10-17",
  "Statement": [{
    "Effect": "Allow",
    "Action": [
      "s3:GetObject",
      "s3:PutObject"
    ],
    "Resource": "arn:aws:s3:::specific-bucket/specific-prefix/*"
  }]
}

Unencrypted data at rest exposes sensitive information if storage media is compromised. Default storage configurations might not enable encryption. Database snapshots, volume backups, and object storage all require explicit encryption configuration. Automated compliance scanning detects unencrypted resources.

Public S3 buckets leak sensitive data regularly. Bucket policies or ACLs that grant public access expose all objects. The s3:GetObject permission on principal * allows anyone to read bucket contents. Block Public Access settings prevent accidental public exposure at the account level.

# Enable S3 Block Public Access account-wide
require 'aws-sdk-s3control'

s3_control = Aws::S3Control::Client.new

s3_control.put_public_access_block(
  account_id: '123456789012',
  public_access_block_configuration: {
    block_public_acls: true,
    ignore_public_acls: true,
    block_public_policy: true,
    restrict_public_buckets: true
  }
)

Hardcoded credentials in source code create immediate security vulnerabilities. Access keys committed to Git repositories leak through public commits. Automated scanners constantly search GitHub for AWS credentials. Revoke compromised keys immediately and rotate all credentials regularly.

Environment variables provide better credential storage than hardcoding, but container images might bake in environment variables. Secrets managers inject credentials at runtime without storing them in images. IAM roles for EC2 instances and ECS tasks eliminate static credentials entirely.

# BAD: Hardcoded credentials
s3 = Aws::S3::Client.new(
  access_key_id: 'AKIAIOSFODNN7EXAMPLE',
  secret_access_key: 'wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY'
)

# GOOD: Instance role credentials (automatic)
s3 = Aws::S3::Client.new  # Uses instance profile

# GOOD: Environment variables
s3 = Aws::S3::Client.new(
  credentials: Aws::Credentials.new(
    ENV['AWS_ACCESS_KEY_ID'],
    ENV['AWS_SECRET_ACCESS_KEY']
  )
)

# BEST: Secrets Manager
require 'aws-sdk-secretsmanager'
secrets = Aws::SecretsManager::Client.new
response = secrets.get_secret_value(secret_id: 'prod/api/credentials')
creds = JSON.parse(response.secret_string)

Missing logging and monitoring prevents security incident detection. CloudTrail disabled or not configured for all regions leaves blind spots. Log files stored in the same account as resources might be deleted by attackers. Cross-account log shipping protects audit trails.

Security group rules that allow unrestricted inbound access (0.0.0.0/0) expose services unnecessarily. SSH and RDP access should restrict to specific IP addresses or VPN ranges. Database ports should never accept public traffic. Network architecture should use bastion hosts or VPN for administrative access.

Inadequate network segmentation allows lateral movement after initial compromise. Placing all resources in one VPC or subnet provides no isolation. Separate VPCs for different security zones. Use private subnets for databases and application servers. Public subnets should only contain load balancers and bastion hosts.

Disabled or misconfigured Multi-Factor Authentication (MFA) weakens authentication security. Root account access without MFA risks complete account takeover. IAM users with console access should require MFA. Virtual MFA devices provide better security than SMS-based MFA.

Stale access credentials accumulate over time. Developers create access keys for temporary tasks but never delete them. Automated credential rotation removes this manual burden. Access key age monitoring alerts on old credentials. Unused credentials should be disabled after 90 days.

Reference

IAM Policy Elements

Element Purpose Example
Version Policy language version 2012-10-17
Statement Permission declarations Array of policy statements
Effect Allow or deny Allow, Deny
Action API operations s3:GetObject, ec2:DescribeInstances
Resource Target resources ARN format, wildcard supported
Principal Who statement applies to AWS account, IAM user, service
Condition Conditional evaluation IP address, date/time, MFA status

S3 Encryption Options

Type Key Management Use Case
SSE-S3 AWS managed keys Default encryption, simple setup
SSE-KMS KMS managed keys Audit trail, key rotation, access control
SSE-C Customer provided keys Full key control, customer manages rotation
Client-side Application managed Encrypt before upload, decrypt after download

AWS Security Services

Service Function Primary Use
IAM Access management User, group, role, policy management
KMS Key management Encryption key creation and control
GuardDuty Threat detection ML-based malicious activity detection
Security Hub Security aggregation Centralized security findings
WAF Web application firewall HTTP/HTTPS traffic filtering
Shield DDoS protection Automatic DDoS mitigation
CloudTrail Audit logging API call recording
Config Configuration tracking Resource configuration history
Inspector Vulnerability scanning EC2 and container security assessment
Macie Data discovery Sensitive data identification in S3

Common IAM Actions

Service Read Actions Write Actions
S3 ListBucket, GetObject PutObject, DeleteObject
EC2 DescribeInstances RunInstances, TerminateInstances
RDS DescribeDBInstances CreateDBInstance, DeleteDBInstance
IAM GetUser, ListUsers CreateUser, DeleteUser
Lambda GetFunction, ListFunctions CreateFunction, UpdateFunctionCode

Security Group Rules

Direction Protocol Port Range Source/Destination Purpose
Inbound TCP 443 0.0.0.0/0 HTTPS from internet
Inbound TCP 22 10.0.0.0/8 SSH from private network
Inbound TCP 3306 sg-12345678 MySQL from app tier
Outbound TCP 443 0.0.0.0/0 HTTPS to internet
Outbound All All 0.0.0.0/0 All outbound traffic

Encryption Key Rotation

Service Automatic Rotation Rotation Period Manual Rotation
KMS CMK Supported 1 year Supported
S3 SSE-S3 Automatic Regular Not applicable
RDS Supported Database specific Supported
EBS Not supported Not applicable Supported

CloudTrail Event Types

Event Type Description Example
Management Control plane operations CreateBucket, TerminateInstances
Data Data plane operations GetObject, PutObject
Insights Unusual activity detection Spike in API calls

Compliance Frameworks

Framework Focus Cloud Applicability
SOC 2 Service organization controls Infrastructure certification
ISO 27001 Information security Provider and customer responsibility
PCI DSS Payment card data Customer configuration required
HIPAA Healthcare data Requires BAA and configuration
GDPR Data privacy Data residency and protection
FedRAMP Government cloud US government agencies