Security is one of the most important topics when using the cloud. AWS follows strict security practices to ensure that your data, applications, and systems are safe.
The Shared Responsibility Model explains that security in the cloud is shared between AWS and the customer (you). It’s like AWS and you are on the same team, and both have responsibilities to keep your systems secure.
AWS takes care of everything related to the cloud infrastructure, which you don’t see or manage.
Physical Security:
Global Infrastructure:
Virtualization Layer:
You are responsible for securing everything that you put in the cloud. Think of it as securing your apartment after renting it.
| Responsibility | AWS Responsibility | Customer Responsibility |
|---|---|---|
| Physical Security | Y | N |
| Infrastructure Security | Y | N |
| Operating System Updates | N | Y |
| Data Encryption | N | Y |
| IAM and Permissions | N | Y |
IAM (Identity and Access Management) is the most important tool for managing who can access your AWS resources and what they can do.
IAM allows you to:
Example: If you have a team of developers, each one gets a separate IAM user account.
Example: All developers can belong to the “Developers” group, which has access to EC2 and S3.
Example: An application running on an EC2 server can assume a role to access an S3 bucket.
In AWS, protecting your data is critical. There are two main types of data you need to secure:
AWS provides tools and features to ensure your data remains private, secure, and protected from unauthorized access.
Data at rest is data that sits on a disk or database. To protect this data, AWS provides encryption, which is like putting your data in a locked box.
With Server-Side Encryption (SSE), AWS encrypts your data for you when you upload it. It’s like storing your files in a secure vault where AWS locks and protects them.
There are three types of Server-Side Encryption:
Example: You upload a photo to an S3 bucket. AWS encrypts the photo with a key, stores it securely, and decrypts it when you access it.
Analogy: It’s like putting your valuables in a bank vault where you keep the key, but the bank protects the vault.
Analogy: You lock your valuables in a vault and keep the only copy of the key.
AWS KMS is a service that allows you to manage and control encryption keys.
Example:
You upload customer data to an S3 bucket and use KMS to encrypt it. You monitor who accessed the encryption key and ensure no unauthorized access occurs.
With Client-Side Encryption, you encrypt the data before you upload it to AWS.
Analogy: Imagine you put your files in a locked box before handing them over to AWS. AWS stores the box but cannot open it.
| Type | Who Manages the Keys? | Where is the Data Encrypted? |
|---|---|---|
| SSE-S3 | AWS | AWS (when storing the data) |
| SSE-KMS | AWS (you control via KMS) | AWS |
| SSE-C | Customer (you provide keys) | AWS |
| Client-Side | Customer (you encrypt data) | Before sending it to AWS |
Data in transit is data that is being transferred or moved across a network. For example:
To protect this data, AWS uses encryption protocols like SSL/TLS.
How It Works:
Example:
When you log in to a website (like an online bank), HTTPS secures your username, password, and other sensitive information.
Let’s say you run an e-commerce website:
By combining these protections, you ensure that no one—whether hackers or unauthorized employees—can access your data.
AWS offers a wide range of security services to help you protect your applications, infrastructure, and data. These services help you:
What is a DDoS Attack?
What AWS Shield Does:
Types of AWS Shield:
Example:
If someone tries to overwhelm your website with fake traffic, AWS Shield detects and blocks the attack, keeping your site available for real users.
What is AWS WAF?
How it Works:
Example:
What is GuardDuty?
What GuardDuty Detects:
How It Works:
Example:
If GuardDuty detects someone trying to access an S3 bucket repeatedly without permission, it sends you a warning.
What is AWS Config?
Key Features:
Example:
If you accidentally make an S3 bucket public, AWS Config detects the change and alerts you.
What is Amazon Inspector?
How it Works:
Example:
You run Amazon Inspector, and it discovers that one of your EC2 instances has an outdated operating system. It recommends updating it to stay secure.
What is AWS CloudTrail?
Key Features:
Example:
If someone deletes an S3 bucket, CloudTrail records:
What is Trusted Advisor?
Example:
Trusted Advisor might detect that your S3 bucket is publicly accessible and recommend restricting access.
Here’s a quick summary of the key AWS security services:
| Service | Purpose | Example Use Case |
|---|---|---|
| AWS Shield | Protects against DDoS attacks. | Prevent fake traffic from overwhelming a website. |
| AWS WAF | Protects web applications. | Block SQL injection or malicious scripts. |
| Amazon GuardDuty | Detects threats and unusual activity. | Monitor for stolen credentials or malware. |
| AWS Config | Tracks resource configurations. | Alert if an S3 bucket is made public. |
| Amazon Inspector | Scans for security vulnerabilities. | Find outdated software on EC2 instances. |
| AWS CloudTrail | Logs all API activity for auditing. | Track who deleted a resource. |
| AWS Trusted Advisor | Provides security and cost recommendations. | Identify public S3 buckets or unused resources. |
In AWS, network security ensures that data sent between systems (like servers or applications) is protected from unauthorized access, interception, or modification. AWS provides tools to create secure networks, control traffic flow, and monitor connections.
A Virtual Private Cloud (VPC) is a private network you create in AWS. Think of it as your own secure, isolated space in the cloud where you can deploy servers, databases, and applications.
Example: You can place your web servers in a public subnet and your databases in a private subnet for better security.
Example: You can route traffic from your public subnet to the internet, but block access to the private subnet.
Example: If you have one VPC for your e-commerce site and another for your accounting systems, VPC peering allows them to talk to each other without using the public internet.
A Security Group is like a virtual firewall for your AWS resources. It controls the traffic that is allowed to and from your resources (like EC2 instances).
Key Points:
Imagine you have a web server running on an EC2 instance. Your security group rules might look like this:
| Rule Type | Protocol | Port | Source | Action |
|---|---|---|---|---|
| Inbound | HTTP | 80 | Anywhere (0.0.0.0/0) | Allow |
| Inbound | SSH | 22 | Your IP Address | Allow |
| Outbound | All | All | Anywhere | Allow |
A Network ACL (NACL) is another firewall-like tool that controls traffic at the subnet level. It’s like a second layer of defense for your VPC.
Example of NACL Rules:
| Rule # | Type | Protocol | Port | Source | Action |
|---|---|---|---|---|---|
| 100 | HTTP | TCP | 80 | 0.0.0.0/0 | Allow |
| 200 | All | All | All | 0.0.0.0/0 | Deny |
| Feature | Security Groups | NACLs |
|---|---|---|
| Level | Instance level | Subnet level |
| Stateful/Stateless | Stateful | Stateless |
| Default Behavior | Deny all inbound traffic | Allow all inbound traffic |
| Rules Order | Evaluates all rules | Evaluates in order |
What is AWS Direct Connect?
Benefits:
Example:
If you run a business with large databases in your office, you can use AWS Direct Connect to transfer data quickly and securely to AWS.
What is a VPN?
When to Use VPN:
Example:
You’re working from home and need secure access to your company’s AWS VPC. You connect to a VPN that encrypts all the data traveling between your laptop and AWS.
Here’s a recap of AWS network security tools:
| Tool | Purpose | Use Case |
|---|---|---|
| VPC | Creates an isolated private network. | Run applications securely. |
| Security Groups | Firewall at the instance level. | Allow HTTP traffic to web servers. |
| NACLs | Firewall at the subnet level. | Block all traffic except HTTP. |
| Direct Connect | Private, high-speed AWS connection. | Transfer large data securely. |
| VPN | Secure internet connection to AWS. | Remote secure access to AWS VPC. |
Compliance refers to following rules, laws, and regulations that apply to your industry or business. For example:
AWS helps you meet these compliance requirements through:
AWS complies with a wide range of international and industry-specific standards. These certifications ensure that AWS data centers, infrastructure, and operations meet global security requirements.
Think of AWS as a highly certified building:
AWS Artifact is a self-service portal where you can access AWS compliance reports and certifications.
Example: If a client asks for proof that your systems comply with PCI DSS, you can download the PCI DSS report from AWS Artifact and share it with them.
AWS Config helps you govern your AWS resources by monitoring and tracking their configurations. It ensures your resources comply with security and business rules.
Let’s say you set a rule: "All S3 buckets must not allow public access".
Imagine you are a company that stores sensitive health information for patients:
By leveraging AWS compliance programs and governance tools, you ensure that your resources meet legal and security standards.
| Feature | Purpose | Example Use Case |
|---|---|---|
| Compliance Programs | AWS follows global standards like ISO, SOC, PCI, and HIPAA. | Healthcare companies use AWS for HIPAA compliance. |
| AWS Artifact | Provides access to compliance reports and certifications. | Download SOC 2 reports for an audit. |
| AWS Config | Tracks resource configurations and checks compliance. | Ensure no S3 buckets are public. |
Security best practices are recommendations that help you keep your AWS environment secure, compliant, and protected from threats. AWS provides a variety of tools, features, and guidelines to ensure the safety of your resources, data, and applications.
Here are the most important best practices you should follow:
Example:
If you log in to AWS, you first enter your password. Then, you open the Google Authenticator app on your phone to enter the 6-digit code. Without the code, no one can log in.
If someone deletes an S3 bucket, CloudTrail logs the details:
Example:
You set a Bucket Policy that allows only users from your company to access an S3 bucket. Even if someone outside tries to access it, they will be blocked.
If a developer moves to another team, review their IAM role and remove permissions they no longer need.
Example: Set up an alarm if an EC2 instance's CPU usage is too high, which could indicate an attack or malfunction.
Example: GuardDuty alerts you if someone tries to access your account with stolen credentials.
Example:
You notice unexpected traffic coming from a suspicious IP address. VPC Flow Logs help you identify the source and take action.
Here’s a recap of the most critical best practices:
| Best Practice | What It Does | Example |
|---|---|---|
| Enable MFA | Adds an extra layer of security. | Protects AWS accounts from stolen passwords. |
| Use AWS CloudTrail | Tracks all API activity for auditing. | Monitors who deleted or modified resources. |
| Secure S3 Buckets | Prevents accidental public access. | Ensures sensitive data is private. |
| Review IAM Roles and Permissions | Enforces least privilege access. | Removes unnecessary permissions for users. |
| Monitor with CloudWatch/GuardDuty | Detects performance issues and security threats. | Alerts you to suspicious activities. |
| Use VPC Flow Logs | Monitors network traffic. | Identifies unusual traffic patterns. |
| Enable Automatic Backups | Ensures data recovery in case of failure. | Automates backups of EC2 and databases. |
IAM Access Analyzer is a relatively new AWS service that helps you identify resources shared with external entities. While earlier we discussed reviewing IAM permissions, Access Analyzer automates the detection of overly permissive configurations, especially in IAM roles and policies.
Identifies IAM roles that can be assumed by external accounts.
Detects S3 buckets, KMS keys, and other resources shared outside your organization.
Helps enforce least privilege access by flagging unintentional exposure.
Example: If a developer mistakenly creates a policy that allows public access to an S3 bucket, Access Analyzer will alert you immediately.
Exam Tip: Know that Access Analyzer helps detect unintended access to your AWS resources, making it a detection-focused tool within the IAM service family.
Service Control Policies (SCPs) are a governance mechanism used in AWS Organizations. While IAM policies manage permissions within an account, SCPs manage what services and actions member accounts can perform, at the organizational level.
Apply guardrails to ensure member accounts cannot exceed allowed permissions, even if their IAM permissions allow it.
SCPs don’t grant permissions but restrict them.
Example: If an SCP denies access to ec2:*, then even if an IAM user has ec2:StartInstances permission, they won’t be able to use EC2 in that account.
Quick Note: While SCPs are advanced, it’s helpful to remember their role in organization-wide control, especially for enterprise-level governance.
You've already covered AWS security services like AWS Shield, AWS WAF, Amazon GuardDuty, etc. For exam readiness, it's useful to organize them by function. Below is a text-form summary (not a table, per your request):
AWS WAF – Blocks common web attacks.
AWS Shield – Protects against DDoS attacks.
IAM – Controls user and service access.
SCPs – Apply service-level access restrictions across accounts.
Amazon GuardDuty – Detects suspicious activity (e.g., stolen credentials).
AWS Config – Tracks resource changes and compliance.
IAM Access Analyzer – Flags resources shared with external entities.
AWS CloudTrail – Logs API activity.
Amazon CloudWatch – Monitors metrics and creates alarms.
AWS Inspector – Scans for vulnerabilities on EC2 and containers.
Tip: Recognizing the function of each service helps answer scenario-based exam questions more easily.
A classic security best practice — and a frequent exam topic — is related to the root user account.
Never use the root account for daily operations.
Enable MFA for the root account.
Use the root account only when absolutely necessary, such as:
Changing account settings.
Closing an AWS account.
Managing certain billing functions.
Example Exam Question:
Which of the following is a best practice related to the root account in AWS?
Correct answer: "Enable MFA and avoid using it for routine tasks."
This aligns directly with the AWS shared responsibility model — you are responsible for securing credentials, especially the most powerful one.
IAM Access Analyzer: Detects unintended resource sharing.
SCPs: Restrict what member accounts in an organization can do.
Security Service Classification: Know which tools prevent, detect, or monitor.
Root Account Best Practices: Use rarely, protect with MFA, and never for daily tasks.
Which AWS security principle recommends granting users only the permissions necessary to perform their job functions?
The principle of least privilege.
The principle of least privilege restricts user permissions to the minimum level required for specific tasks. In AWS environments, this principle is enforced primarily through IAM policies that define precise permissions for accessing resources.
Implementing least privilege reduces the potential impact of compromised accounts or accidental misuse of resources. For example, a developer who only needs to read objects from an Amazon S3 bucket should not receive permissions to delete or modify them.
A common error is assigning overly broad permissions such as full administrative access for convenience. While this simplifies configuration, it significantly increases security risks. Applying least privilege helps organizations maintain stronger security controls and limit exposure to potential threats.
Demand Score: 84
Exam Relevance Score: 88
A company needs to securely store and automatically rotate database credentials for applications running in AWS. Which AWS security service supports this requirement?
AWS Secrets Manager.
AWS Secrets Manager is designed to securely store, manage, and rotate sensitive information such as database credentials, API keys, and authentication tokens. Instead of embedding credentials directly in application code, developers can retrieve secrets dynamically through secure API calls.
The service supports automatic rotation of credentials, reducing the risk of compromised credentials remaining active for extended periods. Integration with AWS Identity and Access Management ensures that only authorized services or users can access stored secrets.
A frequent mistake is confusing Secrets Manager with configuration management services. Secrets Manager specifically handles sensitive data and credential rotation, whereas other services may manage general configuration parameters that are not considered secret.
Demand Score: 70
Exam Relevance Score: 78
A company wants to centrally review compliance reports and AWS audit certifications. Which AWS service provides access to these compliance documents?
AWS Artifact.
AWS Artifact provides on-demand access to AWS compliance documentation and audit reports. Organizations can download reports related to certifications such as SOC, ISO, and PCI DSS. These documents help customers verify that AWS infrastructure meets regulatory and industry compliance requirements.
Artifact is particularly useful for organizations that must demonstrate compliance to regulators, auditors, or internal governance teams. Instead of requesting documentation from AWS support, users can retrieve reports directly through the AWS Management Console.
A common confusion occurs between AWS Artifact and security monitoring services. Artifact does not detect threats or enforce policies; it simply provides compliance documentation and agreements related to AWS infrastructure.
Demand Score: 72
Exam Relevance Score: 80
Which component of AWS security is always managed by AWS regardless of the service model used?
Physical security of the AWS data centers.
AWS always manages the security of the underlying infrastructure that supports its cloud services. This includes physical data center facilities, networking hardware, servers, and virtualization layers. Customers do not access or manage these components.
This responsibility applies across all AWS service models, including Infrastructure as a Service (IaaS), Platform as a Service (PaaS), and fully managed services. AWS handles tasks such as facility access control, hardware maintenance, and physical network protection.
Many learners mistakenly believe that AWS responsibilities vary widely across service models. While customer responsibilities do change depending on the service level, AWS consistently maintains responsibility for protecting the physical infrastructure that hosts the cloud environment.
Demand Score: 86
Exam Relevance Score: 90
Which AWS service enables administrators to create users, assign permissions, and enforce least-privilege access across AWS resources?
AWS Identity and Access Management (IAM).
IAM is the primary service used to manage authentication and authorization in AWS environments. Administrators can create IAM users, groups, and roles, then attach policies that define allowed actions on AWS resources. This enables enforcement of the principle of least privilege, where users receive only the permissions necessary to perform their tasks.
A common exam misunderstanding is confusing IAM with directory services or security monitoring tools. IAM does not detect threats or monitor logs; instead, it controls who can access AWS resources and what actions they are allowed to perform.
Proper IAM configuration significantly reduces security risks by preventing unauthorized access and limiting the impact of compromised credentials.
Demand Score: 82
Exam Relevance Score: 92
A company deploys an application on Amazon EC2 instances. According to the AWS shared responsibility model, who is responsible for patching the operating system on those instances?
The customer is responsible.
In the AWS shared responsibility model, AWS manages security of the cloud, while customers manage security in the cloud. AWS protects the physical infrastructure, hardware, networking, and underlying virtualization environment. However, when customers run workloads on services such as EC2, they control the operating system inside the instance.
Because customers choose the operating system, install applications, and manage configurations, they must apply operating system patches, configure firewalls, and maintain system security updates.
A common mistake is assuming AWS automatically manages OS updates for EC2 instances. That level of management exists only with fully managed services. With EC2, the customer retains responsibility for operating system maintenance and security configuration.
Demand Score: 90
Exam Relevance Score: 95