Security and Compliance
Published: 2024-06-06 13:39:32

**<u>Shared Responsibility Model</u>**: This model defines what security responsibilities are handled by AWS and what is handled by the customer/you.
_Scenario:_You’re hosting an application on AWS. AWS is responsible for the physical security of the servers, while you are responsible for managing your data and access controls.

**<u>Well-Architected Framework:</u>** This framework consists of five pillars (Operational Excellence, Security, Reliability, Performance Efficiency, and Cost Optimization) that provide best practices for designing reliable, secure, efficient, and cost-effective systems in the cloud.
_Scenario:_ You’re designing a scalable e-commerce platform. The Well-Architected Framework helps ensure it remains secure, reliable, and cost-efficient even as traffic grows.

**<u>_Security Basics_</u>**

1.**<u>Identity and Access Management (IAM)</u>**: IAM enables you to manage users and their access to AWS services and resources securely.
•Scenario: You’re setting up a team project on AWS. You create IAM users for each team member and assign roles with specific permissions to ensure they only access what they need.
2.**<u>Web Application Firewall (WAF)</u>**: WAF helps protect your web applications by filtering and monitoring HTTP and HTTPS requests.
•Scenario: Your website is getting attacked by bots trying to exploit vulnerabilities. WAF blocks these malicious requests, keeping your site secure.

**_<u>Threat Protection</u>_**

1.**<u>Shield</u>**: 
Shield is a managed DDoS protection service that safeguards applications from DDoS attacks.
Scenario: Your online service experiences a massive influx of traffic due to a DDoS attack. Shield mitigates the attack, ensuring your service remains available.
2.**<u>Macie</u>**: 
Macie uses machine learning to discover, classify, and protect sensitive data.
•Scenario: You store customer information in S3 buckets. Macie scans these buckets, identifies sensitive data like credit card numbers, and helps you secure it.


**_<u>Configuration and Monitoring</u>_**

1.**<u>Config</u>**:
AWS Config allows you to assess, audit, and evaluate the configurations of your AWS resources.
•Scenario: You need to ensure your resources comply with company policies. Config tracks changes and assesses compliance automatically.
2.**<u>GuardDuty</u>**: 
GuardDuty is an intelligent threat detection service that continuously monitors for malicious activity and unauthorized behavior.
•Scenario: GuardDuty detects unusual API calls indicating a potential breach. You investigate and mitigate the threat promptly.

**_<u>Vulnerability and Compliance Management</u>_**


1.**<u>Inspector</u>**: 
Inspector assesses your EC2 instances for vulnerabilities and deviations from best practices.
•Scenario: You launch a new EC2 instance. Inspector runs a security assessment and provides a report highlighting potential vulnerabilities for you to address.
2.**<u>Artifact</u>**: 
Artifact provides on-demand access to AWS’s compliance and security reports.
•Scenario: Your company needs proof of AWS compliance for an audit. Artifact supplies the necessary compliance reports.

1.**<u>Cognito</u>**:
Cognito helps you add user sign-up, sign-in, and access control to your web and mobile applications.
•Scenario: You’re developing a mobile app and need user authentication. Cognito provides a user pool for registration and sign-in functionalities.


**_<u>Encryption</u>_**

Encryption is the process of converting data into a code to prevent unauthorized access. It is a critical component of data security in the cloud.

Scenario: You need to ensure that sensitive customer data stored in an S3 bucket is protected from unauthorized access. By encrypting the data, you can ensure it remains secure even if someone gains unauthorized access to the storage.

**<u>Key Management Service (KMS)</u>**

 KMS is a managed service that allows you to create and manage encryption keys. It simplifies the process of encrypting your data and managing keys securely.

Scenario: You have an application that processes sensitive information. You use KMS to generate and store encryption keys, ensuring that your data is encrypted both at rest and in transit.

**<u>CloudHSM</u>**

CloudHSM is a hardware security module that allows you to generate and use your encryption keys within dedicated hardware. It provides a higher level of security by managing encryption keys in hardware security modules.

Scenario: Your organization has strict regulatory requirements for encryption key management. Using CloudHSM, you generate and store encryption keys in a dedicated hardware security module, ensuring compliance with regulatory standards.

**_<u>Secrets Management</u>_**

Secrets management involves securely storing, managing, and retrieving sensitive information such as passwords, API keys, and other credentials. AWS Secrets Manager helps you do this effectively.

Scenario: You have a web application that requires access to a database. Instead of hardcoding the database credentials in your application code, you store them in AWS Secrets Manager. Your application retrieves these credentials securely at runtime, reducing the risk of exposing sensitive information.