Primers-AWS
Primers-AWS
The AWS Cloud Practitioner course introduces foundational cloud computing and
AWS concepts, suitable for students or professionals across non-technical and
technical roles. Key areas include:
Key Topics
Additional Insights
Amazon S3 Overview
● Scalable & Durable Object Storage: Store any amount of data in the cloud,
accessible from anywhere on the internet.
● Storage as Objects in Buckets: Files are stored as objects inside buckets.
Each object can be up to 5 TB.
● High Availability: Designed for 99.999999% availability, with redundancy
across multiple facilities.
● Access Control: You can control access through bucket policies, IAM
policies, and manage who can create, delete, or retrieve objects.
Amazon S3 Features
1. Access Control:
○ Default setting: private access for resource owners.
○ Can use AWS features to block or allow public access, grant
permissions to specific users, or use policies (bucket policies or user
policies).
○ S3 Block Public Access feature prevents accidental exposure of data.
2. Bucket Properties:
○ Versioning: Store multiple versions of an object, allowing recovery
from accidental deletions or overwrites.
○ Server Access Logging: Track detailed records of requests made to
the bucket, useful for auditing and security.
○ Object Tagging: Categorize objects with key-value pairs (up to 10 tags
per object).
○ Event Notifications: Automatically trigger actions when specific
events occur (e.g., object upload or deletion).
○ Encryption: Set default encryption for all objects in a bucket to secure
data at rest.
3. Other Storage Options:
○ Transfer Acceleration: Speeds up file transfers using Amazon's global
CloudFront network.
○ Object Lock: Prevents objects from being deleted or overwritten for a
fixed period (WORM model).
○ Requester Pays: Shifts the cost of requests and data downloads to the
requester instead of the bucket owner.
4. Static Website Hosting:
○ S3 can host static websites, serving static content such as HTML,
images, and scripts.
Amazon S3 Glacier
● Low-Cost Data Archiving: Ideal for long-term storage where retrieval time of
several hours is acceptable.
● Storage Classes:
○ Standard Retrieval: Takes 3-5 hours.
○ Bulk Retrieval: Takes 5-12 hours.
○ Expedited Retrieval: Available within 1-5 minutes.
● Glacier Deep Archive: Even lower-cost option for infrequently accessed
data, ideal for long-term retention (e.g., 7-10 years).
5. Vault Lock:
○ Allows you to lock a vault with compliance controls, ensuring data
integrity and immutability.
6. Lifecycle Policies:
○ Automate the transition of data between S3 storage classes based on
age or importance, reducing storage costs over time.
S3 Storage Classes
Data Management
● Elastic Compute Cloud (EC2) offers scalable compute capacity in the cloud,
similar to traditional physical servers but with cloud benefits such as flexibility,
cost efficiency, and easy scaling.
● Complete Control: EC2 provides full control over instances, including root
access, the ability to start/stop instances, and access to the console output.
● Flexible Cloud Hosting: You can choose different operating systems (Linux,
Windows, macOS) and instance configurations (CPU, memory, storage, etc.)
to match workload requirements.
● Elastic Scaling: EC2 supports scaling up or down based on demand using
Auto Scaling, which automatically adjusts the number of running instances.
● Integration: EC2 integrates seamlessly with other AWS services (like S3,
RDS, and VPC) for a complete, secure solution.
● Reliability: EC2 provides highly reliable environments, with the ability to
rapidly launch replacement instances.
● Security: Integrated with VPC for secure networking, and designed to meet
the security needs of sensitive organizations.
● Cost: With EC2, you only pay for the compute capacity that you actually use,
benefiting from AWS's economies of scale.
EC2 instances come in various types, each optimized for specific workloads:
Instance sizes vary by type and generation. For instance, a "c5.large" instance is
from the 5th generation of compute-optimized instances, with "large" indicating the
instance size.
● An AMI is a template that defines the OS, applications, and configurations for
launching EC2 instances.
● You can launch multiple instances from a single AMI, ensuring consistency
and scalability across environments.
● Benefits of AMIs:
○ Repeatability: Instances launched from the same AMI are identical.
○ Reusability: AMIs can be used to recreate instances efficiently.
○ Recoverability: AMIs provide an easy way to back up EC2
configurations, aiding in disaster recovery.
○ Backup: You can use AMIs to create backups or replicate EC2
instances across different regions.
With Amazon EC2, you can efficiently build, deploy, and scale applications, while
EBS ensures persistent and scalable storage for your EC2 instances.
Amazon VPC allows you to create a logically isolated virtual network within AWS.
This private network can house your AWS resources, such as EC2 instances and
RDS databases. The VPC is isolated from other virtual networks in the AWS cloud,
giving you control over your network’s structure and security settings.
● Control Over Network Design: You can specify your IP address range,
create subnets, and configure route tables and network gateways.
● IPv4 and IPv6 Support: AWS allows the use of both IPv4 and IPv6
addresses for your resources.
● Region-based: VPCs are region-specific, and cannot span multiple regions.
● CIDR Block: Define the IP address range (IPv4 or IPv6) for your VPC using
Classless Inter-Domain Routing (CIDR) notation.
● Subnets: Divide the VPC into smaller subnets, each within a single
availability zone. Subnets help in segmenting your resources by function (e.g.,
public and private subnets).
● Route Tables: By default, a VPC has a main route table, which is used to
direct traffic within the VPC. You can create custom route tables for more
granular control over traffic.
Networking Features
● Internet Gateway: Used to allow resources in your VPC to access the
internet. It is horizontally scalable and redundant.
● Network Address Translation (NAT) Gateway: Allows instances in private
subnets to access the internet, while keeping them isolated from inbound
internet traffic. NAT gateways support only IPv4 traffic.
● Elastic IP (EIP): A static public IP address that can be associated with an
EC2 instance to make it reachable from the internet.
● Elastic Network Interface (ENI): A virtual network card that can be attached
to an instance. Multiple ENIs can be used for advanced network
configurations.
Security Features
● Security Groups: Act as virtual firewalls that control inbound and outbound
traffic at the instance level. Security groups are stateful, meaning if you allow
inbound traffic, the corresponding outbound response traffic is automatically
allowed.
○ Example: A web-tier security group allows inbound HTTP/HTTPS
traffic, while an app-tier security group allows inbound traffic only from
the web-tier.
● Network Access Control Lists (NACLs): Operate at the subnet level and
function as an additional layer of security. They are stateless, requiring explicit
inbound and outbound rules for traffic.
○ Default NACLs allow all inbound and outbound traffic, but custom
NACLs block traffic until specific rules are added.
With these features, you can create a secure, scalable, and isolated networking
environment to run applications and manage workloads in AWS.
4. Database Services
Relational Databases:
● Service: Amazon RDS
○ Managed relational database with support for engines like MySQL,
PostgreSQL, Oracle, and SQL Server.
○ Benefits: Automated backups, patching, high availability, and
point-in-time recovery.
● Service: Amazon Aurora
○ Compatible with MySQL and PostgreSQL.
○ Features high throughput, automatic scaling, and 90% cost reduction
compared to commercial databases.
Non-Relational Databases:
Specialized Databases:
5. Summary
By combining these tools, AWS enables cost-effective, scalable, and resilient cloud
solutions tailored to diverse workloads and applications.
AWS CloudFormation
Amazon Route 53
These AWS services, when combined effectively, can create a robust cloud
architecture tailored for high performance, security, scalability, and cost efficiency. By
leveraging tools like CloudFormation and Elastic Beanstalk, organizations can
standardize deployments, automate operations, and achieve seamless scalability.
Amazon CloudFront
AWS Lambda
Amazon CloudFront
Amazon ElastiCache
Overall:
Amazon CloudFront
Amazon ElastiCache
1. Purpose: Provides in-memory caching for faster data retrieval and improved
application performance.
2. Supported Engines: Redis and Memcached.
3. Workflow:
○ Checks cache for requested data.
○ If data isn’t in the cache, the request is forwarded to the database.
● Dynamic vs Static Content: Adjust TTL settings for efficient cache handling
(longer TTL = better performance for static content, shorter TTL = better for
dynamic content).
● Edge Locations: Deliver content close to users for reduced latency.
1. Security Priority:
○ AWS prioritizes security with scalable, reliable infrastructure.
○ Core security services (IAM, monitoring, DDoS protection) continuously
evolve.
2. Shared Responsibility Model:
○ AWS Responsibility (Security of the Cloud):
■ Manages global infrastructure (e.g., regions, availability zones,
physical security).
■ Secures AWS services like compute, storage, and networking.
○ Customer Responsibility (Security in the Cloud):
■ Secures deployed data, operating systems, and configurations.
■ Manages access controls and encryption.
3. Managed vs. Unmanaged Services:
○ Unmanaged (e.g., EC2): Customer secures OS, patches, and
configurations.
○ Managed (e.g., S3, DynamoDB): AWS manages infrastructure;
customers handle data and permissions.
4. Key Security Services:
○ AWS IAM: Manage user access, roles, and policies.
○ AWS Shield: DDoS protection service.
○ AWS WAF: Web Application Firewall to protect against web exploits.
○ AWS Secrets Manager: Manages credentials like API keys.
○ AWS Artifact: On-demand compliance and security documentation.
○ Amazon GuardDuty: Threat detection and monitoring.
○ AWS KMS: Encryption key management.
○ Amazon Inspector: Security assessment of deployed applications.
○ AWS SSO: Centralized Single Sign-On for multiple AWS accounts.
5. Authentication & Authorization:
○ Authentication: Validates user identity (via AWS Console, CLI, or
APIs).
■ Credentials include access keys, passwords, and MFA.
○ Authorization: Assigns permissions through IAM policies (JSON
documents).
■ Users and roles have no permissions by default—policies grant
access.
6. AWS Compliance Tools:
○ AWS Certificate Manager: SSL/TLS certificate management.
○ Amazon Cognito: User authentication for web and mobile apps.
○ AWS Directory Service: Integration with Active Directory for
workloads.
1. IAM Roles:
○ Provide temporary access to AWS resources without long-term
credentials.
○ Ideal for applications (e.g., on EC2) accessing resources like S3
without embedding credentials.
2. Root User Best Practices:
○ Delete root user access keys.
○ Use MFA for added security.
○ Create IAM users with specific permissions for daily tasks.
3. IAM Policies:
○ JSON-based documents defining permissions for users, roles, or
groups.
○ Use policies to assign only the necessary permissions.
4. IAM Best Practices:
○ Rotate credentials periodically.
○ Use roles instead of hard-coded credentials in code.
○ Remove unused credentials and monitor user activities.
Amazon Inspector:
1. Purpose:
○ Automated security assessments for applications on AWS.
○ Identifies vulnerabilities and deviations from best practices.
2. Features:
○ Agent-based and API-driven, integrates into DevOps pipelines.
○ Provides detailed reports on findings, severity, and remediation steps.
3. Benefits:
○ Streamlines compliance with best practices.
○ Enables continuous security testing during development and
deployment.
DDoS Mitigation with AWS Shield:
● Purpose:
1. Helps build secure, high-performing, resilient, and efficient cloud-native
architectures.
2. Provides a consistent methodology for evaluating and improving
architectures.
● Six Pillars:
1. Operational Excellence: Processes and monitoring to deliver
business value while continuously improving.
2. Security: Protect information and systems while meeting business
needs.
3. Reliability: Ensure systems recover quickly and operate as expected
under load or failure.
4. Performance Efficiency: Use resources optimally to maintain desired
performance.
5. Cost Optimization: Minimize costs while balancing security,
performance, and reliability.
6. Sustainability: Reduce environmental impact and improve energy
efficiency.
1. Operational Excellence:
2. Security:
● Identity and Access Control: Implement strong identity foundations with least
privilege and MFA.
● Traceability: Enable real-time monitoring and integrate logs for automated
responses.
● Layered Security: Apply defense-in-depth across all layers, including edge,
VPC, and applications.
● Protect Data: Use encryption for data in transit and at rest, classify data by
sensitivity, and limit direct access.
● Incident Preparedness: Simulate responses and automate detection and
recovery for security events.
3. Reliability:
5. Cost Optimization:
● Consumption Model: Pay only for resources used (e.g., turn off unused
environments).
● Efficiency Metrics: Measure cost-effectiveness based on system output.
● Managed Services: Reduce costs by using AWS-managed services that
operate at scale.
● Expenditure Analysis: Attribute costs to business owners for accountability
and optimization.
6. Sustainability:
● Purpose:
○ Free tool for reviewing workloads against AWS best practices.
○ Identifies areas for improvement across the six pillars.
● Usage:
○ Define your workload.
○ Answer questions on operational excellence, security, reliability,
performance efficiency, cost optimization, and sustainability.
○ Get recommendations for optimization and scalability.
● Benefits:
○ Ensures workloads align with evolving best practices.
○ Provides actionable insights to enhance cloud architectures.
AWS Pricing Model Overview
● Pay-As-You-Go:
○ Pay only for the specific services and resources you use.
○ No upfront costs, termination fees, or complex licensing.
○ Similar to utility billing (electricity or water).
● Benefits:
○ Scalability: Adjust operations based on demand, minimizing
overprovisioning or capacity shortages.
○ Flexibility: Shifts focus from procurement complexity to innovation.
○ Cost Efficiency: Prevents overspending on unused resources.
1. On-Demand Instances:
○ Pay per hour or second without upfront payments or long-term
commitments.
○ Ideal for unpredictable workloads or first-time users.
2. Savings Plans:
○ Commit to a consistent usage level for 1 or 3 years to receive
discounts.
○ Compute Savings Plan: Up to 66% savings, applies across instance
types, regions, OS, and tenancy.
○ EC2 Instance Savings Plan: Up to 72% savings for specific instance
families and regions.
3. Reserved Instances (RIs):
○ Save up to 75% compared to On-Demand pricing by committing to a 1-
or 3-year term.
○ Payment Options:
■ All Upfront (AURI): Maximum savings.
■ Partial Upfront (PURI): Moderate upfront cost and savings.
■ No Upfront (NURI): Minimal initial cost, smaller discount.
○ Ideal for predictable workloads.
4. Spot Instances:
○ Use spare EC2 capacity at up to 90% discount compared to
On-Demand pricing.
○ Best suited for fault-tolerant and flexible workloads (e.g., Big Data,
containerized applications).
5. Dedicated Hosts:
○ Physical servers reserved for your use.
○ Enables BYOL (Bring Your Own License) for certain software.
○ Helps with compliance requirements.
AWS Cost Factors
1. Compute Costs:
○ Pay based on instance run time (hour or second).
○ Example: EC2, ECS, Lambda.
2. Storage Costs:
○ Pay per GB stored, based on type and frequency of access.
○ Example: Amazon S3 offers tiered pricing based on usage.
3. Data Transfer Costs:
○ Inbound Data Transfer: Free in most cases.
○ Outbound Data Transfer: Charged per GB, with reduced rates as
volume increases.
4. Service-Specific Pricing:
○ Different AWS services have unique pricing models.
○ Example: Amazon S3 pricing varies by storage class, while EC2
depends on instance type.
1. Volume Discounts:
○ Tiered pricing for services like Amazon S3 (lower cost per GB with
higher usage).
2. Storage Classes:
○ Match your storage type with frequency of access to optimize costs.
○ Example: S3 Standard for frequent access, S3 Glacier for infrequent.
3. Free Tier:
○ Some services offer a free usage tier for 12 months or always (e.g.,
AWS Lambda, DynamoDB).
Key Advantages
Amazon S3 Pricing
1. Pay-As-You-Go:
○ No minimum fee; charges depend on the location of the S3 bucket and
usage.
2. Storage Classes:
○ S3 Standard: High durability (99.999999%) and availability (99.99%).
○ S3 Standard Infrequent Access (IA): Lower cost for less frequently
accessed data.
○ S3 Intelligent Tiering: Automatically moves data to lower-cost storage
tiers.
○ S3 One Zone IA: Cost-efficient for data that doesn’t need multi-zone
redundancy.
○ S3 Glacier & Glacier Deep Archive: Extremely low-cost storage for
archival data.
3. Cost Components:
○ Storage Volume: Size and number of objects stored.
○ Data Transfer: Outbound transfers are charged; inbound is free.
○ Requests: Charges vary for GET, PUT, COPY, and LIST operations.
Cost Estimation Tools
1. Categories:
○ Always Free: Available indefinitely for all AWS customers.
○ 12-Month Free Tier: For new accounts; free usage for specific
services for 12 months.
○ Trials: Short-term offers that expire after first use.
2. Rules:
○ Usage is calculated monthly and does not accumulate across months.
○ Free tier features are region-specific (not available in China regions).
1. Support Levels:
○ Basic (Free): Billing and account-related support, documentation, and
forums.
○ Developer: Includes best practices, architecture guidance, and
diagnostic tools.
○ Business: Adds use case guidance, Trusted Advisor full checks, and
24/7 support.
○ Enterprise: Provides architecture guidance, event management, and a
Technical Account Manager (TAM).
2. Features Across Plans:
○ All Plans: 24/7 customer service for billing and account issues.
○ Developer & Above: Diagnostic tools and building block architecture
support.
○ Business & Enterprise: Priority case handling and use case-specific
guidance.
○ Enterprise: Application architecture advice and TAM for in-depth
guidance.
1. AWS Pricing:
○ Pay-as-you-go model enhances flexibility, scalability, and
cost-effectiveness.
○ Reserved capacity (RIs) and Savings Plans reduce costs for
predictable workloads.
2. Cost Estimation Tools:
○ AWS Pricing Calculator for upfront estimates.
○ Cost Explorer and Trusted Advisor for usage analysis and savings
recommendations.
3. AWS Support:
○ Tailored support options for businesses of all sizes.
○ Tools like Trusted Advisor optimize performance and reduce costs.
AWS Pricing
1. Model:
○ Pay-as-you-go: Charges are based on usage with no long-term
contracts.
○ Reserved Instances (RIs): Save up to 75% with upfront payments.
Three payment options:
■ All upfront (highest discount), partial upfront, no upfront
(smallest discount).
○ Savings Plans: Flexible cost-saving plans offering up to 66% discounts
(Compute Savings Plans) or 72% (EC2 Instance Savings Plans).
○ Spot Instances: Use spare EC2 capacity with up to 90% discount for
fault-tolerant workloads.
2. Volume Discounts:
○ Data transfer and S3 storage costs reduce as usage increases.
3. Factors Affecting Cost:
○ Compute: Pay for running instances (hourly/second-based rates).
○ Storage: Charged per GB provisioned or used.
○ Data Transfer: Inbound is free; outbound and cross-region transfers
incur charges.
1. Charges:
○ Volume Storage: Based on GB provisioned until storage is released.
○ Snapshots: Billed for data stored in S3.
○ Data Transfer: Free for inbound; charges for outbound and
cross-region transfers.
Amazon S3 Pricing
1. Storage Classes:
○ S3 Standard: High durability and availability.
○ S3 Standard-IA: Lower costs for less-frequent access.
○ S3 Intelligent Tiering: Automatically optimizes costs based on access
patterns.
○ S3 Glacier & Glacier Deep Archive: Cheapest option for archival
data.
2. Cost Factors:
○ Data transfer out (regional rates apply).
○ Requests: Different rates for GET, PUT, COPY, etc.
1. Three Categories:
○ Always Free: Available indefinitely.
○ 12-Month Free: For new customers, usage-limited across services.
○ Trials: Short-term trials for specific services.
1. Support Levels:
○ Basic (Free): Account/billing queries, service health checks, forums.
○ Developer: Adds architectural guidance and diagnostic tools.
○ Business: Adds 24/7 access, use case guidance, Trusted Advisor
checks.
○ Enterprise: Adds Technical Account Manager (TAM) and event
management.
2. Features:
○ All plans include customer service, service health checks, and basic
support.
○ Developer and above offer detailed guidance and troubleshooting.
○ Enterprise provides dedicated consultative partnerships.
3. AWS Pricing Model
○ Pay-as-you-go, reserved instances, savings plans, spot instances,
volume-based discounts, and flexibility.
4. Amazon EBS & S3 Pricing
○ Storage, snapshot, and data transfer pricing models, including specific
storage classes like S3 Glacier and Intelligent Tiering.
5. AWS Free Tier
○ Always free, 12-month free for new customers, and trials.
6. Cost Estimation Tools
○ AWS Pricing Calculator, AWS Cost Explorer, and forecasting features.
7. AWS Trusted Advisor
○ Recommendations on cost optimization, security, performance, and
fault tolerance.
8. Support Plans
○ Details of basic, developer, business, and enterprise plans with
features like technical account managers, architectural guidance, and
case management.