<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Hulk Pham</title>
    <description>The latest articles on DEV Community by Hulk Pham (@hulk-pham).</description>
    <link>https://dev.to/hulk-pham</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F565593%2Ff6bf8991-397a-440f-b73a-e7aaf95fc22a.jpeg</url>
      <title>DEV Community: Hulk Pham</title>
      <link>https://dev.to/hulk-pham</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hulk-pham"/>
    <language>en</language>
    <item>
      <title>Required Skills For Developers In The AI IDE Era</title>
      <dc:creator>Hulk Pham</dc:creator>
      <pubDate>Tue, 27 May 2025 05:23:42 +0000</pubDate>
      <link>https://dev.to/hulk-pham/required-skills-for-developers-in-the-ai-ide-era-1eec</link>
      <guid>https://dev.to/hulk-pham/required-skills-for-developers-in-the-ai-ide-era-1eec</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F72791jbc1k7b7ltm8aj2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F72791jbc1k7b7ltm8aj2.png" alt="Image description" width="800" height="842"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Executive Summary&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The software development landscape is undergoing a profound&lt;br&gt;
transformation, driven by the integration of Artificial Intelligence&lt;br&gt;
(AI) into Integrated Development Environments (IDEs). This shift is not&lt;br&gt;
about replacing human developers but rather augmenting their&lt;br&gt;
capabilities, automating repetitive tasks, and accelerating workflows.&lt;/p&gt;

&lt;p&gt;In this new era, developers require a blended skill set, encompassing&lt;br&gt;
new technical competencies such as prompt engineering and understanding&lt;br&gt;
AI/Machine Learning (ML) limitations, alongside a reinforcement of&lt;br&gt;
human-centric attributes like critical thinking, adaptability and&lt;br&gt;
ethical awareness. The developer's role is evolving from purely coding&lt;br&gt;
to one of orchestration, architecture, and strategic problem-solving.&lt;br&gt;
Embracing these evolving skills is no longer an advantage but a&lt;br&gt;
necessity for maintaining individual career relevance and driving&lt;br&gt;
organizational innovation.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;1. Introduction: The Changing Landscape of Software Development&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;1.1. The Evolution of IDEs and the Rise of AI Integration&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1xeyb8u7w8pzj2mnuukd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1xeyb8u7w8pzj2mnuukd.png" alt="Image description" width="800" height="816"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Integrated Development Environments (IDEs) have undergone a significant&lt;br&gt;
evolution, from basic text editors to sophisticated systems offering&lt;br&gt;
advanced features like syntax highlighting, intelligent code&lt;br&gt;
suggestions, and version control integration. The recent integration of&lt;br&gt;
AI marks a pivotal milestone, transforming how developers approach&lt;br&gt;
coding by predicting code, suggesting edits, and streamlining the&lt;br&gt;
development process. AI-powered development tools are software&lt;br&gt;
applications that integrate artificial intelligence to assist developers&lt;br&gt;
throughout the software development lifecycle. These tools harness the&lt;br&gt;
power of machine learning, a subset of AI, to learn from existing code&lt;br&gt;
patterns, thereby intelligently suggesting improvements or solutions,&lt;br&gt;
and optimizing code structure.&lt;/p&gt;

&lt;p&gt;A significant consequence of this evolution is the democratization of&lt;br&gt;
software development and the emergence of the "citizen developer." As&lt;br&gt;
AI tools become powerful enough to automate tasks like front-end,&lt;br&gt;
back-end, and database management with "no coding required", they&lt;br&gt;
empower non-technical users to build and customize applications without&lt;br&gt;
relying on traditional developers. AI-powered low-code/no-code (LCNC)&lt;br&gt;
platforms are making software development more accessible to&lt;br&gt;
non-programmers. This shift indicates a significant change in who can&lt;br&gt;
participate in software creation. This could lead to a surge in&lt;br&gt;
"citizen developers" leveraging AI-powered LCNC platforms, blurring&lt;br&gt;
the lines between traditional developer roles and business users.&lt;br&gt;
Consequently, professional developers may increasingly focus on complex&lt;br&gt;
integrations, custom AI model development, and managing these LCNC&lt;br&gt;
platforms, rather than solely building applications in a conventional&lt;br&gt;
manner.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;1.2. Transformative Impact of AI on Developer Workflows and Productivity&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;AI is acting as a powerful collaborator, boosting productivity,&lt;br&gt;
streamlining workflows, and driving innovation. It automates repetitive&lt;br&gt;
tasks such as code snippet generation, debugging, and optimization. This&lt;br&gt;
automation frees developers to focus on higher-value tasks that demand&lt;br&gt;
human creativity and judgment, such as defining product vision, setting&lt;br&gt;
strategy, concept development, and feature prioritization. According to&lt;br&gt;
a McKinsey report, features like automated code validation and bug&lt;br&gt;
detection can enhance developer productivity by up to 30%.&lt;/p&gt;

&lt;p&gt;This shift is not merely about doing tasks faster; it's a fundamental&lt;br&gt;
redefinition of a developer's core responsibilities. Rather than&lt;br&gt;
diminishing human expertise, AI amplifies it, enabling developers to&lt;br&gt;
concentrate on creative problem-solving, architectural design, and&lt;br&gt;
strategic decision-making. In this new era, the developer is not just a&lt;br&gt;
coder; they are a collaborator with AI, an architect of experiences, and&lt;br&gt;
increasingly an AI orchestrator, managing pipelines, models, data, and&lt;br&gt;
business logic. This implies a need for broader systems thinking and&lt;br&gt;
less intensive focus on detailed coding for routine tasks.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffi2es75pdexjv3k0skdl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffi2es75pdexjv3k0skdl.png" alt="Image description" width="800" height="271"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;2. AI-Powered IDEs: Core Functionalities and Benefits&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7h7pp42j9vuqg948d161.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7h7pp42j9vuqg948d161.png" alt="Image description" width="800" height="439"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;2.1. Automated Code Generation, Completion, and Refactoring&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;AI-powered IDEs, such as GitHub Copilot, Cursor, and IntelliCode,&lt;br&gt;
provide real-time code suggestions, auto-completions, and even generate&lt;br&gt;
entire functions or multi-line code blocks. They leverage AI models&lt;br&gt;
trained on billions of lines of open-source code, offering context-aware&lt;br&gt;
suggestions and predicting subsequent code patterns. AI-assisted code&lt;br&gt;
refactoring ensures clean, efficient, and well-structured code,&lt;br&gt;
improving readability and maintainability. "Natural Language to Code"&lt;br&gt;
features allow developers to describe functionality in plain English,&lt;br&gt;
generating complete, context-aware code snippets.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;2.2. Advanced Debugging, Testing, and Optimization&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;AI detects errors, bugs, and inefficiencies before code execution,&lt;br&gt;
significantly reducing debugging time. AI-powered debuggers analyze&lt;br&gt;
runtime behavior, detect irregularities, and pinpoint problematic code&lt;br&gt;
sections in seconds. Automated test case generation, unit, integration,&lt;br&gt;
and regression testing are streamlined by AI, ensuring high-quality&lt;br&gt;
software and reducing manual effort. AI also analyzes and suggests&lt;br&gt;
performance improvements, making code faster and more readable.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;2.3. Real-Time Collaboration and Project Management Features&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;AI IDEs can facilitate real-time code collaboration for teams, allowing&lt;br&gt;
multiple developers to work simultaneously on the same codebase. AI&lt;br&gt;
assists in project management tasks, market analysis, and feedback&lt;br&gt;
analysis, freeing up time for strategic activities. AI-powered search&lt;br&gt;
helps developers quickly locate functions, files, and dependencies&lt;br&gt;
within large projects.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;2.4. Table: Key AI IDE Features and Developer Benefits&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The following table summarizes the most impactful features of AI-powered&lt;br&gt;
IDEs and their direct benefits to developers. This table provides a&lt;br&gt;
quick overview, making it easy for readers to grasp the practical&lt;br&gt;
applications of these tools and serving as a foundation for discussing&lt;br&gt;
the necessary skills. For example, if AI automates debugging, the skill&lt;br&gt;
shifts from manually finding bugs to understanding &lt;em&gt;why&lt;/em&gt; AI flagged an&lt;br&gt;
issue or &lt;em&gt;how&lt;/em&gt; to refine its suggestions.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;strong&gt;Feature Category&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Specific Feature (Examples)&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Benefit to Developers&lt;/strong&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Code Generation/Completion&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Real-time code suggestions&lt;/td&gt;
&lt;td&gt;Accelerates coding process&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;Natural Language to Code&lt;/td&gt;
&lt;td&gt;Minimizes manual coding, increases efficiency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;Context-aware auto-completion&lt;/td&gt;
&lt;td&gt;Improves workflow speed and accuracy&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Debugging/Error Detection&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;AI-driven error detection&lt;/td&gt;
&lt;td&gt;Significantly reduces debugging time&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;Explanations of code sections&lt;/td&gt;
&lt;td&gt;Enhances understanding of codebase&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Testing&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Automated unit test generation&lt;/td&gt;
&lt;td&gt;Ensures software quality, reduces manual effort&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;Automated regression testing&lt;/td&gt;
&lt;td&gt;Maintains code quality with updates&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Optimization&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Code refactoring&lt;/td&gt;
&lt;td&gt;Ensures clean, efficient, readable, and maintainable code&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;Performance optimization suggestions&lt;/td&gt;
&lt;td&gt;Improves code speed and efficiency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Collaboration&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Real-time code collaboration&lt;/td&gt;
&lt;td&gt;Ideal for remote and distributed teams&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;Automated code reviews&lt;/td&gt;
&lt;td&gt;Accelerates PR turnaround, ensures standards&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Project Management&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;AI-powered code navigation and search&lt;/td&gt;
&lt;td&gt;Quickly locates functions, files, dependencies&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;Decision-making support&lt;/td&gt;
&lt;td&gt;Provides rapid insights into development options&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Security&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Real-time vulnerability detection&lt;/td&gt;
&lt;td&gt;Reduces security risks before code goes live&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;Scanning AI-generated code for vulnerabilities&lt;/td&gt;
&lt;td&gt;Ensures safety and compliance&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;3. Core Technical Skills for the AI IDE Era&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcnw902zlvly0etyffykt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcnw902zlvly0etyffykt.png" alt="Image description" width="800" height="230"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;3.1. Mastering Prompt Engineering&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Prompt engineering is emerging as a core skill, involving the creation&lt;br&gt;
of effective prompts to guide AI language models in generating accurate,&lt;br&gt;
relevant, and context-aware responses. This requires the ability to&lt;br&gt;
manage conversational context, optimize token usage, and incorporate&lt;br&gt;
detailed context to effectively guide AI models. Developers need to&lt;br&gt;
understand techniques such as persona-driven prompting, iterative&lt;br&gt;
prompting, and few-shot prompting. The ability to evaluate AI-generated&lt;br&gt;
responses and continuously refine prompts is crucial for improving&lt;br&gt;
accuracy and relevance.&lt;/p&gt;

&lt;p&gt;This shift represents a fundamental cognitive transition: from mastering&lt;br&gt;
syntax to orchestrating intent. Traditional programming emphasizes&lt;br&gt;
precise syntax and detailed algorithmic implementation. However, with AI&lt;br&gt;
capable of generating code from natural language, the developer's focus&lt;br&gt;
shifts. Prompt engineering requires "guiding AI language models to&lt;br&gt;
produce accurate, relevant, and context-aware responses" and "refining&lt;br&gt;
prompt iterations". This implies that the primary interface becomes&lt;br&gt;
natural language, and the skill lies in &lt;em&gt;articulating intent&lt;/em&gt; and&lt;br&gt;
&lt;em&gt;refining output&lt;/em&gt; rather than solely writing line-by-line code. This&lt;br&gt;
demands a deeper understanding of the problem domain and the&lt;br&gt;
capabilities and limitations of AI, beyond mere syntax. The developer is&lt;br&gt;
no longer just a "coder" but an "AI orchestrator", who defines&lt;br&gt;
&lt;em&gt;what&lt;/em&gt; (the intent) and refines &lt;em&gt;how&lt;/em&gt; (the AI's output) through&lt;br&gt;
prompts.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;3.2. Understanding Foundational AI/Machine Learning Principles&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;A solid grounding in fundamental AI concepts such as machine learning,&lt;br&gt;
deep learning, and neural networks is essential. Developers need to&lt;br&gt;
grasp the intricacies of AI model operations, including how data is&lt;br&gt;
structured and processed for model training, optimizing data pipelines,&lt;br&gt;
and managing conversational states in chatbot applications. Crucially,&lt;br&gt;
developers must comprehend AI's limitations, such as its dependence on&lt;br&gt;
data quality, lack of common sense, contextual understanding, and&lt;br&gt;
difficulty with ambiguity. Knowledge of Python and its AI/ML libraries&lt;br&gt;
(TensorFlow, PyTorch, Hugging Face's Transformers) remains vital for&lt;br&gt;
algorithm development and model customization.&lt;/p&gt;

&lt;p&gt;A significant challenge is the "black box" problem and the need for&lt;br&gt;
explainability. AI models often produce results without a clear&lt;br&gt;
explanation of the underlying logic. This lack of transparency reduces&lt;br&gt;
trust, especially in sensitive fields like healthcare or law.&lt;br&gt;
Additionally, AI may lack a deep understanding of the broader context in&lt;br&gt;
which a software project operates, potentially overlooking specific&lt;br&gt;
business goals or features that don't align with the product's&lt;br&gt;
strategic vision. Therefore, developers cannot blindly trust&lt;br&gt;
AI-generated code or solutions. The skill is not just about &lt;em&gt;using&lt;/em&gt; AI,&lt;br&gt;
but &lt;em&gt;interrogating&lt;/em&gt; it. Developers need to develop skills in&lt;br&gt;
understanding model explainability, even if they are not building models&lt;br&gt;
from scratch. This includes asking the AI to explain its reasoning and&lt;br&gt;
understanding how to debug not just code, but &lt;em&gt;model behavior&lt;/em&gt;, which is&lt;br&gt;
a distinct challenge from traditional debugging. This capability is&lt;br&gt;
crucial for maintaining quality, security, and ethical standards.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;3.3. Enhanced Code Quality Assurance and Security&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Developers must critically evaluate AI-generated code for functional&lt;br&gt;
correctness, logical soundness, edge cases, and adherence to&lt;br&gt;
requirements. Static and dynamic code analysis skills are crucial for&lt;br&gt;
identifying syntax errors, coding standard violations, security&lt;br&gt;
vulnerabilities, and runtime issues. Human oversight remains essential&lt;br&gt;
to catch issues that automated tools might miss, such as duplicated&lt;br&gt;
code, "code smells," and subtle security vulnerabilities.&lt;br&gt;
Understanding common vulnerabilities (e.g., SQL injection, hardcoded&lt;br&gt;
credentials, XSS) and how AI can propagate them is critical.&lt;/p&gt;

&lt;p&gt;A paradox arises between efficiency and caution. AI promises to&lt;br&gt;
"accelerate coding workflows" and "faster PR turnaround". However,&lt;br&gt;
AI-generated code is not infallible; developers must carefully review&lt;br&gt;
suggestions, ensuring the code remains secure, efficient, and aligned&lt;br&gt;
with project-specific needs. AI-generated code can present a "polished&lt;br&gt;
facade" but function incorrectly, and this problem can be alleviated by&lt;br&gt;
human reviewers. The apparent speed and correctness of AI-generated code&lt;br&gt;
can create a false sense of security, potentially leading to reduced&lt;br&gt;
human oversight. This paradox means developers must actively resist the&lt;br&gt;
temptation to over-rely on AI for correctness and, instead, must&lt;br&gt;
intensify rigorous code review, security analysis, and testing. The&lt;br&gt;
skill is not just &lt;em&gt;how&lt;/em&gt; to review code, but the &lt;em&gt;discipline to&lt;br&gt;
scrutinize&lt;/em&gt; despite AI assistance, recognizing that AI's efficiency&lt;br&gt;
benefits must be balanced with human caution to prevent subtle yet&lt;br&gt;
critical errors or vulnerabilities from slipping into production.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;3.4. System Design, Architecture, and Integration&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Developers will increasingly act as "AI orchestrators," managing&lt;br&gt;
pipelines, models, data, and business logic. Systems thinking and&lt;br&gt;
architectural design skills are crucial for building scalable,&lt;br&gt;
intelligent systems, including microservices that can learn and adapt&lt;br&gt;
over time. Integrating AI capabilities into existing applications and&lt;br&gt;
infrastructure, including cloud-native development and&lt;br&gt;
Infrastructure-as-Code (IaC) tools, is paramount. Understanding how to&lt;br&gt;
make API requests and integrate AI functionalities into web applications&lt;br&gt;
is a key practical skill.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;3.5. AI-Assisted Debugging and Performance Optimization Proficiency&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Leveraging AI tools for troubleshooting involves understanding how to&lt;br&gt;
identify symptoms, use structured debugging approaches, and apply&lt;br&gt;
multi-language support tools. Specific skills include model training&lt;br&gt;
debugging (e.g., TensorFlow Debugger), identifying bottlenecks, and&lt;br&gt;
applying profiling techniques to enhance execution speed and efficiency.&lt;br&gt;
Developers must understand how to ask AI assistants to explain code&lt;br&gt;
sections, answer programming questions, and assist with performance&lt;br&gt;
analysis and debugging.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;3.6. Foundational Programming and API Interaction&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Proficiency in core programming languages like Python, Java, C++, and&lt;br&gt;
JavaScript remains essential, as AI tools augment rather than replace&lt;br&gt;
them. Python is particularly popular due to its rich AI/ML libraries.&lt;br&gt;
Mastering practical Python, including data structures (lists,&lt;br&gt;
dictionaries), organizing code with functions and files, and handling&lt;br&gt;
data formats (CSV, JSON), is crucial. Understanding API interaction,&lt;br&gt;
including secure authentication, optimizing performance with concurrent&lt;br&gt;
requests, and designing robust error handling, is critical for&lt;br&gt;
integrating AI functionalities.&lt;/p&gt;

&lt;p&gt;Amidst the hype of AI, the enduring value of "the basics" remains.&lt;br&gt;
Even the most advanced AI system becomes useless if it cannot be&lt;br&gt;
integrated into a functional application, which requires reliable code,&lt;br&gt;
proper database connections, and well-structured APIs. AI works best&lt;br&gt;
when the developer is already good at programming and doesn't want to&lt;br&gt;
bother learning technology-specific APIs. There's a risk that&lt;br&gt;
developers might de-emphasize foundational programming skills, assuming&lt;br&gt;
AI will handle everything. However, evidence suggests AI &lt;em&gt;augments&lt;/em&gt;, not&lt;br&gt;
&lt;em&gt;replaces&lt;/em&gt;, the need for core programming competence. Developers still&lt;br&gt;
need to understand underlying logic, debug AI-generated code, and&lt;br&gt;
integrate it into larger systems. "The basics" (data structures,&lt;br&gt;
algorithms, modularity, API interaction) become even more critical for&lt;br&gt;
evaluating AI output and building robust applications around&lt;br&gt;
AI-generated components. This implies that while the &lt;em&gt;volume&lt;/em&gt; of manual&lt;br&gt;
coding might decrease, the &lt;em&gt;quality&lt;/em&gt; and &lt;em&gt;understanding&lt;/em&gt; of foundational&lt;br&gt;
programming principles become paramount for effective AI collaboration.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;4. Essential Human-Centric Skills for the Augmented Developer&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frwi8lztv1n0mbx8zvbqh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frwi8lztv1n0mbx8zvbqh.png" alt="Image description" width="800" height="216"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;4.1. Critical Thinking and Problem-Solving&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The ability to evaluate information, question assumptions, and solve&lt;br&gt;
complex problems remains invaluable as AI handles routine tasks.&lt;br&gt;
Developers must guard against over-reliance on AI outputs, which can&lt;br&gt;
diminish independent problem-solving abilities and lead to a superficial&lt;br&gt;
understanding of coding principles. This includes checking for logical&lt;br&gt;
correctness, edge cases, unintended consequences in AI-generated code,&lt;br&gt;
and challenging AI's suggestions.&lt;/p&gt;

&lt;p&gt;A concerning risk is "cognitive atrophy" and the need for intentional&lt;br&gt;
engagement. Studies have shown that reliance on AI outputs can diminish&lt;br&gt;
an individual's cognitive ability, leading to a "potential erosion of&lt;br&gt;
essential analytical skills over time". Developers might become overly&lt;br&gt;
dependent on AI-generated suggestions, leading to skill degradation over&lt;br&gt;
time. This is a profound long-term implication. If developers passively&lt;br&gt;
accept AI suggestions, their critical thinking "muscles" (logic,&lt;br&gt;
creativity, experimentation) can atrophy. The skill is not just &lt;em&gt;having&lt;/em&gt;&lt;br&gt;
critical thinking, but &lt;em&gt;actively exercising it&lt;/em&gt; even when AI provides a&lt;br&gt;
solution. This requires a conscious effort to "review AI-generated&lt;br&gt;
code, ask hard questions, and strive to understand the underlying&lt;br&gt;
logic". It shifts the focus from efficiency at all costs to a balanced&lt;br&gt;
workflow that preserves human cognitive capabilities.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;4.2. Adaptability and Continuous Learning&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Adaptability is an imperative skill due to rapid changes in technology,&lt;br&gt;
with AI tools, automation, and orchestration improving almost daily.&lt;br&gt;
Cultivating a mindset of continuous learning, self-directed learning,&lt;br&gt;
and resourcefulness over rote memorization is crucial for staying&lt;br&gt;
relevant. This involves diving into diverse skill areas, leveraging&lt;br&gt;
learning opportunities, embracing failure, and being open to new&lt;br&gt;
perspectives.&lt;/p&gt;

&lt;p&gt;The rapid pace of technological change demands a "learning agility&lt;br&gt;
imperative." Technology evolves at breakneck speed, and adapting&lt;br&gt;
quickly is crucial. The AI landscape is rapidly evolving, and to keep&lt;br&gt;
up, developers need to be comfortable teaching themselves new frameworks&lt;br&gt;
and libraries. Flexible learning approaches and just-in-time learning&lt;br&gt;
are necessary. It's not merely about &lt;em&gt;learning&lt;/em&gt; new things; the pace of&lt;br&gt;
change demands the &lt;em&gt;speed and efficiency&lt;/em&gt; with which one can learn and&lt;br&gt;
integrate new knowledge. This "learning agility" means developers must&lt;br&gt;
be proficient at identifying what to learn, seeking out resources (e.g.,&lt;br&gt;
ChatGPT, Stack Overflow, documentation), and applying that knowledge&lt;br&gt;
quickly. This is a meta-skill that underpins all other technical and&lt;br&gt;
human skills in the AI era, as specific tools and techniques will&lt;br&gt;
constantly evolve.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;4.3. Collaboration and Communication&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Teamwork and effective collaboration are essential in an AI-augmented&lt;br&gt;
environment, especially with real-time code collaboration features in&lt;br&gt;
IDEs. Developers will increasingly collaborate with AI as a "coworker"&lt;br&gt;
or "on-demand expert". Cross-functional collaboration with data&lt;br&gt;
science, operations, and security teams will become more prevalent.&lt;br&gt;
Strong communication skills, including rhetoric and emotional&lt;br&gt;
intelligence, are crucial for influencing others and working effectively&lt;br&gt;
in a tech environment.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;4.4. Ethical AI Development and Responsible Practices&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Developers must actively participate in discussions around responsible&lt;br&gt;
AI, especially as regulations tighten globally. Key ethical&lt;br&gt;
considerations include fairness and bias, transparency, privacy, human&lt;br&gt;
safety, and environmental responsibility. Skills in bias mitigation&lt;br&gt;
techniques, data anonymization, auditable ML pipelines, and secure data&lt;br&gt;
handling are now part of the developer's toolkit. Understanding the&lt;br&gt;
"black box" problem and striving for explainability in AI systems is&lt;br&gt;
crucial for building trust. Human oversight is indispensable to ensure&lt;br&gt;
AI systems align with human values, laws, and company policies.&lt;/p&gt;

&lt;p&gt;The developer's role expands beyond merely writing functional code to&lt;br&gt;
becoming a "socio-technical guardian." With the immense power of AI&lt;br&gt;
comes the great human responsibility to ensure these technologies are&lt;br&gt;
developed and used ethically. Concerns include bias, discrimination, and&lt;br&gt;
misuse. The developer's role extends to being an "ethical code&lt;br&gt;
curator, ensuring transparency and safety". This means understanding&lt;br&gt;
the potential societal impact of AI models, proactively addressing&lt;br&gt;
biases in training data, ensuring data privacy, and designing&lt;br&gt;
transparent and accountable systems. This is not just about avoiding&lt;br&gt;
legal repercussions; it's about building trustworthy AI that aligns&lt;br&gt;
with human values. This implies the need for developers to engage with&lt;br&gt;
ethical frameworks, policy discussions, and diverse perspectives,&lt;br&gt;
transforming them into socio-technical experts.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;5. Navigating Challenges and Future Prospects&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyr4zihfvbzc8metrorj7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyr4zihfvbzc8metrorj7.png" alt="Image description" width="800" height="219"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;5.1. Addressing Over-Reliance on AI and Skill Degradation&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The risk of developers becoming overly dependent on AI-generated&lt;br&gt;
suggestions, leading to skill degradation in critical thinking,&lt;br&gt;
problem-solving, and debugging, is a significant concern. Mitigation&lt;br&gt;
strategies include maintaining a balanced workflow, regularly reviewing&lt;br&gt;
AI-generated code, and actively striving to understand the underlying&lt;br&gt;
logic.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;5.2. Mitigating Data Privacy and Security Risks&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Sharing proprietary code with external AI services can pose risks of&lt;br&gt;
intellectual property exposure. AI-powered tools can introduce security&lt;br&gt;
risks if trained on insecure code patterns or vulnerabilities.&lt;br&gt;
Strategies include using private instances of AI systems, establishing&lt;br&gt;
organizational agreements to prevent data use in future AI training&lt;br&gt;
models, and regularly scanning AI-generated code for vulnerabilities.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;5.3. Evolving Role: From Coder to AI Orchestrator and Architect&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The developer's mindset must evolve to prioritize automation, AI&lt;br&gt;
awareness, and user-centricity. New job roles blending traditional&lt;br&gt;
programming with oversight of AI-driven processes are emerging, such as&lt;br&gt;
AI model trainers and AI system controllers. Developers will&lt;br&gt;
increasingly manage pipelines, models, data, and business logic,&lt;br&gt;
focusing on user trust and compliance.&lt;/p&gt;

&lt;p&gt;The concept of "human-in-the-loop" is a strategic imperative. This&lt;br&gt;
refers to a partnership between machines and humans, where humans can&lt;br&gt;
harness AI's problem-solving abilities while maintaining oversight.&lt;br&gt;
Humans must monitor AI performance and can intervene when necessary,&lt;br&gt;
overriding AI decisions or providing alternative solutions. Human&lt;br&gt;
oversight is indispensable to ensure AI systems operate as expected and&lt;br&gt;
make decisions aligned with human values, laws, and company policies.&lt;br&gt;
This implies that developers need skills in monitoring AI systems,&lt;br&gt;
understanding when and how to intervene, and establishing feedback loops&lt;br&gt;
to continuously improve AI performance and align it with human values&lt;br&gt;
and project goals. It reinforces that AI is a tool, and human&lt;br&gt;
intelligence remains the ultimate decision-maker.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Conclusion: The Augmented Developer of Tomorrow&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The AI IDE era is fundamentally redefining the developer's skill set,&lt;br&gt;
moving beyond syntax mastery to encompass prompt engineering, AI/ML&lt;br&gt;
literacy, enhanced quality assurance, and systems-level thinking.&lt;br&gt;
Human-centric skills -- critical thinking, adaptability, collaboration,&lt;br&gt;
and ethical responsibility -- are not diminished but amplified, becoming&lt;br&gt;
differentiating factors in an increasingly automated landscape.&lt;/p&gt;

&lt;p&gt;Developers who embrace AI as a partner, commit to continuous learning,&lt;br&gt;
and uphold responsible practices will lead innovation and thrive in this&lt;br&gt;
evolving ecosystem. The future belongs to the augmented developer,&lt;br&gt;
capable of seamlessly blending human creativity with machine efficiency.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>development</category>
      <category>softwareengineering</category>
    </item>
    <item>
      <title>Building a Multi-Agent AI with LangGraph: A Comprehensive Guide</title>
      <dc:creator>Hulk Pham</dc:creator>
      <pubDate>Wed, 19 Feb 2025 16:54:11 +0000</pubDate>
      <link>https://dev.to/hulk-pham/building-a-multi-agent-ai-with-langgraph-a-comprehensive-guide-57nj</link>
      <guid>https://dev.to/hulk-pham/building-a-multi-agent-ai-with-langgraph-a-comprehensive-guide-57nj</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In the rapidly evolving world of conversational AI, designing agents that can handle complex workflows and interactions is more important than ever. LangGraph, an extension of LangChain, provides a graph-based approach to create structured and dynamic AI workflows. This guide will walk you through building an AI agent with LangGraph and highlight the &lt;a href="https://github.com/hulk-pham/LangGraph-AI-Agent" rel="noopener noreferrer"&gt;LangGraph-AI-Agent&lt;/a&gt; repository by hulk-pham—a project that demonstrates advanced multi-agent conversational systems, dynamic workflow orchestration, custom agent behaviors, and robust state management.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is LangGraph?
&lt;/h2&gt;

&lt;p&gt;LangGraph is an innovative framework that leverages directed graphs to model AI workflows. Unlike traditional sequential or decision-tree-based logic, LangGraph allows you to define nodes (representing tasks or actions) and edges (representing the flow of information) for more flexible and scalable AI applications.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Features:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Graph-based Execution:&lt;/strong&gt; Define workflows as nodes and edges.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Parallel Execution:&lt;/strong&gt; Run multiple tasks simultaneously.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;State Management:&lt;/strong&gt; Maintain context and handle conversation history.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Error Handling:&lt;/strong&gt; Gracefully manage and recover from failures.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Exploring the LangGraph-AI-Agent Repository
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://github.com/hulk-pham/LangGraph-AI-Agent" rel="noopener noreferrer"&gt;LangGraph-AI-Agent&lt;/a&gt; repository is a practical implementation that showcases how to build multi-agent conversational workflows using LangGraph. Here’s a quick overview of what the repository offers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Multi-Agent Conversations:&lt;/strong&gt; The project supports interactions between multiple AI agents, each designed for specific tasks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dynamic Workflow Orchestration:&lt;/strong&gt; Easily adapt and extend conversation flows as needed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Custom Agent Behaviors:&lt;/strong&gt; Define specialized behaviors for each agent to handle diverse queries.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;State Management:&lt;/strong&gt; Keep track of conversation context across interactions.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Repository Structure:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;├── agents/         # Agent definitions
├── graphs/         # Workflow graphs
├── utils/          # Helper functions
├── main.py         # Entry point for running the agent
└── requirements.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Getting Started: Installation &amp;amp; Setup
&lt;/h2&gt;

&lt;p&gt;Follow these steps to set up the project locally:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Clone the Repository:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/hulk-pham/LangGraph-AI-Agent.git
&lt;span class="nb"&gt;cd &lt;/span&gt;LangGraph-AI-Agent
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Create a Virtual Environment:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python3.12 &lt;span class="nt"&gt;-m&lt;/span&gt; venv .venv
&lt;span class="nb"&gt;source&lt;/span&gt; .venv/bin/activate
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Install Dependencies:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Set Environment Variables:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;OPENAI_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"your-api-key"&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;PATH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$PATH&lt;/span&gt;:/usr/local/mysql/bin
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Run the Agent:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python3 src/ai_core/main.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Creating a Simple AI Agent with LangGraph
&lt;/h2&gt;

&lt;p&gt;If you want to build your own agent from scratch or extend the existing implementation, here’s a basic outline of the process:&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Import Required Libraries
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;langchain.chat_models&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;ChatOpenAI&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;langgraph.graph&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;StateGraph&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;langgraph.graph.nodes&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;LLMNode&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2: Define the AI Model
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;llm&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;ChatOpenAI&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;model_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gpt-4&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;temperature&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 3: Create the Graph
&lt;/h3&gt;

&lt;p&gt;Define a simple workflow where the agent processes user input and generates a response:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Define the processing function
&lt;/span&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;process_query&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;user_input&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;query&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;llm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;invoke&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user_input&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;response&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;# Initialize the graph
&lt;/span&gt;&lt;span class="n"&gt;graph&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;StateGraph&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="c1"&gt;# Add the node to the graph
&lt;/span&gt;&lt;span class="n"&gt;node&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;LLMNode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;process_query&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;graph&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add_node&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;query_processor&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;node&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Set the entry point for the graph
&lt;/span&gt;&lt;span class="n"&gt;graph&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;set_entry_point&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;query_processor&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 4: Running the Agent
&lt;/h3&gt;

&lt;p&gt;Compile and run your graph:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Compile the graph
&lt;/span&gt;&lt;span class="n"&gt;executor&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;graph&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;compile&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="c1"&gt;# Run the agent with a user query
&lt;/span&gt;&lt;span class="n"&gt;user_input&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;What is LangGraph?&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="n"&gt;output&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;executor&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;invoke&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;query&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;user_input&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;output&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Enhancing Your AI Agent
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Adding Memory
&lt;/h3&gt;

&lt;p&gt;Leverage LangGraph’s state management to maintain context across interactions. This allows your agent to store conversation history and adapt responses accordingly.&lt;/p&gt;

&lt;h3&gt;
  
  
  Building Multi-Step Workflows
&lt;/h3&gt;

&lt;p&gt;Extend your graph by adding more nodes for tasks such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fetching external data via APIs.&lt;/li&gt;
&lt;li&gt;Performing calculations or database queries.&lt;/li&gt;
&lt;li&gt;Handling complex decision-making processes.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Customizing Agent Behaviors
&lt;/h3&gt;

&lt;p&gt;Modify or create new agents with specialized functions to suit different parts of your workflow, enabling a modular and scalable design.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;LangGraph offers a powerful and flexible framework for building advanced AI agents. Whether you're starting from scratch or building upon existing projects like the LangGraph-AI-Agent repository, you now have a robust foundation for designing conversational workflows that are both dynamic and scalable.&lt;/p&gt;

&lt;p&gt;Start experimenting with LangGraph today, and explore the endless possibilities of multi-agent conversational systems!&lt;/p&gt;




&lt;p&gt;Feel free to modify and expand upon this draft to better fit your style or to include more details from your repository. Happy coding!&lt;/p&gt;

&lt;h2&gt;
  
  
  Hire me?
&lt;/h2&gt;

&lt;p&gt;Contact me at &lt;a href="//www.linkedin.com/in/hulk-pham"&gt;Linkedin&lt;/a&gt;&lt;/p&gt;

</description>
      <category>llm</category>
      <category>langchain</category>
      <category>langgraph</category>
      <category>python</category>
    </item>
    <item>
      <title>The Complete Machine Learning Pipeline: From Data to Deployment</title>
      <dc:creator>Hulk Pham</dc:creator>
      <pubDate>Wed, 19 Feb 2025 16:46:44 +0000</pubDate>
      <link>https://dev.to/hulk-pham/the-complete-machine-learning-pipeline-from-data-to-deployment-24p2</link>
      <guid>https://dev.to/hulk-pham/the-complete-machine-learning-pipeline-from-data-to-deployment-24p2</guid>
      <description>&lt;p&gt;Machine Learning (ML) is revolutionizing industries by enabling automated decision-making, predictive analytics, and intelligent automation. However, building a successful ML model isn’t just about training an algorithm—it requires a structured pipeline that takes data from raw collection to real-world deployment. &lt;/p&gt;

&lt;p&gt;In this blog, we’ll walk through the &lt;strong&gt;end-to-end Machine Learning pipeline&lt;/strong&gt;, covering each stage and its significance.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;1. Data Collection&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The foundation of any ML project is &lt;strong&gt;data&lt;/strong&gt;. Without high-quality data, even the most sophisticated model will fail. Data can be gathered from various sources:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Databases&lt;/strong&gt;: SQL, NoSQL, cloud storage solutions like AWS S3, Google Cloud Storage.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;APIs&lt;/strong&gt;: Twitter API, Google Maps API, financial market data from Alpha Vantage.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Files&lt;/strong&gt;: CSV, JSON, Excel, Parquet.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Web Scraping&lt;/strong&gt;: BeautifulSoup, Scrapy for extracting information from websites.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;IoT Devices &amp;amp; Sensors&lt;/strong&gt;: Smart devices, industrial sensors, fitness trackers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Public Datasets&lt;/strong&gt;: Kaggle, UCI Machine Learning Repository, Google Dataset Search.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Key Considerations:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Ensure data is &lt;strong&gt;relevant&lt;/strong&gt; to the problem.&lt;/li&gt;
&lt;li&gt;Maintain &lt;strong&gt;data integrity&lt;/strong&gt; and avoid bias.&lt;/li&gt;
&lt;li&gt;Store data securely following privacy regulations (GDPR, HIPAA).&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;2. Data Preprocessing &amp;amp; Cleaning&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Raw data is often messy and requires cleaning before feeding it into an ML model. Common preprocessing steps include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Handling missing values&lt;/strong&gt;: Imputation (mean, median, mode), deletion, or using predictive models.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Removing duplicates and outliers&lt;/strong&gt;: Use statistical methods like Z-score or IQR.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Standardizing data formats&lt;/strong&gt;: Converting dates to a standard format, normalizing text.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Encoding categorical variables&lt;/strong&gt;: One-hot encoding, label encoding.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Feature scaling&lt;/strong&gt;: Normalization (MinMaxScaler) or Standardization (StandardScaler).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Popular Tools:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Pandas &amp;amp; NumPy&lt;/strong&gt;: Data manipulation and numerical computation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OpenCV&lt;/strong&gt;: Image processing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;NLTK &amp;amp; spaCy&lt;/strong&gt;: Natural language preprocessing.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;3. Feature Engineering&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Feature engineering is the process of transforming raw data into meaningful features that improve model performance. Techniques include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Feature selection&lt;/strong&gt;: Choosing relevant variables using methods like Recursive Feature Elimination (RFE).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Feature transformation&lt;/strong&gt;: Applying logarithmic transformations, polynomial features, and binning.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Feature extraction&lt;/strong&gt;: Techniques like Principal Component Analysis (PCA), TF-IDF for text data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Feature creation&lt;/strong&gt;: Aggregating data, domain-specific transformations, lag features for time series.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Popular Tools:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Scikit-learn&lt;/strong&gt;: Feature selection and transformation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Featuretools&lt;/strong&gt;: Automated feature engineering.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TensorFlow Transform&lt;/strong&gt;: Feature preprocessing for deep learning models.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;4. Data Splitting&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Before training a model, the dataset needs to be split into different subsets:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Training Set&lt;/strong&gt;: Used to train the model (~70-80% of the data).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Validation Set&lt;/strong&gt;: Used for tuning hyperparameters (~10-15%).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test Set&lt;/strong&gt;: Used for final evaluation (~10-15%).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Stratified sampling&lt;/strong&gt; is recommended for classification problems to maintain class distribution.&lt;/p&gt;

&lt;h3&gt;
  
  
  Common Methods:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;train_test_split&lt;/code&gt; from Scikit-learn.&lt;/li&gt;
&lt;li&gt;Cross-validation techniques like k-fold cross-validation.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;5. Model Selection&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Choosing the right algorithm depends on the type of ML problem:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Regression&lt;/strong&gt;: Linear Regression, Decision Trees, XGBoost, LightGBM.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Classification&lt;/strong&gt;: Logistic Regression, Random Forest, SVM, Deep Learning.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Clustering&lt;/strong&gt;: K-Means, DBSCAN, Hierarchical Clustering.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deep Learning&lt;/strong&gt;: CNNs for images, RNNs for sequential data, Transformers for NLP.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Frameworks:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;TensorFlow &amp;amp; PyTorch&lt;/strong&gt;: Deep learning.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scikit-learn&lt;/strong&gt;: Traditional ML models.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;XGBoost &amp;amp; LightGBM&lt;/strong&gt;: Gradient boosting models.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;6. Model Training&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Once an algorithm is selected, it is trained using the dataset:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Batch training&lt;/strong&gt; vs. &lt;strong&gt;Mini-batch gradient descent&lt;/strong&gt; for deep learning models.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Early stopping&lt;/strong&gt; to prevent overfitting.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Regularization techniques&lt;/strong&gt;: L1 (Lasso), L2 (Ridge), Dropout.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Transfer learning&lt;/strong&gt; for pre-trained deep learning models.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Key Considerations:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Monitor loss functions and convergence.&lt;/li&gt;
&lt;li&gt;Utilize GPU acceleration for deep learning.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;7. Model Evaluation&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;A trained model is only useful if it performs well on unseen data. Performance is measured using:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Regression Metrics&lt;/strong&gt;: RMSE, MAE, R².&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Classification Metrics&lt;/strong&gt;: Accuracy, Precision, Recall, F1-score, AUC-ROC.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Clustering Metrics&lt;/strong&gt;: Silhouette Score, Davies-Bouldin Index.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Tools:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Scikit-learn's &lt;code&gt;metrics&lt;/code&gt; module&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TensorFlow Model Analysis&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;8. Hyperparameter Tuning&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Fine-tuning model parameters can significantly improve performance. Methods include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Grid Search&lt;/strong&gt;: Exhaustive search over a parameter grid.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Random Search&lt;/strong&gt;: Randomly selecting hyperparameters.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bayesian Optimization&lt;/strong&gt;: Probabilistic search using Gaussian Processes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Genetic Algorithms&lt;/strong&gt;: Evolution-based tuning.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Tools:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Optuna, Hyperopt, GridSearchCV&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;9. Model Deployment&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Once the model is optimized, it needs to be deployed for real-world use:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;API-based deployment&lt;/strong&gt;: Using &lt;strong&gt;Flask&lt;/strong&gt; or &lt;strong&gt;FastAPI&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cloud deployment&lt;/strong&gt;: AWS SageMaker, GCP AI Platform, Azure ML.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Edge AI&lt;/strong&gt;: Deploying models on IoT devices using TensorFlow Lite, ONNX.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Containerization&lt;/strong&gt;: Docker, Kubernetes for scalable deployment.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;10. Monitoring &amp;amp; Maintenance&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;ML models require continuous monitoring to remain effective:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Detecting data drift&lt;/strong&gt;: Concept drift, covariate shift.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Logging model predictions&lt;/strong&gt; for auditing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Retraining with new data&lt;/strong&gt; periodically.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scaling and optimizing for performance&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Tools:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;MLflow&lt;/strong&gt;: Experiment tracking.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Evidently AI&lt;/strong&gt;: Model monitoring.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;11. Feedback &amp;amp; Continuous Improvement&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The ML pipeline is an &lt;strong&gt;iterative process&lt;/strong&gt;. New data, changing user behavior, and industry trends mean models must evolve over time. A strong feedback loop allows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Retraining with fresh data&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Adjusting hyperparameters&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deploying improved versions&lt;/strong&gt; of the model.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Final Thoughts&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Building a &lt;strong&gt;Machine Learning Pipeline&lt;/strong&gt; is a systematic approach to developing, deploying, and maintaining ML models efficiently. By following this structured workflow, businesses can scale AI applications, improve accuracy, and ensure reliable, real-time predictions.&lt;/p&gt;

&lt;p&gt;🔹 Do you have an ML project in mind? Share your thoughts in the comments! 🚀&lt;/p&gt;

&lt;h2&gt;
  
  
  Hire me?
&lt;/h2&gt;

&lt;p&gt;Contact me at &lt;a href="//www.linkedin.com/in/hulk-pham"&gt;Linkedin&lt;/a&gt;&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>deeplearning</category>
    </item>
    <item>
      <title>Getting Started with TensorFlow and Keras</title>
      <dc:creator>Hulk Pham</dc:creator>
      <pubDate>Wed, 19 Feb 2025 16:29:10 +0000</pubDate>
      <link>https://dev.to/hulk-pham/getting-started-with-tensorflow-and-keras-265b</link>
      <guid>https://dev.to/hulk-pham/getting-started-with-tensorflow-and-keras-265b</guid>
      <description>&lt;p&gt;Machine learning is one of the most exciting fields in modern technology, and TensorFlow and Keras are two of the most powerful tools for building AI models. Whether you're a beginner or an experienced developer, learning TensorFlow and Keras can open doors to new possibilities in deep learning. In this blog, we will walk through the basics of setting up TensorFlow and Keras, building your first neural network, and training a simple model.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Are TensorFlow and Keras?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;TensorFlow&lt;/strong&gt; is an open-source machine learning framework developed by Google. It provides a flexible ecosystem for building and deploying AI models.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keras&lt;/strong&gt; is a high-level neural network API that runs on top of TensorFlow, making it easier to build and train models with minimal code.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Comparing TensorFlow, Keras, and PyTorch
&lt;/h2&gt;

&lt;p&gt;While TensorFlow and Keras are widely used in deep learning, PyTorch is another popular framework developed by Facebook. Here’s a quick comparison:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;TensorFlow &amp;amp; Keras&lt;/th&gt;
&lt;th&gt;PyTorch&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Ease of Use&lt;/td&gt;
&lt;td&gt;Keras is beginner-friendly with simple APIs&lt;/td&gt;
&lt;td&gt;PyTorch offers dynamic computation graphs for flexibility&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Performance&lt;/td&gt;
&lt;td&gt;Optimized for large-scale deployments&lt;/td&gt;
&lt;td&gt;Preferred for research and experimentation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Community Support&lt;/td&gt;
&lt;td&gt;Strong industry and academic adoption&lt;/td&gt;
&lt;td&gt;Growing rapidly in the research community&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Debugging&lt;/td&gt;
&lt;td&gt;TensorFlow 2.0+ has better debugging tools&lt;/td&gt;
&lt;td&gt;PyTorch offers intuitive debugging with Pythonic code&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Deployment&lt;/td&gt;
&lt;td&gt;TensorFlow supports production deployment with TensorFlow Serving and TFLite&lt;/td&gt;
&lt;td&gt;PyTorch has TorchScript but is less mature for deployment&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;If you’re looking for easy-to-use tools for quick prototyping, &lt;strong&gt;Keras&lt;/strong&gt; is a great choice. If you need fine-grained control and dynamic computation graphs, &lt;strong&gt;PyTorch&lt;/strong&gt; is a better option.&lt;/p&gt;

&lt;h2&gt;
  
  
  Installing TensorFlow and Keras
&lt;/h2&gt;

&lt;p&gt;Before we start, ensure you have Python installed (preferably Python 3.7+). You can install TensorFlow using pip:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;tensorflow
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To check if TensorFlow is installed correctly, run the following in Python:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;tensorflow&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;tf&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tf&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;__version__&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you see a version number, you’re ready to go!&lt;/p&gt;

&lt;h2&gt;
  
  
  Example 1: Building Your First Neural Network
&lt;/h2&gt;

&lt;p&gt;Let's create a simple neural network using Keras. We'll use the &lt;strong&gt;MNIST dataset&lt;/strong&gt;, which consists of hand-written digits, and build a model to classify them.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Import Necessary Libraries
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;tensorflow&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;tf&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;tensorflow&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;keras&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;numpy&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;matplotlib.pyplot&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;plt&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2: Load and Preprocess Data
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Load dataset
&lt;/span&gt;&lt;span class="n"&gt;mnist&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;keras&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;datasets&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;mnist&lt;/span&gt;
&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x_train&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y_train&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x_test&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y_test&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;mnist&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;load_data&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="c1"&gt;# Normalize pixel values to be between 0 and 1
&lt;/span&gt;&lt;span class="n"&gt;x_train&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;x_test&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;x_train&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mf"&gt;255.0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;x_test&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mf"&gt;255.0&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 3: Define the Model
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;model&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;keras&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Sequential&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;
    &lt;span class="n"&gt;keras&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;layers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Flatten&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;input_shape&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;28&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;28&lt;/span&gt;&lt;span class="p"&gt;)),&lt;/span&gt;  &lt;span class="c1"&gt;# Input layer
&lt;/span&gt;    &lt;span class="n"&gt;keras&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;layers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Dense&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;128&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;activation&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;relu&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;  &lt;span class="c1"&gt;# Hidden layer
&lt;/span&gt;    &lt;span class="n"&gt;keras&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;layers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Dense&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;activation&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;softmax&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# Output layer
&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 4: Compile the Model
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;compile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;optimizer&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;adam&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="n"&gt;loss&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;sparse_categorical_crossentropy&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="n"&gt;metrics&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;accuracy&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 5: Train the Model
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x_train&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y_train&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;epochs&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 6: Evaluate the Model
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;test_loss&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;test_acc&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;evaluate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x_test&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y_test&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;verbose&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;Test accuracy: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;test_acc&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Making Predictions
&lt;/h2&gt;

&lt;p&gt;Once trained, you can use the model to make predictions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;predictions&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;predict&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x_test&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;argmax&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;predictions&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]))&lt;/span&gt;  &lt;span class="c1"&gt;# Predicted digit for first test image
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Example 2 Sentiment Analysis with TensorFlow and Keras
&lt;/h2&gt;

&lt;p&gt;Sentiment analysis is a common application of natural language processing (NLP) used to determine the sentiment behind a given text. With TensorFlow and Keras, we can easily build a sentiment analysis model.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Load the IMDB Dataset
&lt;/h3&gt;

&lt;p&gt;The &lt;strong&gt;IMDB dataset&lt;/strong&gt; is a collection of 50,000 movie reviews labeled as positive or negative. It is commonly used for binary sentiment classification tasks. You can read more about it &lt;a href="https://ai.stanford.edu/~amaas/data/sentiment/" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;tensorflow.keras.datasets&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;imdb&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;tensorflow.keras.preprocessing&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;sequence&lt;/span&gt;

&lt;span class="c1"&gt;# Load dataset
&lt;/span&gt;&lt;span class="n"&gt;max_features&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10000&lt;/span&gt;  &lt;span class="c1"&gt;# Vocabulary size
&lt;/span&gt;&lt;span class="n"&gt;maxlen&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;500&lt;/span&gt;  &lt;span class="c1"&gt;# Maximum length of sequences
&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x_train&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y_train&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x_test&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y_test&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;imdb&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;load_data&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;num_words&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;max_features&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Pad sequences to ensure uniform length
&lt;/span&gt;&lt;span class="n"&gt;x_train&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;sequence&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;pad_sequences&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x_train&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;maxlen&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;maxlen&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;x_test&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;sequence&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;pad_sequences&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x_test&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;maxlen&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;maxlen&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2: Build the Sentiment Analysis Model
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;model&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;keras&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Sequential&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;
    &lt;span class="n"&gt;keras&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;layers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Embedding&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;max_features&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;128&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="n"&gt;keras&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;layers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;LSTM&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;64&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;dropout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;0.2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;recurrent_dropout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;0.2&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="n"&gt;keras&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;layers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Dense&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;activation&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;sigmoid&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 3: Compile and Train the Model
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;compile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;loss&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;binary_crossentropy&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;optimizer&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;adam&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;metrics&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;accuracy&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x_train&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y_train&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;batch_size&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;32&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;epochs&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;validation_data&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x_test&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y_test&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 4: Evaluate and Predict
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;test_loss&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;test_acc&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;evaluate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x_test&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y_test&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;verbose&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;Test accuracy: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;test_acc&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Making a prediction
&lt;/span&gt;&lt;span class="n"&gt;sample_review&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;x_test&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;reshape&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;prediction&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;predict&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sample_review&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Positive&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;prediction&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mf"&gt;0.5&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Negative&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Congratulations! You have successfully built and trained your first neural network using TensorFlow and Keras. This is just the beginning—there's a lot more to explore, including convolutional neural networks (CNNs), recurrent neural networks (RNNs), and advanced deep learning techniques.&lt;/p&gt;

&lt;p&gt;Additionally, we explored sentiment analysis, a powerful application of deep learning in NLP. Try experimenting with different datasets and models to improve your understanding.&lt;/p&gt;

&lt;p&gt;If you're interested in diving deeper, check out the &lt;a href="https://www.tensorflow.org/" rel="noopener noreferrer"&gt;official TensorFlow documentation&lt;/a&gt; and experiment with different datasets and architectures. Happy coding!&lt;/p&gt;

&lt;h2&gt;
  
  
  Hire me?
&lt;/h2&gt;

&lt;p&gt;Contact me at &lt;a href="//www.linkedin.com/in/hulk-pham"&gt;Linkedin&lt;/a&gt;&lt;/p&gt;

</description>
      <category>tensorflow</category>
      <category>keras</category>
      <category>deeplearning</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>AWS Compute - Part 5: How to choose compute service</title>
      <dc:creator>Hulk Pham</dc:creator>
      <pubDate>Fri, 01 Nov 2024 14:51:57 +0000</pubDate>
      <link>https://dev.to/hulk-pham/aws-compute-part-5-how-to-choose-compute-service-1cmk</link>
      <guid>https://dev.to/hulk-pham/aws-compute-part-5-how-to-choose-compute-service-1cmk</guid>
      <description>&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Key Compute Options&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Amazon EC2 offers granular control, various instance types, and flexibility for managing infrastructure&lt;/li&gt;
&lt;li&gt;Containers provide lightweight, portable, and consistent application deployment across environments&lt;/li&gt;
&lt;li&gt;Serverless computing abstracts infrastructure management, allowing focus on code and rapid development&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;When to Choose Each Option&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use EC2 for compute-intensive applications, long-running stateful apps, or when full OS control is needed&lt;/li&gt;
&lt;li&gt;Choose containers for compute-intensive workloads, large monolithic applications, or when quick scaling is required&lt;/li&gt;
&lt;li&gt;Opt for serverless (Lambda) for short-lived applications (under 15 minutes), event-driven architectures, or when automatic scaling is desired&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Considerations&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;EC2 is versatile and suitable for a wide range of applications, offering various pricing models&lt;/li&gt;
&lt;li&gt;Containers are ideal for microservices architecture but may not be optimal for apps with complex persistent storage or networking requirements&lt;/li&gt;
&lt;li&gt;Serverless is best for small, simple applications that integrate multiple AWS services and don't require long execution times&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;I. Advantages of each compute type&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;1. Amazon EC2&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Amazon EC2 offers granular control for managing your infrastructure. It gives you the choice of over 500 instance types, with the latest processors, storage, OSs, and networking. An EC2 instance is a virtualized server running in the cloud. Whatever options you customize for a physical server can also be customized for EC2 instances. Amazon EC2 also offers instances that are optimized for certain performance needs or workload functions. Therefore, your applications can start on an instance built to accommodate that workload type.&lt;/p&gt;

&lt;p&gt;One advantage of using virtual servers is that you can build and deploy an instance in minutes. You can spin up an instance, test your application, and then delete the instance when you are done. Instances also offer you the flexibility to increase or decrease resources as your workload demands change, without affecting your application.&lt;/p&gt;

&lt;p&gt;When you choose to use EC2 instances, here is a list of benefits that you gain:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;With Amazon EC2, you can quickly build and start a new server: You don't need to rack the server, run cable, and update hardware drivers as you would do with a traditional server.&lt;/li&gt;
&lt;li&gt;You can scale capacity as needed, both up and down. This means that if you need more memory, processing, or storage, you can add it.&lt;/li&gt;
&lt;li&gt;Instances offer at least 99.99% (four nines) of availability. For more information on AWS and availability, see &lt;a href="https://aws.amazon.com/compute/sla/" rel="noopener noreferrer"&gt;Amazon Compute Service Level Agreement&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Amazon EC2 offers instances that are optimized for specific types of workloads, including memory optimized, compute optimized, storage optimized, accelerated computing, and general purpose.&lt;/li&gt;
&lt;li&gt;Various instance types are available with different pricing options, so you can choose the best option to fit your business requirements. These options include On-Demand Instances, Reserved Instances, and Spot Instances.&lt;/li&gt;
&lt;li&gt;Amazon EC2 gives you complete control over the instance, down to the root level. You can manage the instance as you would manage a physical server.&lt;/li&gt;
&lt;li&gt;You can use instances for long-running applications, especially those with state information and long-running computation cycles.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;2. Containers&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Containers provide a standard way to package your application's code, configurations, and dependencies into a single object. Containers share an OS installed on the server and run as resource-isolated processes, for quick, reliable, and consistent deployments, regardless of environment.&lt;/p&gt;

&lt;p&gt;Containers are lightweight, efficient, fast, and highly portable. Because the container holds all the files it needs to run, you can ensure a consistent performance from your application, regardless of the underlying components. This encapsulated application approach also caters for rapid deployment, patching, and scaling when needed. Because you don't need to worry about OS patches or security enhancements that might affect your applications, containers lend themselves nicely toward improved and accelerated development cycles.&lt;/p&gt;

&lt;p&gt;Here are some of the key features of the AWS container services:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The application is packaged so that you control the application and all associated resources, such as policies, security, and deployment.&lt;/li&gt;
&lt;li&gt;Containers are portable and can be moved to different OS or hardware platforms, and through different environments such as development, testing/staging, pre-production, and production.&lt;/li&gt;
&lt;li&gt;There are no time-out limits when running. This is useful for applications that run longer than 15 minutes or that need to initiate instantly when called.&lt;/li&gt;
&lt;li&gt;Containers run without the startup latency of Lambda or Amazon EC2.&lt;/li&gt;
&lt;li&gt;Containers have no size limit. They can be as large or as small as you need them to be.&lt;/li&gt;
&lt;li&gt;Containers are useful when taking a large traditional application and breaking it down into small parts, or microservices, to make the application more scaleable and resilient.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;3. Serverless&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;One of the major benefits of cloud computing is its ability to abstract (hide) the infrastructure layer. Therefore, you don't need to manually manage the underlying physical hardware. In a serverless environment, the abstraction is one layer higher. Not only is the physical infrastructure abstracted, but the instances and the operating systems on which AWS Lambda is running, are also abstracted. With this higher level abstraction in place, you can focus on the code for your applications without spending time building, maintaining, and patching the underlying infrastructure, hosts, and operating systems.&lt;/p&gt;

&lt;p&gt;With serverless applications, there are never instances, OSs, or servers to manage. AWS handles everything required to run and scale your application.&lt;/p&gt;

&lt;p&gt;By building serverless applications, your developers can focus on the code that makes your business unique.&lt;/p&gt;

&lt;p&gt;If you are considering putting your workload into a serverless environment but aren't sure, the following list has some considerations when deciding on a serverless architecture.&lt;/p&gt;

&lt;p&gt;To learn more about reasons to choose a serverless solution for your application, expand each of the following six categories.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Fast development&lt;/strong&gt;&lt;br&gt;
You might need to develop applications quickly and might not have the time to build and maintain the underlying infrastructure.&lt;/p&gt;

&lt;p&gt;Using a serverless solution, you and your developers can focus on building and refining your applications without spending time managing and maintaining servers.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Pay for value&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You only pay for the time that your application runs. This model helps keep costs down so that you aren't paying for time when your application is idle.&lt;/p&gt;

&lt;p&gt;The AWS Lambda free tier includes one million free requests per month and 400,000 GB-seconds of compute time per month&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Short-lived applications&lt;/strong&gt;&lt;br&gt;
Lambda is a suitable choice for any short-lived application that can finish running in under 15 minutes.&lt;/p&gt;

&lt;p&gt;If an application needs to run longer than 15 minutes, it's no longer cost effective to use Lambda. Instead, consider other solutions.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Event-driven applications&lt;/strong&gt;&lt;br&gt;
You might need event-initiated, or event-driven, stateless applications that need quick response times.&lt;/p&gt;

&lt;p&gt;An event-driven architecture uses events to initiate actions and communication between decoupled services. An event is a change in state, a user request, or an update, such as an item being placed in a shopping cart in an ecommerce website. When an event occurs, the information is published for other services to consume it.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Automatic scaling&lt;/strong&gt;&lt;br&gt;
If you do not want, or need, to managing resource scaling, a serverless architecture is something to consider.&lt;/p&gt;

&lt;p&gt;When you use Lambda, the service is responsible for all the resources required to run your application. If your application suddenly needs more resources, Lamdba adjusts your resource consumption up or down to maintain consistent application performance during peak utilization and off-hour timeframes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Redundancy and resilience&lt;/strong&gt;&lt;br&gt;
The AWS Global Infrastructure is built around AWS Regions and Availability Zones. Regions provide multiple physically separated and isolated Availability Zones, which are connected with low-latency, high-throughput, and highly redundant networking.&lt;/p&gt;

&lt;p&gt;Lambda runs your function in multiple Availability Zones to ensure that it is available to process events in case of a service interruption in a single zone.&lt;/p&gt;

&lt;p&gt;Lambda also provides additional resilience features such as versioning, reserved resources, retries, and the previously mentioned automatic scaling capability.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  II. &lt;strong&gt;Choosing a Compute Option for your Workload&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;1. Amazon EC2 considerations&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;With Amazon EC2, you have complete control of your computing resources. Amazon EC2 reduces the time required to obtain and start new server instances to minutes. Therefore, you can quickly scale capacity up or down as your computing requirements change.&lt;/p&gt;

&lt;p&gt;Because EC2 instances are virtualized servers in the cloud, they lend themselves to support a large variety of applications. Anything you can run on a physical server can be run on Amazon EC2. Whether you need a small instance type or a robust instance type with multiple processors, and extra memory, Amazon EC2 is a versatile platform for all of your application needs.&lt;/p&gt;

&lt;p&gt;Here are some application characteristics that lend themselves to run best when using Amazon EC2.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;When you have compute-intensive or memory-intensive applications, consider the following:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;You can select a specific instance type based on the requirements of the application or software that you plan to run on your instance.

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Amazon EC2 provides each instance with a consistent and predictable amount of CPU capacity,&lt;/strong&gt; regardless of its underlying hardware.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Amazon EC2 gives you the &lt;strong&gt;choice of OSs and software packages.&lt;/strong&gt; You can select a configuration of memory, CPU, instance storage, and a boot partition size that is optimal for your choice of OS and application.&lt;/li&gt;

&lt;li&gt;You have &lt;strong&gt;access to the underlying files&lt;/strong&gt; of the instance to customize or update as needed.&lt;/li&gt;

&lt;/ul&gt;

&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Amazon EC2 works with other AWS services to provide a complete solution&lt;/strong&gt; for computing, query processing, and storage across a wide range of applications.

&lt;ul&gt;
&lt;li&gt;From a performance perspective, &lt;strong&gt;you can use instances for long-running, stateful applications.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;You can determine the type and size or your storage,&lt;/strong&gt; whether to use block or file storage.&lt;/li&gt;
&lt;li&gt;Amazon EC2 can support workloads where &lt;strong&gt;complex networking, security, and storage&lt;/strong&gt; is required, in addition to applications and workloads with heavy computational requirements.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;EC2 instances are &lt;strong&gt;optimized for use cases&lt;/strong&gt; such as compute optimized, storage optimized, general purpose, or accelerated computing.&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Amazon EC2 is versatile and reliable&lt;/strong&gt;. You can run a simple website or you can run a vast, complex, custom-built application, and when necessary, replacement instances can be rapidly and predictably deployed.&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Pricing is pay for what you use.&lt;/strong&gt; There are also different types of pricing models so you can select the type of instance and the pricing model that fits your budget.&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;2. Considerations for containers&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Some application characteristics lend themselves to run optimally in a containerized environment. Here are some factors to consider for your application to see if containers are appropriate.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When to consider containers&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;For compute-intensive workloads&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Applications that are compute intensive run better in a container environment. If you have a small application that runs under in 15 minutes but is compute intensive, consider using a container. Lambda is not the best fit for a heavily compute-intensive piece of code.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;For large monolithic applications&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;These are appropriate candidates to move to containers. &lt;strong&gt;Large monoliths that have many parts&lt;/strong&gt; are very suitable applications to consider moving to containers.&lt;/li&gt;
&lt;li&gt;You can break apart applications and run them as independent components, called &lt;strong&gt;microservices, using containers to isolate processes&lt;/strong&gt;.

&lt;ul&gt;
&lt;li&gt;By using microservices, you can break large applications into smaller, self-contained pieces.&lt;/li&gt;
&lt;li&gt;Segmenting a larger application means that updates can be applied on only specific parts. Because each part of the larger application resides in its own container, an update that might have affected files used by a different piece of the application is isolated to its own container.&lt;/li&gt;
&lt;li&gt;With containers, you can do &lt;strong&gt;frequent updates&lt;/strong&gt; by pushing out new containers, without the concern that one set of updates might break another part of the application. If you detect any issues, you have the flexibility to undo the change quickly.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;When you need to scale quickly&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Containers can be built and taken down quickly, which means fast application deployment and scaling.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;When you need to&lt;/strong&gt; &lt;strong&gt;move your large application to the cloud without altering the code&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;With containers, you can package entire applications and move them to the cloud without the need to make any code changes.&lt;/li&gt;
&lt;li&gt;Your application can be as large as you need it to be and can run as long as you require it to run.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;When not to use containers&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;When applications need persistent data storage&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Containers can absolutely support persistent storage; however, it tends to be easier to containerize applications that don't require persistent storage. Persistent storage requirements increase the security and storage complexity and also make the containers less portable. If the container is moved, the storage needs to be reconfigured and secured.Applications that have no state information and don't require complex persistent storage would be better candidates for using a container solution than an application with complex storage needs.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;When applications have complex networking, routing, or security requirements&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Containers are portable and can be moved through different environments (testing, staging, production). If the application requires a complex configuration for networking, routing, storage, and so on, the containers are much more challenging to move.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;3. Considerations for serverless applications&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Consider the characteristics of applications that lend themselves to run optimally in a serverless environment:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Are you building, testing, and deploying applications frequently and &lt;strong&gt;want to focus only on your code and not on infrastructure?&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Are your applications &lt;strong&gt;less compute intensive&lt;/strong&gt;?&lt;/li&gt;
&lt;li&gt;Are the applications that you are running or building &lt;strong&gt;small, simple, or modular&lt;/strong&gt;?

&lt;ul&gt;
&lt;li&gt;Simple applications, such as chatbots or to-do lists that people can use to modify a list of things that they need to do, are good choices to move to serverless.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Will you be using multiple AWS services&lt;/strong&gt; &lt;strong&gt;where one service might need to call another service?&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;For example, if someone uploads a file to Amazon Simple Storage Service (Amazon S3), will you then need to invoke other workflows to log the update or convert the file to HTML? Serverless is a very appropriate fit when you need one action to invoke other workflows within AWS.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Do your applications finish quickly&lt;/strong&gt;?

&lt;ul&gt;
&lt;li&gt;Serverless is most suitable for &lt;strong&gt;applications that don't run longer than 15 minutes&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Large, long-running, workloads, are expensive to run on serverless and not an optimal fit for this compute type.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;4. Putting it all together&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;John is confident that he can now distinguish between the AWS Compute types and explain which types use Amazon EC2 instances and which types are run serverlessly. Sofia wants to make sure he grasps the nuances of the services. She asks him how he would summarize the three options, he shows her his notes which read:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Amazon EC2 are &lt;strong&gt;virtual server instances&lt;/strong&gt; in the cloud.&lt;/li&gt;
&lt;li&gt;Amazon ECS, Amazon EKS: Container management services that can run containers on either &lt;strong&gt;customer managed Amazon EC2 instances&lt;/strong&gt; OR as an &lt;strong&gt;AWS managed serverless offering&lt;/strong&gt; running containers on AWS Fargate.&lt;/li&gt;
&lt;li&gt;AWS Lambda is &lt;strong&gt;Serverless compute&lt;/strong&gt; for running stateless code in response to triggers.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;John took a moment to draw an image depicting the abstraction of the compute services from the instance based compute to the serverless solutions.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbgtei8fv1zv8sahe7om7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbgtei8fv1zv8sahe7om7.png" alt="compare description" width="800" height="343"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>cloud</category>
      <category>ec2</category>
      <category>lambda</category>
    </item>
    <item>
      <title>AWS Cloud Essential Series</title>
      <dc:creator>Hulk Pham</dc:creator>
      <pubDate>Thu, 31 Oct 2024 09:35:24 +0000</pubDate>
      <link>https://dev.to/hulk-pham/aws-cloud-essential-series-1ggm</link>
      <guid>https://dev.to/hulk-pham/aws-cloud-essential-series-1ggm</guid>
      <description>&lt;p&gt;Welcome to our comprehensive guide on AWS essentials! In this blog series, we'll explore the fundamental building blocks of Amazon Web Services (AWS), the leading cloud computing platform. Whether you're a beginner looking to start your cloud journey or an IT professional aiming to expand your knowledge, this series will provide you with valuable insights into key AWS services and concepts.&lt;/p&gt;

&lt;p&gt;Our study notes cover a wide range of topics, from basic cloud concepts to advanced services, organized into the following categories:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Basic Concepts:&lt;/strong&gt; We'll start with an introduction to cloud computing, AWS global infrastructure, and the shared responsibility model.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Identity and Access Management:&lt;/strong&gt; Learn about securing your AWS resources with IAM.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Computing:&lt;/strong&gt; Dive into various compute options, including virtual machines, containerization, serverless computing, and auto-scaling.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Networking:&lt;/strong&gt; Understand the fundamentals of AWS networking with Virtual Private Cloud (VPC).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Storage:&lt;/strong&gt; Explore different storage types, file systems, and object storage solutions offered by AWS.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Database:&lt;/strong&gt; Get to know AWS's diverse database offerings, including DynamoDB and purpose-built databases.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Monitoring:&lt;/strong&gt; Learn how to keep track of your AWS resources with CloudWatch.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each topic is covered in-depth, providing you with the knowledge you need to confidently work with AWS services. Let's embark on this exciting journey through the world of AWS!&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;List post details&lt;/strong&gt;
&lt;/h2&gt;




&lt;p&gt;&lt;strong&gt;Basic Concepts:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/hulk-pham/cloud-computing-job-role-and-caf-2g53"&gt;AWS Cloud Computing, Job Role and CAF&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/hulk-pham/aws-global-infrastructure-28d3"&gt;AWS Global Infrastructure&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/hulk-pham/aws-shared-responsibility-model-202p"&gt;AWS Shared Responsibility Model&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Identity and Access Management:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/hulk-pham/aws-identity-and-access-management-21j"&gt;AWS Identity and Access Management&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Computing:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/hulk-pham/aws-compute-part-1-virtual-machines-vms-2i9o"&gt;AWS Compute - Part 1: Virtual Machines (VMs)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/hulk-pham/aws-compute-part-2-containerization-34pb"&gt;AWS Compute - Part 2: Containerization&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/hulk-pham/aws-compute-part-3-serverless-lambda-and-fargate-2lj0"&gt;AWS Compute - Part 3: Serverless, Lambda and Fargate&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/hulk-pham/aws-compute-part-4-load-balancer-and-autoscaling-2c41"&gt;AWS Compute - Part 4: Load Balancer and Autoscaling&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/hulk-pham/aws-compute-part-5-how-to-choose-compute-service-1cmk"&gt;AWS Compute - Part 5: How to choose compute service&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Networking:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/hulk-pham/aws-networking-vpc-1dl9"&gt;AWS Networking - VPC&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Storage:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/hulk-pham/aws-storage-part-1-storage-types-g97"&gt;AWS Storage - Part 1: Storage Types&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/hulk-pham/aws-storage-part-2-efs-and-fsx-1bmf"&gt;AWS Storage - Part 2: EFS and FSx&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/hulk-pham/aws-storage-part-3-instance-store-and-ebs-3be"&gt;AWS Storage - Part 3: Instance Store and EBS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/hulk-pham/aws-storage-part-4-amazon-s3-1kki"&gt;AWS Storage - Part 4: Amazon S3&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Database:&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/hulk-pham/aws-database-part-1-aws-rds-1a33"&gt;AWS Database - Part 1: AWS RDS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/hulk-pham/aws-database-part-2-dynamodb-391e"&gt;AWS Database - Part 2: DynamoDB&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/hulk-pham/aws-database-part-3-purpose-built-databases-4bb4"&gt;AWS Database - Part 3: Purpose-Built Databases&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Monitoring:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/hulk-pham/aws-monitoring-part-1-aws-cloudwatch-3amh"&gt;AWS Monitoring - Part 1: AWS CloudWatch&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This study guide is inspired by and references content from AWS Skill Builder. We acknowledge AWS as the original source of much of this information. The guide is intended for educational purposes only and is not an official AWS product.&lt;/p&gt;

&lt;p&gt;If you have any concerns regarding copyright or the use of AWS-related content, please contact us at &lt;a href="//mailto:tanhunghue@gmail.com"&gt;tanhunghue@gmail.com&lt;/a&gt;. We are committed to respecting intellectual property rights and will promptly address any issues.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>cloud</category>
      <category>techlead</category>
      <category>webdev</category>
    </item>
    <item>
      <title>AWS Compute - Part 4: Load Balancer and Autoscaling</title>
      <dc:creator>Hulk Pham</dc:creator>
      <pubDate>Thu, 31 Oct 2024 09:21:09 +0000</pubDate>
      <link>https://dev.to/hulk-pham/aws-compute-part-4-load-balancer-and-autoscaling-2c41</link>
      <guid>https://dev.to/hulk-pham/aws-compute-part-4-load-balancer-and-autoscaling-2c41</guid>
      <description>&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;High Availability and Load Balancing&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;High availability is crucial for systems, often expressed as a percentage of uptime or number of nines&lt;/li&gt;
&lt;li&gt;Elastic Load Balancing (ELB) distributes incoming traffic across multiple targets, improving availability and scalability&lt;/li&gt;
&lt;li&gt;ELB offers three types: Application Load Balancer (ALB), Network Load Balancer (NLB), and Gateway Load Balancer (GLB), each suited for different use cases&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Amazon EC2 Auto Scaling&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;EC2 Auto Scaling automatically adds or removes EC2 instances based on defined policies, ensuring optimal performance and cost-efficiency&lt;/li&gt;
&lt;li&gt;Auto Scaling groups define where resources are deployed, specifying VPC, subnets, and instance purchase options&lt;/li&gt;
&lt;li&gt;Launch templates or configurations specify the resources to be scaled, including AMI, instance type, and security groups&lt;/li&gt;
&lt;li&gt;Scaling policies determine when to add or remove instances, using CloudWatch metrics and alarms to trigger actions&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  I. High Availability
&lt;/h2&gt;

&lt;p&gt;The availability of a system is typically expressed as a percentage of uptime in a given year or as a number of nines. In the following table is a list of availability percentages based on the downtime per year and its notation in nines.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;strong&gt;Availability (%)&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Downtime (per year)&lt;/strong&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;90% (one nine of availability)&lt;/td&gt;
&lt;td&gt;36.53 days&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;99% (two nines of availability)&lt;/td&gt;
&lt;td&gt;3.65 days&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;99.9% (three nines of availability)&lt;/td&gt;
&lt;td&gt;8.77 hours&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;99.95% (three and a half nines of availability)&lt;/td&gt;
&lt;td&gt;4.38 hours&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;99.99% (four nines of availability)&lt;/td&gt;
&lt;td&gt;52.60 minutes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;99.995% (four and a half nines of availability)&lt;/td&gt;
&lt;td&gt;26.30 minutes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;99.999% (five nines of availability)&lt;/td&gt;
&lt;td&gt;5.26 minutes&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;To increase availability, you need redundancy. This typically means more infrastructure—more data centers, more servers, more databases, and more replication of data. You can imagine that adding more of this infrastructure means a higher cost. Customers want the application to always be available, but you need to draw a line where adding redundancy is no longer viable in terms of revenue.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;1. Why improve application availability?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;In the current application, one EC2 instance hosts the application. The photos are served from Amazon S3, and the structured data is stored in Amazon DynamoDB. That single EC2 instance is a single point of failure for the application.&lt;/p&gt;

&lt;p&gt;Even if the database and Amazon S3 are highly available, customers have no way to connect if the single instance becomes unavailable. One way to solve this single point of failure issue is to add one more server in a second Availability Zone.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;2. Adding a second Availability Zone&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The physical location of a server is important. In addition to potential software issues at the operating system (OS) or application level, you must also consider hardware issues. They might be in the physical server, the rack, the data center, or even the Availability Zone hosting the virtual machine. To remedy the physical location issue, you can deploy a second EC2 instance in a second Availability Zone. This second instance might also solve issues with the OS and the application.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmxium9etqguc4gvfj510.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmxium9etqguc4gvfj510.png" alt="VPC_subnets description" width="800" height="445"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;However, when there is more than one instance, it brings new challenges, such as the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Replication process –&lt;/strong&gt; The first challenge with multiple EC2 instances is that you need to create a process to replicate the configuration files, software patches, and application across instances. The best method is to automate where you can.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Customer redirection –&lt;/strong&gt; The second challenge is how to notify the clients—the computers sending requests to your server—about the different servers. You can use various tools here. The most common is using a Domain Name System (DNS) where the client uses one record that points to the IP address of all available servers.&lt;/p&gt;

&lt;p&gt;However, this method isn't always used because of propagation — the time frame it takes for DNS changes to be updated across the Internet.&lt;/p&gt;

&lt;p&gt;Another option is to use a load balancer, which takes care of health checks and distributing the load across each server. Situated between the client and the server, a load balancer avoids propagation time issues. You will learn more about load balancers in the next section.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Types of high availability –&lt;/strong&gt; The last challenge to address when there is more than one server is the type of availability you need: active-passive or active-active.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. High availability categories.
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Active-passive systems&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;With an active-passive system, only one of the two instances is available at a time. One advantage of this method is that for stateful applications (where data about the client’s session is stored on the server), there won’t be any issues. This is because the customers are always sent to the server where their session is stored.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Active-active systems&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A disadvantage of an active-passive system is scalability. This is where an active-active system shines. With both servers available, the second server can take some load for the application, and the entire system can take more load. However, if the application is stateful, there would be an issue if the customer’s session isn’t available on both servers. Stateless applications work better for active-active systems.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;II. Elastic Load Balancing&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The Elastic Load Balancing (ELB) service can distribute incoming application traffic across EC2 instances, containers, IP addresses, and Lambda functions.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;1. Load balancers&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Load balancing refers to the process of distributing tasks across a set of resources. In the case of the Employee Directory application, the resources are EC2 instances that host the application, and the tasks are the requests being sent. You can use a load balancer to distribute the requests across all the servers hosting the application.&lt;/p&gt;

&lt;p&gt;To do this, the load balancer needs to take all the traffic and redirect it to the backend servers based on an algorithm. The most popular algorithm is round robin, which sends the traffic to each server one after the other.&lt;/p&gt;

&lt;p&gt;A typical request for an application starts from a client's browser. The request is sent to a load balancer. Then, it’s sent to one of the EC2 instances that hosts the application. The return traffic goes back through the load balancer and back to the client's browser.&lt;/p&gt;

&lt;p&gt;Although it is possible to install your own software load balancing solution on EC2 instances, AWS provides the ELB service for you.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsfk07j2ybc1qmdes1s99.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsfk07j2ybc1qmdes1s99.png" alt="ELB_arch description" width="800" height="346"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;2. ELB features&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The ELB service provides a major advantage over using your own solution to do load balancing. Mainly, you don’t need to manage or operate ELB. It can distribute incoming application traffic across EC2 instances, containers, IP addresses, and Lambda functions. Other key features include the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Hybrid mode –&lt;/strong&gt; Because ELB can load balance to IP addresses, it can work in a hybrid mode, which means it also load balances to on-premises servers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;High availability –&lt;/strong&gt; ELB is highly available. The only option you must ensure is that the load balancer's targets are deployed across multiple Availability Zones.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scalability –&lt;/strong&gt; In terms of scalability, ELB automatically scales to meet the demand of the incoming traffic. It handles the incoming traffic and sends it to your backend application.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;3. Health checks&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Monitoring is an important part of load balancers because they should route traffic to only healthy EC2 instances. That’s why ELB supports two types of health checks as follows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Establishing a connection to a backend EC2 instance using TCP and marking the instance as available if the connection is successful.&lt;/li&gt;
&lt;li&gt;Making an HTTP or HTTPS request to a webpage that you specify and validating that an HTTP response code is returned.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Taking time to define an appropriate health check is critical. Only verifying that the port of an application is open doesn’t mean that the application is working. It also doesn’t mean that making a call to the home page of an application is the right way either.&lt;/p&gt;

&lt;p&gt;For example, the Employee Directory application depends on a database and Amazon S3. The health check should validate all the elements. One way to do that is to create a monitoring webpage, such as &lt;strong&gt;/monitor&lt;/strong&gt;. It will make a call to the database to ensure that it can connect, get data, and make a call to Amazon S3. Then, you point the health check on the load balancer to the &lt;strong&gt;/monitor&lt;/strong&gt; page.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj14lnpth8x04isget7sj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj14lnpth8x04isget7sj.png" alt="health_check description" width="800" height="329"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After determining the availability of a new EC2 instance, the load balancer starts sending traffic to it. If ELB determines that an EC2 instance is no longer working, it stops sending traffic to it and informs Amazon EC2 Auto Scaling. It is the responsibility of Amazon EC2 Auto Scaling to remove that instance from the group and replace it with a new EC2 instance. Traffic is only sent to the new instance if it passes the health check.&lt;/p&gt;

&lt;p&gt;If Amazon EC2 Auto Scaling has a scaling policy that calls for a scale down action, it informs ELB that the EC2 instance will be terminated. ELB can prevent Amazon EC2 Auto Scaling from terminating an EC2 instance until all connections to the instance end. It also prevents any new connections. This feature is called connection draining. We will learn more about Amazon EC2 Auto Scaling in the next lesson.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;4. ELB components&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The ELB service is made up of three main components: rules, listeners, and target groups.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc7rkqfmaxsermu0jiz6s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc7rkqfmaxsermu0jiz6s.png" alt="ELB_service_updated description" width="800" height="577"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rule&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To associate a target group to a listener, you must use a rule. Rules are made up of two conditions. The first condition is the source IP address of the client. The second condition decides which target group to send the traffic to.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Listener&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The client connects to the listener. This is often called client side. To define a listener, a port must be provided in addition to the protocol, depending on the load balancer type. There can be many listeners for a single load balancer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Target group&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The backend servers, or server side, are defined in one or more target groups. This is where you define the type of backend you want to direct traffic to, such as EC2 instances, Lambda functions, or IP addresses. Also, a health check must be defined for each target group.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;5. Types of load balancers&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;We will cover three types of load balancers: Application Load Balancer (ALB), Network Load Balancer (NLB), and Gateway Load Balancer (GLB).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A. Application Load Balancer&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For our Employee Directory application, we are using an Application Load Balancer. An Application Load Balancer functions at Layer 7 of the Open Systems Interconnection (OSI) model. It is ideal for load balancing HTTP and HTTPS traffic. After the load balancer receives a request, it evaluates the listener rules in priority order to determine which rule to apply. It then routes traffic to targets based on the request content.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Primary features of an Application Load Balancer:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Routes traffic based on request data&lt;/p&gt;

&lt;p&gt;An Application Load Balancer makes routing decisions based on the HTTP and HTTPS protocol. For example, the ALB could use the URL path (/upload) and host, HTTP headers and method, or the source IP address of the client. This facilitates granular routing to target groups.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Sends responses directly to the client&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An Application Load Balancer can reply directly to the client with a fixed response, such as a custom HTML page. It can also send a redirect to the client. This is useful when you must redirect to a specific website or redirect a request from HTTP to HTTPS. It removes that work from your backend servers.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Uses TLS offloading&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An Application Load Balancer understands HTTPS traffic. To pass HTTPS traffic through an Application Load Balancer, an SSL certificate is provided one of the following ways:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Importing a certificate by way of IAM or ACM services&lt;/li&gt;
&lt;li&gt;Creating a certificate for free using ACM&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This ensures that the traffic between the client and Application Load Balancer is encrypted.&lt;/p&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Authenticates users&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An Application Load Balancer can authenticate users before they can pass through the load balancer. The Application Load Balancer uses the OpenID Connect (OIDC) protocol and integrates with other AWS services to support protocols, such as the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SAML&lt;/li&gt;
&lt;li&gt;Lightweight Directory Access Protocol (LDAP)&lt;/li&gt;
&lt;li&gt;Microsoft Active Directory&lt;/li&gt;
&lt;li&gt;Others&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Secures traffic&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To prevent traffic from reaching the load balancer, you configure a security group to specify the supported IP address ranges.&lt;/p&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Supports sticky sessions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If requests must be sent to the same backend server because the application is stateful, use the sticky session feature. This feature uses an HTTP cookie to remember which server to send the traffic to across connections.&lt;/p&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;B. Network Load Balancer&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A Network Load Balancer is ideal for load balancing TCP and UDP traffic. It functions at Layer 4 of the OSI model, routing connections from a target in the target group based on IP protocol data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Primary features of an Network Load Balancer:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Sticky sessions&lt;/strong&gt;
Routes requests from the same client to the same target.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Low latency&lt;/strong&gt;
Offers low latency for latency-sensitive applications.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Source IP address&lt;/strong&gt;
Preserves the client-side source IP address.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Static IP support&lt;/strong&gt;
Automatically provides a static IP address per Availability Zone (subnet).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Elastic IP address support&lt;/strong&gt;
Lets users assign a custom, fixed IP address per Availability Zone (subnet).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DNS failover&lt;/strong&gt;
Uses Amazon Route 53 to direct traffic to load balancer nodes in other zones.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;C. Gateway Load Balancer&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A Gateway Load Balancer helps you to deploy, scale, and manage your third-party appliances, such as firewalls, intrusion detection and prevention systems, and deep packet inspection systems. It provides a gateway for distributing traffic across multiple virtual appliances while scaling them up and down based on demand.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Primary features of an Gateway Load Balancer:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;High availability&lt;/strong&gt;
Ensures high availability and reliability by routing traffic through healthy virtual appliances.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Monitoring&lt;/strong&gt;
Can be monitored using CloudWatch metrics.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Streamlined deployments&lt;/strong&gt;
Can deploy a new virtual appliance by selecting it in the AWS Marketplace.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Private connectivity&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Connects internet gateways, virtual private clouds (VPCs), and other network resources over a private network.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;6. Selecting between ELB types&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;You can select between the ELB service types by determining which feature is required for your application. The following table presents a list of some of the major features of load balancers. For a complete list, see "Elastic Load Balancing features" in the Resources section at the end of this lesson.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;strong&gt;Feature&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;ALB&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;NLB&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;GLB&lt;/strong&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Load Balancer Type&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Layer 7&lt;/td&gt;
&lt;td&gt;Layer 4&lt;/td&gt;
&lt;td&gt;Layer 3 gateway and Layer 4 load balancing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Target Type&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;IP, instance, Lambda&lt;/td&gt;
&lt;td&gt;IP, instance, ALB&lt;/td&gt;
&lt;td&gt;IP, instance&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Protocol Listeners&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;HTTP, HTTPS&lt;/td&gt;
&lt;td&gt;TCP, UDP, TLS&lt;/td&gt;
&lt;td&gt;IP&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Static IP and Elastic IP Address&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Preserve Source IP Address&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Fixed Response&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;User Authentication&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;III. Amazon EC2 Auto Scaling&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Amazon EC2 Auto Scaling helps you maintain application availability. You can automatically add or remove EC2 instances using scaling policies that you define.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;1. Capacity issues&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;You can improve availability and reachability by adding one more server. However, the entire system can again become unavailable if there is a capacity issue. This section looks at load issues for both active-passive systems and active-active systems. These issues are addressed through scaling.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A. Vertical Scaling&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Increase the instance size.&lt;/strong&gt; If too many requests are sent to a single active-passive system, the active server will become unavailable and, hopefully, fail over to the passive server. But this doesn’t solve anything.&lt;/p&gt;

&lt;p&gt;With active-passive systems, you need vertical scaling. This means increasing the size of the server. With EC2 instances, you select either a larger type or a different instance type. This can be done only while the instance is in a stopped state. In this scenario, the following steps occur:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Stop the passive instance.&lt;/strong&gt; This doesn’t impact the application because it’s not taking any traffic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Change the instance size or type,&lt;/strong&gt; and then start the instance again.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shift the traffic&lt;/strong&gt; to the passive instance, turning it active.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stop, change the size, and start&lt;/strong&gt; the previous active instance because both instances should match.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;When the number of requests reduces, you must do the same operation. Even though there aren’t that many steps involved, it’s actually a lot of manual work. Another disadvantage is that a server can only scale vertically up to a certain limit. When that limit is reached, the only option is to create another active-passive system and split the requests and functionalities across them. This can require massive application rewriting.&lt;/p&gt;

&lt;p&gt;This is where the active-active system can help. When there are too many requests, you can scale this system horizontally by adding more servers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;B. Horizontal Scaling&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Add additional instances.&lt;/strong&gt; As mentioned, for the application to work in an active-active system, it’s already created as stateless, not storing any client sessions on the server. This means that having two or four servers wouldn’t require any application changes. It would only be a matter of creating more instances when required and shutting them down when traffic decreases. The Amazon EC2 Auto Scaling service can take care of that task by automatically creating and removing EC2 instances based on metrics from Amazon CloudWatch. We will learn more about this service in this lesson.&lt;/p&gt;

&lt;p&gt;You can see that there are many more advantages to using an active-active system in comparison with an active-passive system. Modifying your application to become stateless provides scalability.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;2. Traditional scaling compared to auto scaling&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;With a traditional approach to scaling, you buy and provision enough servers to handle traffic at its peak. However, this means at nighttime, for example, you might have more capacity than traffic, which means you’re wasting money. Turning off your servers at night or at times when the traffic is lower only saves on electricity.&lt;/p&gt;

&lt;p&gt;The cloud works differently with a pay-as-you-go model. You must turn off the unused services, especially EC2 instances you pay for on-demand. You can manually add and remove servers at a predicted time. But with unusual spikes in traffic, this solution leads to a waste of resources with over-provisioning or a loss of customers because of under-provisioning.&lt;/p&gt;

&lt;p&gt;The need here is for a tool that automatically adds and removes EC2 instances according to conditions you define. That’s exactly what the Amazon EC2 Auto Scaling service does.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;3. Amazon EC2 Auto Scaling features&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The Amazon EC2 Auto Scaling service adds and removes capacity to keep a steady and predictable performance at the lowest possible cost. By adjusting the capacity to exactly what your application uses, you only pay for what your application needs. This means Amazon EC2 Auto Scaling helps scale your infrastructure and ensure high availability.&lt;/p&gt;

&lt;p&gt;Scaling features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Automatic scaling
Automatically scales in and out based on demand.Click to flip&lt;/li&gt;
&lt;li&gt;Scheduled scaling
Scales based on user-defined schedules.Click to flip&lt;/li&gt;
&lt;li&gt;Fleet management
Automatically replaces unhealthy EC2 instances.Click to flip&lt;/li&gt;
&lt;li&gt;Predictive scaling
Uses machine learning (ML) to help schedule the optimum number of EC2 instances.Click to flip&lt;/li&gt;
&lt;li&gt;Purchase options
Includes multiple purchase models, instance types, and Availability Zones.Click to flip&lt;/li&gt;
&lt;li&gt;Amazon EC2 availability
Comes with the Amazon EC2 service.Click to flip&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;4. ELB with Amazon EC2 Auto Scaling&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Additionally, the ELB service integrates seamlessly with Amazon EC2 Auto Scaling. As soon as a new EC2 instance is added to or removed from the Amazon EC2 Auto Scaling group, ELB is notified. However, before ELB can send traffic to a new EC2 instance, it needs to validate that the application running on the EC2 instance is available.&lt;/p&gt;

&lt;p&gt;This validation is done by way of the ELB health checks feature you learned about in the previous lesson.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;IV. Configure Amazon EC2 Auto Scaling components&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;There are three main components of Amazon EC2 Auto Scaling. Each of these components addresses one main question as follows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Launch template or configuration:&lt;/strong&gt; Which resources should be automatically scaled?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Amazon EC2 Auto Scaling groups:&lt;/strong&gt; Where should the resources be deployed?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scaling policies:&lt;/strong&gt; When should the resources be added or removed?&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;1. Launch templates and configurations&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Multiple parameters are required to create EC2 instances—Amazon Machine Image (AMI) ID, instance type, security group, additional Amazon EBS volumes, and more. All this information is also required by Amazon EC2 Auto Scaling to create the EC2 instance on your behalf when there is a need to scale. This information is stored in a launch template.&lt;/p&gt;

&lt;p&gt;You can use a launch template to manually launch an EC2 instance or for use with Amazon EC2 Auto Scaling. It also supports versioning, which can be used for quickly rolling back if there's an issue or a need to specify a default version of the template. This way, while iterating on a new version, other users can continue launching EC2 instances using the default version until you make the necessary changes.&lt;/p&gt;

&lt;p&gt;A launch template specifies instance configuration information, such as the ID of the AMI, instance type, and security groups. You can have multiple versions of a launch template with a subset of the full parameters.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8tnixxmny5lil7ogjj25.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8tnixxmny5lil7ogjj25.png" alt="launch_template_2 description" width="800" height="272"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can create a launch template in one of three ways as follows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use an existing EC2 instance. All the settings are already defined.&lt;/li&gt;
&lt;li&gt;Create one from an already existing template or a previous version of a launch template.&lt;/li&gt;
&lt;li&gt;Create a template from scratch. These parameters will need to be defined: AMI ID, instance type, key pair, security group, storage, and resource tags.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Another way to define what Amazon EC2 Auto Scaling needs to scale is by using a launch configuration. It’s similar to the launch template, but you cannot use a previously created launch configuration as a template. You cannot create a launch configuration from an existing Amazon EC2 instance. For these reasons, and to ensure that you get the latest features from Amazon EC2, AWS recommends you use a launch template instead of a launch configuration.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;2. Amazon EC2 Auto Scaling groups&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The next component Amazon EC2 Auto Scaling needs is an Amazon EC2 Auto Scaling group. An Auto Scaling group helps you define where Amazon EC2 Auto Scaling deploys your resources. This is where you specify the Amazon Virtual Private Cloud (Amazon VPC) and subnets the EC2 instance should be launched in. Amazon EC2 Auto Scaling takes care of creating the EC2 instances across the subnets, so select at least two subnets that are across different Availability Zones.&lt;/p&gt;

&lt;p&gt;With Auto Scaling groups, you can specify the type of purchase for the EC2 instances. You can use On-Demand Instances or Spot Instances. You can also use a combination of the two, which means you can take advantage of Spot Instances with minimal administrative overhead.&lt;/p&gt;

&lt;p&gt;To specify how many instances Amazon EC2 Auto Scaling should launch, you have three capacity settings to configure for the group size.&lt;/p&gt;

&lt;p&gt;To learn more, choose each of the three numbered markers.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmew3fhpl3vui3oaz27z8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmew3fhpl3vui3oaz27z8.png" alt="auto_scaling_group description" width="800" height="431"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Minimum capacity&lt;/strong&gt;&lt;br&gt;
This is the minimum number of instances running in your Auto Scaling group, even if the threshold for lowering the number of instances is reached.&lt;br&gt;
When Amazon EC2 Auto Scaling removes EC2 instances because the traffic is minimal, it keeps removing EC2 instances until it reaches a minimum capacity. &lt;br&gt;
When reaching that limit, even if Amazon EC2 Auto Scaling is instructed to remove an instance, it does not. This ensures that the minimum is kept.&lt;br&gt;
&lt;strong&gt;Note:&lt;/strong&gt; Depending on your application, using a minimum of two is recommended to ensure high availability. However, you ultimately know how many EC2 instances at a bare minimum your application requires at all times.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Desired capacity&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The desired capacity is the number of EC2 instances that Amazon EC2 Auto Scaling creates at the time the group is created. This number can only be within or equal to the minimum or maximum.&lt;/p&gt;

&lt;p&gt;If that number decreases, Amazon EC2 Auto Scaling removes the oldest instance by default. If that number increases, Amazon EC2 Auto Scaling creates new instances using the launch template.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Maximum capacity&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is the maximum number of instances running in your Auto Scaling group, even if the threshold for adding new instances is reached.&lt;/p&gt;

&lt;p&gt;When traffic keeps growing, Amazon EC2 Auto Scaling keeps adding EC2 instances. This means the cost for your application will also keep growing. That’s why you must set a maximum amount to ensure it doesn’t go above your budget.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;3. Scaling policies&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;By default, an Auto Scaling group will be kept to its initial desired capacity. While it’s possible to manually change the desired capacity, you can also use scaling policies.&lt;/p&gt;

&lt;p&gt;In the Monitoring lesson, you learned about CloudWatch metrics and alarms. You use metrics to keep information about different attributes of your EC2 instance, such as the CPU percentage. You use alarms to specify an action when a threshold is reached. Metrics and alarms are what scaling policies use to know when to act. For example, you can set up an alarm that states when the CPU utilization is above 70 percent across the entire fleet of EC2 instances. It will then invoke a scaling policy to add an EC2 instance.&lt;/p&gt;

&lt;p&gt;Three types of scaling policies are available: simple, step, and target tracking scaling. To learn about a category, choose the appropriate tab.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Simple Scaling Policy&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;With a simple scaling policy, you can do exactly what’s described in this module. You use a CloudWatch alarm and specify what to do when it is invoked. This can include adding or removing a number of EC2 instances or specifying a number of instances to set the desired capacity to. You can specify a percentage of the group instead of using a number of EC2 instances, which makes the group grow or shrink more quickly.&lt;/p&gt;

&lt;p&gt;After the scaling policy is invoked, it enters a cooldown period before taking any other action. This is important because it takes time for the EC2 instances to start, and the CloudWatch alarm might still be invoked while the EC2 instance is booting. For example, you might decide to add an EC2 instance if the CPU utilization across all instances is above 65 percent. You don’t want to add more instances until that new EC2 instance is accepting traffic. However, what if the CPU utilization is now above 85 percent across the Auto Scaling group?&lt;/p&gt;

&lt;p&gt;Adding one instance might not be the right move. Instead, you might want to add another step in your scaling policy. Unfortunately, a simple scaling policy can’t help with that. This is where a step scaling policy helps.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step Scaling Policy&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Step scaling policies respond to additional alarms even when a scaling activity or health check replacement is in progress. Similar to the previous example, you might decide to add two more instances when CPU utilization is at 85 percent and four more instances when it’s at 95 percent.&lt;/p&gt;

&lt;p&gt;Deciding when to add and remove instances based on CloudWatch alarms might seem like a difficult task. This is why the third type of scaling policy exists—target tracking.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Target Tracking Scaling Policy&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If your application scales based on average CPU utilization, average network utilization (in or out), or request count, then this scaling policy type is the one to use. All you need to provide is the target value to track, and it automatically creates the required CloudWatch alarms.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>cloud</category>
      <category>loadbalancer</category>
      <category>autoscaling</category>
    </item>
    <item>
      <title>AWS Monitoring - Part 1: AWS CloudWatch</title>
      <dc:creator>Hulk Pham</dc:creator>
      <pubDate>Thu, 31 Oct 2024 08:45:33 +0000</pubDate>
      <link>https://dev.to/hulk-pham/aws-monitoring-part-1-aws-cloudwatch-3amh</link>
      <guid>https://dev.to/hulk-pham/aws-monitoring-part-1-aws-cloudwatch-3amh</guid>
      <description>&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Introduction to Monitoring&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Monitoring collects and analyzes data about operational health and usage of resources, helping to answer questions about system performance and issues&lt;/li&gt;
&lt;li&gt;Metrics are individual data points created by resources, which become statistics when collected and analyzed over time&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Benefits of Monitoring&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Enables proactive response to operational issues, improves performance and reliability, and helps recognize security threats&lt;/li&gt;
&lt;li&gt;Facilitates data-driven decisions and creates cost-effective solutions by optimizing resource usage&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Amazon CloudWatch&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CloudWatch is a centralized monitoring and observability service that collects resource data and provides actionable insights&lt;/li&gt;
&lt;li&gt;It offers features like anomaly detection, alarms, log analysis, and automated actions&lt;/li&gt;
&lt;li&gt;CloudWatch Logs allows for centralized storage and analysis of log files from various AWS services and applications&lt;/li&gt;
&lt;li&gt;CloudWatch alarms can be set up to automatically initiate actions based on sustained state changes of metrics, helping prevent and troubleshoot issues&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  I. Mornitoring Intruduction
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;1. Purpose of monitoring&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;When operating a website like the employee directory application on AWS, you might have questions like the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How many people are visiting my site day to day?&lt;/li&gt;
&lt;li&gt;How can I track the number of visitors over time?&lt;/li&gt;
&lt;li&gt;How will I know if the website is having performance or availability issues?&lt;/li&gt;
&lt;li&gt;What happens if my Amazon Elastic Compute Cloud (Amazon EC2) instance runs out of capacity?&lt;/li&gt;
&lt;li&gt;Will I be alerted if my website goes down?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You need a way to collect and analyze data about the operational health and usage of your resources. The act of collecting, analyzing, and using data to make decisions or answer questions about your IT resources and systems is called monitoring.&lt;/p&gt;

&lt;p&gt;Monitoring provides a near real-time pulse on your system and helps answer the previous questions. You can use the data you collect to watch for operational issues caused by events like overuse of resources, application flaws, resource misconfiguration, or security-related events. Think of the data collected through monitoring as outputs of the system, or metrics.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;2. Use metrics to solve problems&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The AWS resources that host your solutions create various forms of data that you might be interested in collecting. Each individual data point that a resource creates is a metric. Metrics that are collected and analyzed over time become statistics, such as average CPU utilization over time showing a spike.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvy0o5u9uwbjv7x4x4ljg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvy0o5u9uwbjv7x4x4ljg.png" alt="CPUUtilization description" width="800" height="537"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One way to evaluate the health of an EC2 instance is through CPU utilization. Generally speaking, if an EC2 instance has a high CPU utilization, it can mean a flood of requests. Or it can reflect a process that has encountered an error and is consuming too much of the CPU. When analyzing CPU utilization, take a process that exceeds a specific threshold for an unusual length of time. Use that abnormal event as a cue to either manually or automatically resolve the issue through actions like scaling the instance.&lt;/p&gt;

&lt;p&gt;CPU utilization is one example of a metric. Other examples of metrics that EC2 instances have are network utilization, disk performance, memory utilization, and the logs created by the applications running on top of Amazon EC2.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;3. Types of metrics&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Different resources in AWS create different types of metrics. To see examples of metrics associated with different resources, flip each of the following flashcards by choosing them.****&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Amazon Simple Storage Service (Amazon S3) metrics&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;◦ Size of objects stored in a bucket&lt;/p&gt;

&lt;p&gt;◦ Number of objects stored in a bucket&lt;/p&gt;

&lt;p&gt;◦ Number of HTTP request made to a bucket&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Amazon Relational Database Service (Amazon RDS) metrics&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;◦ Database connections&lt;/p&gt;

&lt;p&gt;◦ CPU utilization of an instance&lt;/p&gt;

&lt;p&gt;◦ Disk space consumption&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Amazon EC2 metrics&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;◦ CPU utilization&lt;/p&gt;

&lt;p&gt;◦ Network utilization&lt;/p&gt;

&lt;p&gt;◦ Disk performance&lt;/p&gt;

&lt;p&gt;◦ Status checks&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;4. Monitoring benefits&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Monitoring gives you visibility into your resources, but the question now is, "Why is that important?" This section describes some of the benefits of monitoring.&lt;/p&gt;

&lt;p&gt;To learn more, expand each of the following five categories.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Respond proactively&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Respond to operational issues proactively before your end users are aware of them.&lt;/strong&gt; Waiting for end users to let you know when your application is experiencing an outage is a bad practice. Through monitoring, you can keep tabs on metrics like error response rate and request latency. Over time, the metrics help signal when an outage is going to occur. You can automatically or manually perform actions to prevent the outage from happening and fix the problem before your end users are aware of it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Improve performance and reliability&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Monitoring can improve the performance and reliability of your resources.&lt;/strong&gt; Monitoring the various resources that comprise your application provides you with a full picture of how your solution behaves as a system. Monitoring, if done well, can illuminate bottlenecks and inefficient architectures. This helps you drive performance and improve reliability.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Recognize security threats and events&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;By monitoring, you can recognize security threats and events.&lt;/strong&gt; When you monitor resources, events, and systems over time, you create what is called a baseline. A baseline defines normal activity. Using a baseline, you can spot anomalies like unusual traffic spikes or unusual IP addresses accessing your resources. When an anomaly occurs, an alert can be sent out or an action can be taken to investigate the event.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Make data-driven decisions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Monitoring helps you make data-driven decisions for your business.&lt;/strong&gt; Monitoring keeps an eye on IT operational health and drives business decisions. For example, suppose you launched a new feature for your cat photo app and now you want to know if it’s being used. You can collect application-level metrics and view the number of users who use the new feature. With your findings, you can decide whether to invest more time into improving the new feature.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create cost-effective solutions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Through monitoring, you can create more cost-effective solutions.&lt;/strong&gt; You can view resources that are underused and rightsize your resources to your usage. This helps you optimize cost and make sure you aren’t spending more money than necessary.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;II. Amazon CloudWatch&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;1. Visibility using CloudWatch&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;AWS resources create data that you can monitor through metrics, logs, network traffic, events, and more. This data comes from components that are distributed in nature. This can lead to difficulty in collecting the data you need if you don’t have a centralized place to review it all. AWS has taken care of centralizing the data collection for you with a service called CloudWatch.&lt;/p&gt;

&lt;p&gt;CloudWatch is a monitoring and observability service that collects your resource data and provides actionable insights into your applications. With CloudWatch, you can respond to system-wide performance changes, optimize resource usage, and get a unified view of operational health.&lt;/p&gt;

&lt;p&gt;You can use CloudWatch to do the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Detect anomalous behavior in your environments.&lt;/li&gt;
&lt;li&gt;Set alarms to alert you when something is not right.&lt;/li&gt;
&lt;li&gt;Visualize logs and metrics with the AWS Management Console.&lt;/li&gt;
&lt;li&gt;Take automated actions like scaling.&lt;/li&gt;
&lt;li&gt;Troubleshoot issues.&lt;/li&gt;
&lt;li&gt;Discover insights to keep your applications healthy.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;2. How CloudWatch works&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;With CloudWatch, all you need to get started is an AWS account. It is a managed service that you can use for monitoring without managing the underlying infrastructure.&lt;/p&gt;

&lt;p&gt;To learn more, choose each numbered marker.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyukdtfig3dq4zx8axu1w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyukdtfig3dq4zx8axu1w.png" alt="How_CW_works2 description" width="800" height="218"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Collect&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Collect metrics and logs from your resources, applications, and services that run on AWS or on-premises servers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Monitor&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Visualize applications and infrastructure with dashboards. Troubleshoot with correlated logs and metrics, and set alerts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Act&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Automate responses to operational changes with CloudWatch events and auto scaling.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Analyze&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Up to 1-second metrics, extended data retention (15 months), and real-time analysis with CloudWatch metric math.&lt;/p&gt;

&lt;p&gt;The employee directory application is built with various AWS services working together as building blocks. Monitoring the individual services independently can be challenging. Fortunately, CloudWatch acts as a centralized place where metrics are gathered and analyzed.&lt;/p&gt;

&lt;p&gt;Many AWS services automatically send metrics to CloudWatch for free at a rate of 1 data point per metric per 5-minute interval. This is called basic monitoring, and it gives you visibility into your systems without any extra cost. For many applications, basic monitoring is adequate.&lt;/p&gt;

&lt;p&gt;For applications running on EC2 instances, you can get more granularity by posting metrics every minute instead of every 5-minutes using a feature like detailed monitoring. Detailed monitoring incurs a fee. For more information about pricing, see "Amazon CloudWatch Pricing" in the Resources section at the end of this lesson.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;3. CloudWatch concepts&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Metrics are the fundamental concept in CloudWatch. A metric represents a time-ordered set of data points that are published to CloudWatch. Think of a metric as a variable to monitor and the data points as representing the values of that variable over time. Every metric data point must be associated with a timestamp.&lt;/p&gt;

&lt;p&gt;To learn more, choose each numbered marker.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcj4n74h0t5w7sklyot9w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcj4n74h0t5w7sklyot9w.png" alt="cloudwatch_metrics description" width="800" height="376"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Metric&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Metrics are data about the performance of your systems.&lt;/p&gt;

&lt;p&gt;For example, the CPU usage of a particular EC2 instance is one metric provided by Amazon EC2.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Timestamp&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Each metric data point must be associated with a timestamp. If you do not provide a timestamp, CloudWatch creates one for you based on the time the data point was received.&lt;/p&gt;

&lt;p&gt;AWS services that send data to CloudWatch attach dimensions to each metric. A dimension is a name and value pair that is part of the metric’s identity. You can use dimensions to filter the results that CloudWatch returns. For example, many Amazon EC2 metrics publish &lt;strong&gt;InstanceId&lt;/strong&gt; as a dimension name and the actual instance ID as the value for that dimension.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F13hyc51bj8jns5lpkkxa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F13hyc51bj8jns5lpkkxa.png" alt="cloudwatch_view_metrics_2 description" width="800" height="223"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;By default, many AWS services provide metrics at no charge for resources such as EC2 instances, Amazon Elastic Block Store (Amazon EBS) volumes, and Amazon RDS database (DB) instances. For a charge, you can activate features such as detailed monitoring or publishing your own application metrics on resources such as your EC2 instances.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;4. Custom metrics&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Suppose you have an application, and you want to record the number of page views your website gets. How would you record this metric with CloudWatch? First, it's an application-level metric. That means it’s not something the EC2 instance would post to CloudWatch by default. This is where custom metrics come in. With custom metrics, you can publish your own metrics to CloudWatch.&lt;/p&gt;

&lt;p&gt;If you want to gain more granular visibility, you can use high-resolution custom metrics, which make it possible for you to collect custom metrics down to a 1-second resolution. This means you can send 1 data point per second per custom metric.&lt;/p&gt;

&lt;p&gt;Some examples of custom metrics include the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Webpage load times&lt;/li&gt;
&lt;li&gt;Request error rates&lt;/li&gt;
&lt;li&gt;Number of processes or threads on your instance&lt;/li&gt;
&lt;li&gt;Amount of work performed by your application&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;5. CloudWatch dashboards&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Once you provision your AWS resources and they are sending metrics to CloudWatch, you can visualize and review that data using CloudWatch dashboards. Dashboards are customizable home pages you can configure for data visualization for one or more metrics through widgets, such as a graph or text.&lt;/p&gt;

&lt;p&gt;You can build many custom dashboards, each one focusing on a distinct view of your environment. You can even pull data from different AWS Regions into a single dashboard to create a global view of your architecture. The following screenshot an example of a dashboard with metrics from Amazon EC2 and Amazon EBS.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7dbeb541bdywa7i5gk26.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7dbeb541bdywa7i5gk26.png" alt="cloudwatch_dash description" width="752" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;CloudWatch aggregates statistics according to the period of time that you specify when creating your graph or requesting your metrics. You can also choose whether your metric widgets display live data. Live data is data published within the last minute that has not been fully aggregated.&lt;/p&gt;

&lt;p&gt;You are not bound to using CloudWatch exclusively for all your visualization needs. You can use external or custom tools to ingest and analyze CloudWatch metrics using the GetMetricData API.&lt;/p&gt;

&lt;p&gt;As far as security is concerned, with AWS Identity and Access Management (IAM) policies, you control who has access to view or manage your CloudWatch dashboards.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;6. Amazon CloudWatch Logs&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;CloudWatch Logs is centralized place for logs to be stored and analyzed. With this service, you can monitor, store, and access your log files from applications running on EC2 instances, AWS Lambda functions, and other sources.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi94tsmsia89mceztmf2j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi94tsmsia89mceztmf2j.png" alt="cloudwatch_log_streams description" width="800" height="360"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With CloudWatch Logs, you can query and filter your log data. For example, suppose you’re looking into an application logic error for your application. You know that when this error occurs, it will log the stack trace. Because you know it logs the error, you query your logs in CloudWatch Logs to find the stack trace. You also set up metric filters on logs, which turn log data into numerical CloudWatch metrics that you can graph and use on your dashboards.&lt;/p&gt;

&lt;p&gt;Some services, like Lambda, are set up to send log data to CloudWatch Logs with minimal effort. With Lambda, all you need to do is give the Lambda function the correct IAM permissions to post logs to CloudWatch Logs. Other services require more configuration. For example, to send your application logs from an EC2 instance into CloudWatch Logs, you need to install and configure the CloudWatch Logs agent on the EC2 instance. With the CloudWatch Logs agent, EC2 instances can automatically send log data to CloudWatch Logs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CloudWatch Logs terminology&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Log data sent to CloudWatch Logs can come from different sources, so it’s important you understand how they’re organized.&lt;/p&gt;

&lt;p&gt;To learn more about logs terminology, choose each of the three numbered markers.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5gipyyv0hbr2orvv8dph.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5gipyyv0hbr2orvv8dph.png" alt="CloudWatch_Logs_Terms description" width="800" height="505"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Log event&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A log event is a record of activity recorded by the application or resource being monitored. It has a timestamp and an event message.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Log stream&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Log events are grouped into log streams, which are sequences of log events that all belong to the same resource being monitored.&lt;/p&gt;

&lt;p&gt;For example, logs for an EC2 instance are grouped together into a log stream that you can filter or query for insights.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Log group&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A log group is composed of log streams that all share the same retention and permissions settings.&lt;/p&gt;

&lt;p&gt;For example, suppose you have multiple EC2 instances hosting your application and you send application log data to CloudWatch Logs. You can group the log streams from each instance into one log group.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;7. CloudWatch alarms&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;You can create CloudWatch alarms to automatically initiate actions based on sustained state changes of your metrics. You configure when alarms are invoked and the action that is performed.&lt;/p&gt;

&lt;p&gt;First, you must decide which metric you want to set up an alarm for, and then you define the threshold that will invoke the alarm. Next, you define the threshold's time period. For example, suppose you want to set up an alarm for an EC2 instance to invoke when the CPU utilization goes over a threshold of 80 percent. You also must specify the time period the CPU utilization is over the threshold.&lt;/p&gt;

&lt;p&gt;You don’t want to invoke an alarm based on short, temporary spikes in the CPU. You only want to invoke an alarm if the CPU is elevated for a sustained amount of time. For example, if CPU utilization exceeds 80 percent for 5 minutes or longer, there might be a resource issue. To set up an alarm you need to choose the metric, threshold, and time period.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgesihmqosukq4swon9l2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgesihmqosukq4swon9l2.png" alt="CloudWatch_Alarms description" width="800" height="824"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;An alarm can be invoked when it transitions from one state to another. After an alarm is invoked, it can initiate an action. Actions can be an Amazon EC2 action, an automatic scaling action, or a notification sent to Amazon Simple Notification Service (Amazon SNS).&lt;/p&gt;

&lt;p&gt;States of an alarm:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;OK: The metric is within the defined threshold. Everything appears to be operating like normal.&lt;/li&gt;
&lt;li&gt;ALARM: The metric is outside the defined threshold. This might be an operational issue.&lt;/li&gt;
&lt;li&gt;INSUFFICIENT_DATA: The alarm has just started, the metric is not available, or not enough data is available for the metric to determine the alarm state.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;8. Prevent and troubleshoot issues with CloudWatch alarms&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;CloudWatch Logs uses metric filters to turn the log data into metrics that you can graph or set an alarm on. The following timeline indicates the order of the steps to complete when setting up an alarm. It also provides an example using our employee directory application.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Set up a metric filter&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For the employee directory application, suppose you set up a metric filter for HTTP 500 error response codes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Define an alarm&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Then, you define which metric alarm state ****should be invoked based on the threshold. With this example, the alarm state is invoked if HTTP 500 error responses are sustained for a specified period of time.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Define an action&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Next, you define an action that you want to take place when the alarm is invoked. Here, it makes sense to send an email or text alert to you so you can start troubleshooting the website. Hopefully, you can fix it before it becomes a bigger issue.&lt;/p&gt;

&lt;p&gt;After the alarm is set up, you know that if the error happens again, you will be notified promptly.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can set up different alarms for different reasons to help you prevent or troubleshoot operational issues. In the scenario just described, the alarm invokes an Amazon SNS notification that goes to a person who looks into the issue manually.&lt;/p&gt;

&lt;p&gt;Another option is to have alarms invoke actions that automatically remediate technical issues. For example, you can set up an alarm to invoke an EC2 instance to reboot or scale services up or down. You can even set up an alarm to invoke an Amazon SNS notification that invokes a Lambda function. The Lambda function then calls any AWS API to manage your resources and troubleshoot operational issues. By using AWS services together like this, you can respond to events more quickly.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>cloud</category>
      <category>cloudwatch</category>
    </item>
    <item>
      <title>AWS Database - Part 3: Purpose-Built Databases</title>
      <dc:creator>Hulk Pham</dc:creator>
      <pubDate>Thu, 31 Oct 2024 08:26:37 +0000</pubDate>
      <link>https://dev.to/hulk-pham/aws-database-part-3-purpose-built-databases-4bb4</link>
      <guid>https://dev.to/hulk-pham/aws-database-part-3-purpose-built-databases-4bb4</guid>
      <description>&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Purpose-Built Databases Overview&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AWS offers a range of purpose-built databases to support diverse data models and application needs, moving away from the one-size-fits-all approach of relational databases&lt;/li&gt;
&lt;li&gt;Purpose-built databases allow developers to choose the best database for specific problems, enabling the building of highly scalable, distributed applications&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Key AWS Database Services&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Amazon DynamoDB: A fully managed NoSQL database for high-scale and serverless applications&lt;/li&gt;
&lt;li&gt;Amazon ElastiCache: A fully managed, in-memory caching solution supporting Redis and Memcached&lt;/li&gt;
&lt;li&gt;Amazon DocumentDB: A fully managed document database with MongoDB compatibility&lt;/li&gt;
&lt;li&gt;Amazon Neptune: A fully managed graph database for highly connected data&lt;/li&gt;
&lt;li&gt;Amazon Timestream: A serverless time series database for IoT and operational applications&lt;/li&gt;
&lt;li&gt;Amazon QLDB: A ledger database providing a verifiable history of data changes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Database Selection Guide&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AWS provides a variety of database options tailored to specific use cases, from relational databases for traditional applications to specialized databases for graph data, time series, and ledger applications&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;I. Purpose-built databases for all application needs&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;We covered Amazon RDS and relational databases in the previous lesson, and for a long time, relational databases were the default option. They were widely used in nearly all applications. A relational database is like a multi-tool. It can do many things, but it is not perfectly suited to any one particular task. It might not always be the best choice for your business needs.&lt;/p&gt;

&lt;p&gt;The one-size-fits-all approach of using a relational database for everything no longer works. Over the past few decades, there has been a shift in the database landscape, and this shift has led to the rise of purpose-built databases. Developers can consider the needs of their application and choose a database that will fit those needs.&lt;/p&gt;

&lt;p&gt;AWS offers a broad and deep portfolio of purpose-built databases that support diverse data models. Customers can use them to build data-driven, highly scalable, distributed applications. You can pick the best database to solve a specific problem and break away from restrictive commercial databases. You can focus on building applications that meet the needs of your organization.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;1. Amazon DynamoDB&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;DynamoDB is a fully managed NoSQL database that provides fast, consistent performance at any scale. It has a flexible billing model, tight integration with infrastructure as code (IaC), and a hands-off operational model. DynamoDB has become the database of choice for two categories of applications: high-scale applications and serverless applications. Although DynamoDB is the database of choice for high-scale and serverless applications, it can work for nearly all online transaction processing (OLTP) application workloads. We will explore DynamoDB more in the next lesson.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;2. Amazon ElastiCache&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;ElastiCache is a fully managed, in-memory caching solution. It provides support for two open-source, in-memory cache engines: Redis and Memcached. You aren’t responsible for instance failovers, backups and restores, or software upgrades.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;3. Amazon MemoryDB for Redis&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;MemoryDB is a Redis-compatible, durable, in-memory database service that delivers ultra-fast performance. With MemoryDB, you can achieve microsecond read latency, single-digit millisecond write latency, high throughput, and Multi-AZ durability for modern applications, like those built with microservices architectures. You can use MemoryDB as a fully managed, primary database to build high-performance applications. You do not need to separately manage a cache, durable database, or the required underlying infrastructure.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;4. Amazon DocumentDB (with MongoDB compatibility)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Amazon DocumentDB is a fully managed document database from AWS. A document database is a type of NoSQL database you can use to store and query rich documents in your application. These types of databases work well for the following use cases: content management systems, profile management, and web and mobile applications. Amazon DocumentDB has API compatibility with MongoDB. This means you can use popular open-source libraries to interact with Amazon DocumentDB, or you can migrate existing databases to Amazon DocumentDB with minimal hassle.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;5. Amazon Keyspaces (for Apache Cassandra)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Amazon Keyspaces is a scalable, highly available, and managed Apache Cassandra compatible database service. Apache Cassandra is a popular option for high-scale applications that need top-tier performance. Amazon Keyspaces is a good option for high-volume applications with straightforward access patterns. With Amazon Keyspaces, you can run your Cassandra workloads on AWS using the same Cassandra Query Language (CQL) code, Apache 2.0 licensed drivers, and tools that you use today.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;6. Amazon Neptune&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Neptune is a fully managed graph database offered by AWS. A graph database is a good choice for highly connected data with a rich variety of relationships. Companies often use graph databases for recommendation engines, fraud detection, and knowledge graphs.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;7. Amazon Timestream&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Timestream is a fast, scalable, and serverless time series database service for Internet of Things (IoT) and operational applications. It makes it easy to store and analyze trillions of events per day up to 1,000 times faster and for as little as one-tenth of the cost of relational databases. Time series data is a sequence of data points recorded over a time interval. It is used for measuring events that change over time, such as stock prices over time or temperature measurements over time.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;8. Amazon Quantum Ledger Database (Amazon QLDB)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;With traditional databases, you can overwrite or delete data, so developers use techniques, such as audit tables and audit trails to help track data lineage. These approaches can be difficult to scale and put the burden of ensuring that all data is recorded on the application developer. Amazon QLDB is a purpose-built ledger database that provides a complete and cryptographically verifiable history of all changes made to your application data.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;II. Choosing the Right AWS Database Service&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;As we learned in the previous lessons, AWS has a variety of database options for different use cases. The following table provides a quick look at the AWS database portfolio.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;strong&gt;AWS Service(s)&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Database Type&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Use Cases&lt;/strong&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Amazon RDS, Aurora,Amazon Redshift&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Relational&lt;/td&gt;
&lt;td&gt;Traditional applications, ERP, CRM,ecommerce&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;DynamoDB&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Key-value&lt;/td&gt;
&lt;td&gt;High-traffic web applications, ecommerce systems, gaming applications&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Amazon ElastiCache for Memcached, Amazon ElastiCache for Redis&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;In-memory&lt;/td&gt;
&lt;td&gt;Caching, session management, gaming leaderboards, geospatial applications&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Amazon DocumentDB&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Document&lt;/td&gt;
&lt;td&gt;Content management, catalogs, user profiles&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Amazon Keyspaces&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Wide column&lt;/td&gt;
&lt;td&gt;High-scale industrial applications for equipment maintenance, fleet management, route optimization&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Neptune&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Graph&lt;/td&gt;
&lt;td&gt;Fraud detection, social networking, recommendation engines&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Timestream&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Time series&lt;/td&gt;
&lt;td&gt;IoT applications, Development Operations (DevOps), industrial telemetry&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Amazon QLDB&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Ledger&lt;/td&gt;
&lt;td&gt;Systems of record, supply chain, registrations, banking transactions&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

</description>
      <category>aws</category>
      <category>cloud</category>
      <category>database</category>
    </item>
    <item>
      <title>AWS Database - Part 2: DynamoDB</title>
      <dc:creator>Hulk Pham</dc:creator>
      <pubDate>Thu, 31 Oct 2024 08:21:19 +0000</pubDate>
      <link>https://dev.to/hulk-pham/aws-database-part-2-dynamodb-391e</link>
      <guid>https://dev.to/hulk-pham/aws-database-part-2-dynamodb-391e</guid>
      <description>&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Overview and Core Components&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;DynamoDB is a fully managed NoSQL database service offering fast performance and seamless scalability&lt;/li&gt;
&lt;li&gt;Core components include tables (collections of data), items (groups of attributes), and attributes (fundamental data elements)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Key Features and Capabilities&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Allows creation of database tables that can store and retrieve any amount of data and handle any level of request traffic&lt;/li&gt;
&lt;li&gt;Enables scaling of table throughput capacity without downtime or performance degradation&lt;/li&gt;
&lt;li&gt;Automatically replicates data across multiple Availability Zones for high availability and durability&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Use Cases&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ideal for applications requiring high scalability, OLTP workloads, and mission-critical systems needing high availability&lt;/li&gt;
&lt;li&gt;Suitable for various scenarios, including software applications, media metadata stores, gaming platforms, and retail experiences&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Security Features&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Provides full encryption at rest using AWS Key Management Service&lt;/li&gt;
&lt;li&gt;Offers fine-grained access control through IAM roles and policy conditions&lt;/li&gt;
&lt;li&gt;Enables monitoring of operations and key usage through AWS CloudTrail&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;I. DynamoDB overview&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;DynamoDB is a fully managed NoSQL database service that provides fast and predictable performance with seamless scalability. With DynamoDB, you can offload the administrative burdens of operating and scaling a distributed database. You don't need to worry about hardware provisioning, setup and configuration, replication, software patching, or cluster scaling.&lt;/p&gt;

&lt;p&gt;With DynamoDB, you can do the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create database tables that can store and retrieve any amount of data and serve any level of request traffic.&lt;/li&gt;
&lt;li&gt;Scale up or scale down your tables' throughput capacity without downtime or performance degradation.&lt;/li&gt;
&lt;li&gt;Monitor resource usage and performance metrics using the AWS Management Console.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;DynamoDB automatically spreads the data and traffic for your tables over a sufficient number of servers to handle your throughput and storage requirements. It does this while maintaining consistent, fast performance. All your data is stored on SSDs and is automatically replicated across multiple Availability Zones in a Region, providing built-in high availability and data durability.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;II. DynamoDB core components&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;In DynamoDB, tables, items, and attributes are the core components that you work with. A table is a collection of items, and each item is a collection of attributes. DynamoDB uses primary keys to uniquely identify each item in a table and secondary indexes to provide more querying flexibility.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwwrjlgjfkxalm4k3cbdx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwwrjlgjfkxalm4k3cbdx.png" alt="Dynamo_DB_Components_2 description" width="800" height="504"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Table&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Similar to other database systems, DynamoDB stores data in tables. A table is a collection of data. For example, you can have a table called Person that you can use to store personal contact information about friends, family, or anyone else of interest. You can also have a Cars table to store information about vehicles that people drive.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Item&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Each table contains zero or more items. An item is a group of attributes that is uniquely identifiable among all the other items. In a Person table, each item represents a person. In a Cars table, each item represents one vehicle. Items in DynamoDB are similar in many ways to rows, records, or tuples in other database systems. In DynamoDB, there is no limit to the number of items you can store in a table.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Attribute&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Each item is composed of one or more attributes. An attribute is a fundamental data element, something that does not need to be broken down any further. For example, an item in a Person table might contain attributes called PersonID, LastName, FirstName, and so on. In a Department table, an item might have attributes such as DepartmentID, Name, Manager, and so on. Attributes in DynamoDB are similar in many ways to fields or columns in other database systems.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;III. DynamoDB use cases&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;DynamoDB is a fully managed service that handles the operations work. You can offload the administrative burdens of operating and scaling distributed databases to AWS.&lt;/p&gt;

&lt;p&gt;You might want to consider using DynamoDB in the following circumstances:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You are experiencing scalability problems with other traditional database systems.&lt;/li&gt;
&lt;li&gt;You are actively engaged in developing an application or service.&lt;/li&gt;
&lt;li&gt;You are working with an OLTP workload.&lt;/li&gt;
&lt;li&gt;You care deploying a mission-critical application that must be highly available at all times without manual intervention.&lt;/li&gt;
&lt;li&gt;You require a high level of data durability, regardless of your backup-and-restore strategy.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;DynamoDB is used in a wide range of workloads because of its simplicity, from low-scale operations to ultrahigh-scale operations, such as those demanded by Amazon.com.&lt;/p&gt;

&lt;p&gt;To learn more about potential use cases, expand each of the following four categories:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Develop software applications&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Build internet-scale applications supporting user-content metadata and caches that require high concurrency and connections for millions of users and millions of requests per second.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create media metadata stores&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Scale throughput and concurrency for analysis of media and entertainment workloads, such as real-time video streaming and interactive content. Deliver lower latency with multi-Region replication across Regions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scale gaming platforms&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Focus on driving innovation with no operational overhead. Build out your game platform with player data, session history, and leaderboards for millions of concurrent users.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Deliver seamless retail experiences&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Use design patterns for deploying shopping carts, workflow engines, inventory tracking, and customer profiles. DynamoDB supports high-traffic, extreme-scaled events and can handle millions of queries per second.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;IV. DynamoDB security&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;DynamoDB provides a number of security features to consider as you develop and implement your own security policies. They include the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;DynamoDB provides a highly durable storage infrastructure designed for mission-critical and primary data storage. Data is redundantly stored on multiple devices across multiple facilities in a DynamoDB Region.&lt;/li&gt;
&lt;li&gt;All user data stored in DynamoDB is fully encrypted at rest. DynamoDB encryption at rest provides enhanced security by encrypting all your data at rest using encryption keys stored in AWS Key Management Service (AWS KMS).&lt;/li&gt;
&lt;li&gt;IAM administrators control who can be authenticated and authorized to use DynamoDB resources. You can use IAM to manage access permissions and implement security policies.&lt;/li&gt;
&lt;li&gt;As a managed service, DynamoDB is protected by the AWS global network security procedures.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Use AWS CloudTrail to monitor AWS managed key usage&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you are using an AWS managed key for encryption at rest, usage of the key is recorded in AWS CloudTrail. CloudTrail can tell you who made the request, the services used, actions performed, parameters for the action, and response elements returned.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use IAM roles to authenticate access to DynamoDB&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For users, applications, and other AWS services to access DynamoDB, they must include valid AWS credentials in their AWS API requests. Use IAM roles to obtain temporary access keys.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use IAM policy conditions for fine-grained access control&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When you grant permissions in DynamoDB, you can specify conditions that determine how a permissions policy takes effect. Implementing least privilege is key in reducing security risk and the impact that can result from errors or malicious intent.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Monitor DynamoDB operations using CloudTrail&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When activity occurs in DynamoDB, that activity is recorded in a CloudTrail event. For an ongoing record of events in DynamoDB and in your AWS account, create a trail to deliver log files to an Amazon Simple Storage Service (Amazon S3) bucket.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>cloud</category>
      <category>dynamodb</category>
    </item>
    <item>
      <title>AWS Database - Part 1: AWS RDS</title>
      <dc:creator>Hulk Pham</dc:creator>
      <pubDate>Wed, 30 Oct 2024 14:36:17 +0000</pubDate>
      <link>https://dev.to/hulk-pham/aws-database-part-1-aws-rds-1a33</link>
      <guid>https://dev.to/hulk-pham/aws-database-part-1-aws-rds-1a33</guid>
      <description>&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Relational Databases&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Relational databases organize data into tables with relationships between them, using SQL for complex queries and data management&lt;/li&gt;
&lt;li&gt;Benefits include reduced data redundancy, familiarity among professionals, and adherence to ACID principles&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Amazon RDS Overview&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Amazon RDS is a managed database service that supports various engines including commercial, open-source, and cloud-native options&lt;/li&gt;
&lt;li&gt;It allows users to focus on application development rather than database management tasks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Amazon RDS Features&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Offers different storage types (General Purpose SSD, Provisioned IOPS SSD, and Magnetic) to tailor performance and cost&lt;/li&gt;
&lt;li&gt;Provides automated backups with point-in-time recovery and manual snapshots for longer retention periods&lt;/li&gt;
&lt;li&gt;Supports Multi-AZ deployment for high availability, with automatic failover to a standby database in case of issues&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Security and Management&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Implements security measures including IAM policies, security groups, encryption at rest, and SSL/TLS connections&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;I. Relational databases&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;A relational database organizes data into tables. Data in one table can link to data in other tables to create relationships—hence, the relational part of the name.&lt;/p&gt;

&lt;p&gt;A table stores data in rows and columns. A row, often called a record, contains all information about a specific entry. Columns describe attributes of an entry. The following image is an example of three tables in a relational database.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;1. Relational database management system&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;With a relational database management system (RDBMS), you can create, update, and administer a relational database. Some common examples of RDBMSs include the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;MySQL&lt;/li&gt;
&lt;li&gt;PostgresQL&lt;/li&gt;
&lt;li&gt;Oracle&lt;/li&gt;
&lt;li&gt;Microsoft SQL Server&lt;/li&gt;
&lt;li&gt;Amazon Aurora&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You communicate with an RDBMS by using structured query language (SQL) queries, similar to the following example:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;SELECT * FROM table_name&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;2. Relational database benefits&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;To learn more about the benefits of using relational databases, flip each of the following flashcards by choosing them.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Complex SQL&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;With SQL, you can join multiple tables so you can better understand relationships between your data.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Reduced redundancy&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You can store data in one table and reference it from other tables instead of saving the same data in different places.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Familiarity&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Because relational databases have been a popular choice since the 1970s, technical professionals often have familiarity and experience with them.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Accuracy&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Relational databases ensure that your data has high integrity and adheres to the atomicity, consistency, isolation, and durability (ACID) principle.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;3. Relational database use cases&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Much of the world runs on relational databases. In fact, they’re at the core of many mission-critical applications, some of which you might use in your day-to-day life.&lt;/p&gt;

&lt;p&gt;To learn some common use cases for relational databases, expand each of the following two categories.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Applications that have a fixed schema&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;These are applications that have a fixed schema&lt;/strong&gt; and don't change often. An example is a lift-and-shift application that lifts an app from on-premises and shifts it to the cloud, with little or no modifications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Applications that need persistent storage&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;These are applications that need persistent storage&lt;/strong&gt; and follow the ACID principle, such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Enterprise resource planning (ERP) applications&lt;/li&gt;
&lt;li&gt;Customer relationship management (CRM) applications&lt;/li&gt;
&lt;li&gt;Commerce and financial applications&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;4. Choose between unmanaged and managed databases&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;If you want to trade your on-premises database for a relational database on AWS, you first need to select how you want to run it—managed or unmanaged. Managed services and unmanaged services are handled similar to the shared responsibility model. The shared responsibility model distinguishes between AWS security responsibilities and the customer’s security responsibilities. Likewise, managed compared to unmanaged can be understood as a trade-off between convenience and control.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Unmanaged databases&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you operate a relational database on premises, you are responsible for all aspects of operation. This includes data center security and electricity, host machines management, database management, query optimization, and customer data management. You are responsible for absolutely everything, which means you have control over absolutely everything.&lt;/p&gt;

&lt;p&gt;Now, suppose you want to shift some of the work to AWS by running your relational database on Amazon Elastic Compute Cloud (Amazon EC2). If you host a database on Amazon EC2, AWS implements and maintains the physical infrastructure and hardware and installs the EC2 instance operating system (OS). However, you are still responsible for managing the EC2 instance, managing the database on that host, optimizing queries, and managing customer data.&lt;/p&gt;

&lt;p&gt;This is called an unmanaged database option. In this option, AWS is responsible for and has control over the hardware and underlying infrastructure. You are responsible for and have control over management of the host and database.&lt;/p&gt;

&lt;p&gt;You are responsible for everything in a database hosted on-premises. AWS takes on more of that responsibility in databases hosted in Amazon EC2.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz60kmwzm5c8wrohwl8y1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz60kmwzm5c8wrohwl8y1.png" alt="OnPrem_vs_EC2 description" width="800" height="446"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Managed databases&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To shift more of the work to AWS, you can use a managed database service. These services provide the setup of both the EC2 instance and the database, and they provide systems for high availability, scalability, patching, and backups. However, in this model, you’re still responsible for database tuning, query optimization, and ensuring that your customer data is secure. This option provides the ultimate convenience but the least amount of control compared to the two previous options.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwaosde0lmyyn8r28ut5n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwaosde0lmyyn8r28ut5n.png" alt="Managed_DB description" width="572" height="650"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;II. Amazon RDS overview&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Amazon RDS is a managed database service customers can use to create and manage relational databases in the cloud without the operational burden of traditional database management. For example, imagine you sell healthcare equipment, and your goal is to be the number-one seller on the West Coast of the United States. Building a database doesn’t directly help you achieve that goal. However, having a database is a necessary component to achieving that goal.&lt;/p&gt;

&lt;p&gt;With Amazon RDS, you can offload some of the unrelated work of creating and managing a database. You can focus on the tasks that differentiate your application, instead of focusing on infrastructure-related tasks, like provisioning, patching, scaling, and restoring.&lt;/p&gt;

&lt;p&gt;Amazon RDS supports most of the popular RDBMSs, ranging from commercial options to open-source options and even a specific AWS option. Supported Amazon RDS engines include the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Commercial:&lt;/strong&gt; Oracle, SQL Server&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Open source:&lt;/strong&gt; MySQL, PostgreSQL, MariaDB&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cloud native:&lt;/strong&gt; Aurora&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwqyb2tztarlbn4o9cxqd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwqyb2tztarlbn4o9cxqd.png" alt="Image description" width="800" height="363"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;III. Database instances&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Just like the databases you build and manage yourself, Amazon RDS is built from compute and storage. The compute portion is called the database (DB) instance, which runs the DB engine. Depending on the engine selected, the instance will have different supported features and configurations. A DB instance can contain multiple databases with the same engine, and each DB can contain multiple tables.&lt;/p&gt;

&lt;p&gt;Underneath the DB instance is an EC2 instance. However, this instance is managed through the Amazon RDS console instead of the Amazon EC2 console. When you create your DB instance, you choose the instance type and size. The DB instance class you choose affects how much processing power and memory it has.&lt;/p&gt;

&lt;p&gt;To learn more about the various instance classes, choose each of the four numbered markers.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp02wjeros8zycwv0u38w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp02wjeros8zycwv0u38w.png" alt="RDS1 description" width="800" height="363"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;IV. Storage on Amazon RDS&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The storage portion of DB instances for Amazon RDS use Amazon Elastic Block Store (Amazon EBS) volumes for database and log storage. This includes MySQL, MariaDB, PostgreSQL, Oracle, and SQL Server.&lt;/p&gt;

&lt;p&gt;When using Aurora, data is stored in cluster volumes, which are single, virtual volumes that use solid-state drives (SSDs). A cluster volume contains copies of your data across three Availability Zones in a single AWS Region. For nonpersistent, temporary files, Aurora uses local storage.&lt;/p&gt;

&lt;p&gt;Amazon RDS provides three storage types: General Purpose SSD (also called gp2 and gp3), Provisioned IOPS SSD (also called io1), and Magnetic (also called standard). They differ in performance characteristics and price, which means you can tailor your storage performance and cost to the needs of your database workload.&lt;/p&gt;

&lt;p&gt;To learn more about the different storage types, choose each of the three numbered markers.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr6oac45anfdm6usi6fof.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr6oac45anfdm6usi6fof.png" alt="RDS2 description" width="800" height="531"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;V. Amazon RDS in an Amazon Virtual Private Cloud&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;When you create a DB instance, you select the Amazon Virtual Private Cloud (Amazon VPC) your databases will live in. Then, you select the subnets that will be designated for your DB. This is called a DB subnet group, and it has at least two Availability Zones in its Region. The subnets in a DB subnet group should be private, so they don’t have a route to the internet gateway. This ensures that your DB instance, and the data inside it, can be reached only by the application backend.&lt;/p&gt;

&lt;p&gt;Access to the DB instance can be restricted further by using network access control lists (network ACLs) and security groups. With these firewalls, you can control, at a granular level, the type of traffic you want to provide access into your database.&lt;/p&gt;

&lt;p&gt;Using these controls provides layers of security for your infrastructure. It reinforces that only the backend instances have access to the database.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;VI. Backup data&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;You don’t want to lose your data. To take regular backups of your Amazon RDS instance, you can use automated backups or manual snapshots. To learn about a category, choose the appropriate tab.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;1. Automated Backups&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Automated backups are turned on by default. This backs up your entire DB instance (not just individual databases on the instance) and your transaction logs. When you create your DB instance, you set a backup window that is the period of time that automatic backups occur. Typically, you want to set the window during a time when your database experiences little activity because it can cause increased latency and downtime.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Retaining backups:&lt;/strong&gt; Automated backups are retained between 0 and 35 days. You might ask yourself, “Why set automated backups for 0 days?” The 0 days setting stops automated backups from happening. If you set it to 0, it will also delete all existing automated backups. This is not ideal. The benefit of automated backups that you can do point-in-time recovery.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Point-in-time recovery:&lt;/strong&gt; This creates a new DB instance using data restored from a specific point in time. This restoration method provides more granularity by restoring the full backup and rolling back transactions up to the specified time range.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcki7jjichxyngnx5av6m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcki7jjichxyngnx5av6m.png" alt="bk description" width="800" height="274"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;2. Manual Snapshots&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;If you want to keep your automated backups longer than 35 days, use manual snapshots. Manual snapshots are similar to taking Amazon EBS snapshots, except you manage them in the Amazon RDS console. These are backups that you can initiate at any time. They exist until you delete them. For example, to meet a compliance requirement that mandates you to keep database backups for a year, you need to use manual snapshots. If you restore data from a manual snapshot, it creates a new DB instance using the data from the snapshot.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5dm67qvi2nzo0g5oxex2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5dm67qvi2nzo0g5oxex2.png" alt="Manual_Snapshots description" width="800" height="290"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Choosing a backup option&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It is advisable to deploy both backup options. Automated backups are beneficial for point-in-time recovery. With manual snapshots, you can retain backups for longer than 35 days.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;VII. Redundancy with Amazon RDS Multi-AZ&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;In an Amazon RDS Multi-AZ deployment, Amazon RDS creates a redundant copy of your database in another Availability Zone. You end up with two copies of your database—a primary copy in a subnet in one Availability Zone and a standby copy in a subnet in a second Availability Zone.&lt;/p&gt;

&lt;p&gt;The primary copy of your database provides access to your data so that applications can query and display the information. The data in the primary copy is synchronously replicated to the standby copy. The standby copy is not considered an active database, and it does not get queried by applications.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzgiwrjpsjxjnrkz72yxo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzgiwrjpsjxjnrkz72yxo.png" alt="az description" width="800" height="370"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To improve availability, Amazon RDS Multi-AZ ensures that you have two copies of your database running and that one of them is in the primary role. If an availability issue arises, such as the primary database loses connectivity, Amazon RDS initiates an automatic failover.&lt;/p&gt;

&lt;p&gt;When you create a DB instance, a Domain Name System (DNS) name is provided. AWS uses that DNS name to fail over to the standby database. In an automatic failover, the standby database is promoted to the primary role, and queries are redirected to the new primary database.&lt;/p&gt;

&lt;p&gt;To help ensure that you don't lose Multi-AZ configuration, there are two ways you can create a new standby database. They are as follows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Demote the previous primary to standby if it's still up and running.&lt;/li&gt;
&lt;li&gt;Stand up a new standby DB instance.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The reason you can select multiple subnets for an Amazon RDS database is because of the Multi-AZ configuration. You will want to ensure that you have subnets in different Availability Zones for your primary and standby copies.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;VIII. Amazon RDS security&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;When it comes to security in Amazon RDS, you have control over managing access to your Amazon RDS resources, such as your databases on a DB instance. How you manage access will depend on the tasks you or other users need to perform in Amazon RDS. Network ACLs and security groups help users dictate the flow of traffic. If you want to restrict the actions and resources others can access, you can use AWS Identity and Access Management (IAM) policies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;IAM&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Use IAM policies to assign permissions that determine who can manage Amazon RDS resources. For example, you can use IAM to determine who can create, describe, modify, and delete DB instances, tag resources, or modify security groups.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Security groups&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Use security groups to control which IP addresses or Amazon EC2 instances can connect to your databases on a DB instance. When you first create a DB instance, all database access is prevented except through rules specified by an associated security group.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Amazon RDS encryption&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Use Amazon RDS encryption to secure your DB instances and snapshots at rest.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SSL or TLS&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Use Secure Sockets Layer (SSL) or Transport Layer Security (TLS) connections with DB instances running the MySQL, MariaDB, PostgreSQL, Oracle, or SQL Server database engines.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>cloud</category>
      <category>database</category>
      <category>rds</category>
    </item>
    <item>
      <title>AWS Storage - Part 4: Amazon S3</title>
      <dc:creator>Hulk Pham</dc:creator>
      <pubDate>Wed, 30 Oct 2024 14:06:00 +0000</pubDate>
      <link>https://dev.to/hulk-pham/aws-storage-part-4-amazon-s3-1kki</link>
      <guid>https://dev.to/hulk-pham/aws-storage-part-4-amazon-s3-1kki</guid>
      <description>&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Amazon S3 Overview&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Amazon S3 is an object storage service that stores data in a flat structure, allowing retrieval from anywhere on the web&lt;/li&gt;
&lt;li&gt;Objects are stored in containers called buckets, each with a unique name across all AWS accounts in a partition&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;S3 Use Cases and Security&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Common use cases include backup and storage, media hosting, software delivery, data lakes, and static websites&lt;/li&gt;
&lt;li&gt;S3 resources are private by default, with security managed through IAM policies, bucket policies, and encryption&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;S3 Features&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Multiple storage classes are available to optimize costs based on data access patterns&lt;/li&gt;
&lt;li&gt;Versioning allows preservation of multiple versions of an object in the same bucket&lt;/li&gt;
&lt;li&gt;Lifecycle configurations automate the transition between storage classes and object expiration&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Comparison with Other AWS Storage Services&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;S3 is ideal for static content, backups, and data analytics, offering object storage with pay-for-use pricing and multi-AZ replication&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;I. Amazon S3&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Unlike Amazon EBS, Amazon Simple Storage Service (Amazon S3) is a standalone storage solution that isn’t tied to compute. With Amazon S3, you can retrieve your data from anywhere on the web. If you have used an online storage service to back up the data from your local machine, you most likely have used a service similar to Amazon S3. The big difference between those online storage services and Amazon S3 is the storage type.&lt;/p&gt;

&lt;p&gt;Amazon S3 is an object storage service. Object storage stores data in a flat structure. An object is a file combined with metadata. You can store as many of these objects as you want. All the characteristics of object storage are also characteristics of Amazon S3.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;1. Amazon S3 concepts&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F49jzh83bf3dhbaudcpf4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F49jzh83bf3dhbaudcpf4.png" alt="S3 description" width="800" height="357"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In Amazon S3, you store your objects in containers called buckets. You can’t upload an object, not even a single photo, to Amazon S3 without creating a bucket first. When you store an object in a bucket, the combination of a bucket name, key, and version ID uniquely identifies the object.&lt;/p&gt;

&lt;p&gt;When you create a bucket, you specify, at the very minimum, two details: the bucket name and the AWS Region that you want the bucket to reside in.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;2. Amazon S3 bucket names&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Amazon S3 supports global buckets. Therefore, each bucket name must be unique across all AWS accounts in all AWS Regions within a partition. A partition is a grouping of Regions, of which AWS currently has three: Standard Regions, China Regions, and AWS GovCloud (US). When naming a bucket, choose a name that is relevant to you or your business. For example, you should avoid using AWS or Amazon in your bucket name.&lt;/p&gt;

&lt;p&gt;The following are some examples of the rules that apply for naming buckets in Amazon S3. For a full list of rules, see the link in the resources section.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Bucket names must be between 3 (min) and 63 (max) characters long.&lt;/li&gt;
&lt;li&gt;Bucket names can consist only of lowercase letters, numbers, dots (.), and hyphens (-).&lt;/li&gt;
&lt;li&gt;Bucket names must begin and end with a letter or number.&lt;/li&gt;
&lt;li&gt;Buckets must not be formatted as an IP address.&lt;/li&gt;
&lt;li&gt;A bucket name cannot be used by another AWS account in the same partition until the bucket is deleted.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If your application automatically creates buckets, choose a bucket naming scheme that is unlikely to cause naming conflicts and will choose a different bucket name, should one not be available.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;3. Object key names&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The object key (key name) uniquely identifies the object in an Amazon S3 bucket. When you create an object, you specify the key name. As described earlier, the Amazon S3 model is a flat structure, meaning there is no hierarchy of subbuckets or subfolders. However, the Amazon S3 console does support the concept of folders. By using key name prefixes and delimiters, you can imply a logical hierarchy.&lt;/p&gt;

&lt;p&gt;For example, suppose your bucket called &lt;em&gt;testbucket&lt;/em&gt; has two objects with the following object keys: &lt;em&gt;2022-03-01/AmazonS3.html&lt;/em&gt; and &lt;em&gt;2022-03-01/Cats.jpg&lt;/em&gt;. The console uses the key name prefix, &lt;em&gt;2022-03-01&lt;/em&gt;, and delimiter (&lt;em&gt;/&lt;/em&gt;) to present a folder structure.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmuqi8me6os28rgff0o05.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmuqi8me6os28rgff0o05.png" alt="path description" width="800" height="522"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Amazon S3 supports buckets and objects, and there is no hierarchy. However, by using prefixes and delimiters in an object key name, the Amazon S3 console and the AWS SDKs are able to infer hierarchy and introduce the concept of folders.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;II. Amazon S3 use cases&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Amazon S3 is a widely used storage service, with far more use cases than could fit on one screen. To learn more, expand each of the following six categories.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Backup and storage&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Amazon S3 is a natural place to back up files because it is highly redundant. As mentioned in the last lesson, AWS stores your EBS snapshots in Amazon S3 to take advantage of its high availability.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Media hosting&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Because you can store unlimited objects, and each individual object can be up to 5 TB, Amazon S3 is an ideal location to host video, photo, and music uploads.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Software delivery&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can use Amazon S3 to host your software applications that customers can download.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data lakes&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Amazon ****S3 is an optimal foundation for a data lake because of its virtually unlimited scalability. You can increase storage from gigabytes to petabytes of content, paying only for what you use.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Static websites&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can configure your S3 bucket to host a static website of HTML, CSS, and client-side scripts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Static content&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Because of the limitless scaling, the support for large files, and the fact that you can access any object over the web at any time, Amazon S3 is the perfect place to store static content.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;III. Security in Amazon S3&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Everything in Amazon S3 is private by default. This means that all Amazon S3 resources, such as buckets and objects, can only be viewed by the user or AWS account that created that resource. Amazon S3 resources are all private and protected to begin with.&lt;/p&gt;

&lt;p&gt;If you decide that you want everyone on the internet to see your photos, you can choose to make your buckets and objects public. A public resource means that everyone on the internet can see it. Most of the time, you don’t want your permissions to be all or nothing. Typically, you want to be more granular about the way that you provide access to your resources.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fusb84jthfnfqmebjkqsd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fusb84jthfnfqmebjkqsd.png" alt="S3_Bucket_Access description" width="800" height="321"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To be more specific about who can do what with your Amazon S3 resources, Amazon S3 provides several security management features: IAM policies, S3 bucket policies, and encryption to develop and implement your own security policies.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;1. Amazon S3 and IAM policies&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Previously, you learned about creating and using AWS Identity and Access Management (IAM) policies. Now you can apply that knowledge to Amazon S3. When IAM policies are attached to your resources (buckets and objects) or IAM users, groups, and roles, the policies define which actions they can perform. Access policies that you attach to your resources are referred to as &lt;em&gt;resource-based policies&lt;/em&gt; *&lt;strong&gt;*and access policies attached to users in your account are called *user policie&lt;/strong&gt;&lt;em&gt;s&lt;/em&gt;*.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcigmh0imtcl4oki6novr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcigmh0imtcl4oki6novr.png" alt="IAM_policies description" width="800" height="306"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You should use IAM policies for private buckets in the following two scenarios:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You have many buckets with different permission requirements. Instead of defining many different S3 bucket policies, you can use IAM policies.&lt;/li&gt;
&lt;li&gt;You want all policies to be in a centralized location. By using IAM policies, you can manage all policy information in one location.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;2. Amazon S3 bucket policies&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Like IAM policies, S3 bucket policies are defined in a JSON format. Unlike IAM policies, which are attached to resources and users, S3 bucket policies can only be attached to S3 buckets. The policy that is placed on the bucket applies to every object in that bucket. S3 bucket policies specify what actions are allowed or denied on the bucket.&lt;/p&gt;

&lt;p&gt;You should use S3 bucket policies in the following scenarios:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You need a simple way to do cross-account access to Amazon S3, without using IAM roles.&lt;/li&gt;
&lt;li&gt;Your IAM policies bump up against the defined size limit. S3 bucket policies have a larger size limit.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For examples of bucket policies, see the &lt;a href="https://docs.aws.amazon.com/en_us/AmazonS3/latest/userguide/example-bucket-policies.html" rel="noopener noreferrer"&gt;Bucket Policy Examples(opens in a new tab)&lt;/a&gt; link here or in the resources section.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;3. Amazon S3 encryption&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Amazon S3 reinforces encryption in transit (as it travels to and from Amazon S3) and at rest. To protect data, Amazon S3 automatically encrypts all objects on upload and applies server-side encryption with S3-managed keys as the base level of encryption for every bucket in Amazon S3 at no additional cost.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;IV. Amazon S3 storage classes&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;When you upload an object to Amazon S3 and you don’t specify the storage class, you upload it to the default storage class, often referred to as standard storage. In previous lessons, you learned about the default Amazon S3 standard storage class.&lt;/p&gt;

&lt;p&gt;Amazon S3 storage classes let you change your storage tier when your data characteristics change. For example, if you are accessing your old photos infrequently, you might want to change the storage class for the photos to save costs.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;strong&gt;Storage Class&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Description&lt;/strong&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;S3 Standard&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;This is considered general-purpose storage for cloud applications, dynamic websites, content distribution, mobile and gaming applications, and big data analytics.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;S3 Intelligent-Tiering&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;This tier is useful if your data has unknown or changing access patters. S3 Intelligent-Tiering stores objects in three tiers: a frequent access tier, an infrequent access tier, and an archive instance access tier. Amazon S3 monitors access patterns of your data and automatically moves your data to the most cost-effective storage tier based on frequency of access.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;S3 Standard-Infrequent Access (S3 Standard-IA)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;This tier is for data that is accessed less frequently but requires rapid access when needed. S3 Standard-IA offers the high durability, high throughput, and low latency of S3 Standard, with a low per-GB storage price and per-GB retrieval fee. This storage tier is ideal if you want to store long-term backups, disaster recovery files, and so on.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;S3 One Zone-Infrequent Access (S3 One Zone-IA)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Unlike other S3 storage classes that store data in a minimum of three Availability Zones, S3 One Zone-IA stores data in a single Availability Zone, which makes it less expensive than S3 Standard-IA. S3 One Zone-IA is ideal for customers who want a lower-cost option for infrequently accessed data, but do not require the availability and resilience of S3 Standard or S3 Standard-IA. It's a good choice for storing secondary backup copies of on-premises data or easily recreatable data.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;S3 Glacier Instant Retrieval&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Use S3 Glacier Instant Retrieval for archiving data that is rarely accessed and requires millisecond retrieval. Data stored in this storage class offers a cost savings of up to 68 percent compared to the S3 Standard-IA storage class, with the same latency and throughput performance.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;S3 Glacier Flexible Retrieval&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;S3 Glacier Flexible Retrieval offers low-cost storage for archived data that is accessed 1–2 times per year. With S3 Glacier Flexible Retrieval, your data can be accessed in as little as 1–5 minutes using an expedited retrieval. You can also request free bulk retrievals in up to 5–12 hours. It is an ideal solution for backup, disaster recovery, offsite data storage needs, and for when some data occasionally must be retrieved in minutes.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;S3 Glacier Deep Archive&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;S3 Glacier Deep Archive is the lowest-cost Amazon S3 storage class. It supports long-term retention and digital preservation for data that might be accessed once or twice a year. Data stored in the S3 Glacier Deep Archive storage class has a default retrieval time of 12 hours. It is designed for customers that retain data sets for 7–10 years or longer, to meet regulatory compliance requirements. Examples include those in highly regulated industries, such as the financial services, healthcare, and public sectors.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;S3 on Outposts&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Amazon S3 on Outposts delivers object storage to your on-premises AWS Outposts environment using S3 API's and features. For workloads that require satisfying local data residency requirements or need to keep data close to on premises applications for performance reasons, the S3 Outposts storage class is the ideal option.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;V. Amazon S3 versioning&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;As described earlier, Amazon S3 identifies objects in part by using the object name. For example, when you upload an employee photo to Amazon S3, you might name the object &lt;em&gt;employee.jpg&lt;/em&gt; and store it in a bucket called employees. Without Amazon S3 versioning, every time you upload an object called employee.jpg to the employees bucket, it will overwrite the original object.&lt;/p&gt;

&lt;p&gt;This can be an issue for several reasons, including the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Common names:&lt;/strong&gt; The employee.jpg object name is a common name for an employee photo object. You or someone else who has access to the bucket might not have intended to overwrite it; but once it's overwritten, the original object can't be accessed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Version preservation:&lt;/strong&gt; You might want to preserve different versions of employee.jpg. Without versioning, if you wanted to create a new version of employee.jpg, you would need to upload the object and choose a different name for it. Having several objects all with slight differences in naming variations can cause confusion and clutter in S3 buckets.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To counteract these issues, you can use Amazon S3 versioning. Versioning keeps multiple versions of a single object in the same bucket. This preserves old versions of an object without using different names, which helps with object recovery from accidental deletions, accidental overwrites, or application failures.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3oqpw82twpwv206hg5ox.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3oqpw82twpwv206hg5ox.png" alt="S3_versioning description" width="800" height="643"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you enable versioning for a bucket, Amazon S3 automatically generates a unique version ID for the object. In one bucket, for example, you can have two objects with the same key but different version IDs, such as employeephoto.jpg (version 111111) and employeephoto.jpg (version 121212).&lt;/p&gt;

&lt;p&gt;By using versioning-enabled buckets, you can recover objects from accidental deletion or overwrite. The following are examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Deleting an object does not remove the object permanently. Instead, Amazon S3 puts a marker on the object that shows that you tried to delete it. If you want to restore the object, you can remove the marker and the object is reinstated.&lt;/li&gt;
&lt;li&gt;If you overwrite an object, it results in a new object version in the bucket. You still have access to previous versions of the object.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;1. Versioning states&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Buckets can be in one of three states. The versioning state applies to all objects in the bucket. Storage costs are incurred for all objects in your bucket, including all versions. To reduce your Amazon S3 bill, you might want to delete previous versions of your objects when they are no longer needed.&lt;/p&gt;

&lt;p&gt;To learn more, expand each of the following three categories.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Unversioned (default)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;No new and existing objects in the bucket have a version.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Versioning-enabled&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Versioning is enabled for all objects in the bucket. After you version-enable a bucket, it can never return to an unversioned state. However, you can suspend versioning on that bucket.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Versioning-suspended&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Versioning is suspended for new objects. All new objects in the bucket will not have a version. However, all existing objects keep their object versions.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;VI. Managing your storage lifecycle&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;If you keep manually changing your objects, such as your employee photos, from storage tier to storage tier, you might want to automate the process by configuring their Amazon S3 lifecycle. When you define a lifecycle configuration for an object or group of objects, you can choose to automate between two types of actions: transition and expiration.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Transition actions&lt;/strong&gt; define when objects should transition to another storage class.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Expiration actions&lt;/strong&gt; define when objects expire and should be permanently deleted.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example, you might transition objects to S3 Standard-IA storage class 30 days after you create them. Or you might archive objects to the S3 Glacier Deep Archive storage class 1 year after creating them.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fthmjh1xkx47zomx9a6yr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fthmjh1xkx47zomx9a6yr.png" alt="Storage_Lifecycle description" width="800" height="187"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The following use cases are good candidates for the use of lifecycle configuration rules:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Periodic logs:&lt;/strong&gt; If you upload periodic logs to a bucket, your application might need them for a week or a month. After that, you might want to delete them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data that changes in access frequency:&lt;/strong&gt; Some documents are frequently accessed for a limited period of time. After that, they are infrequently accessed. At some point, you might not need real-time access to them. But your organization or regulations might require you to archive them for a specific period. After that, you can delete them.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;VII. Choosing the Right Storage Service&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;1. Amazon EC2 instance store&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Instance store is ephemeral block storage. This is preconfigured storage that exists on the same physical server that hosts the EC2 instance and cannot be detached from Amazon EC2. You can think of it as a built-in drive for your EC2 instance.&lt;/p&gt;

&lt;p&gt;Instance store is generally well suited for temporary storage of information that is constantly changing, such as buffers, caches, and scratch data. It is not meant for data that is persistent or long lasting. If you need persistent long-term block storage that can be detached from Amazon EC2 and provide you more management flexibility, such as increasing volume size or creating snapshots, you should use Amazon EBS.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkz1vh2d5at3e59h2czym.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkz1vh2d5at3e59h2czym.png" alt="Instance_Store description" width="446" height="752"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;2. Amazon EBS&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Amazon EBS is meant for data that changes frequently and must persist through instance stops, terminations, or hardware failures. Amazon EBS has two types of volumes: SSD-backed volumes and HDD-backed volumes.&lt;/p&gt;

&lt;p&gt;The performance of SSD-backed volumes depends on the IOPs and is ideal for transactional workloads, such as databases and boot volumes.&lt;/p&gt;

&lt;p&gt;The performance of HDD-backed volumes depends on megabytes per second (MBps) and is ideal for throughput-intensive workloads, such as big data, data warehouses, log processing, and sequential data I/O.&lt;/p&gt;

&lt;p&gt;Here are a few important features of Amazon EBS that you need to know when comparing it to other services.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It is block storage.&lt;/li&gt;
&lt;li&gt;You pay for what you provision (you have to provision storage in advance).&lt;/li&gt;
&lt;li&gt;EBS volumes are replicated across multiple servers in a single Availability Zone.&lt;/li&gt;
&lt;li&gt;Most EBS volumes can only be attached to a single EC2 instance at a time.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;3. Amazon S3&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;If your data doesn’t change often, Amazon S3 might be a cost-effective and scalable storage solution for you. Amazon S3 is ideal for storing static web content and media, backups and archiving, and data for analytics. It can also host entire static websites with custom domain names.&lt;/p&gt;

&lt;p&gt;Here are a few important features of Amazon S3 to know about when comparing it to other services:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It is object storage.&lt;/li&gt;
&lt;li&gt;You pay for what you use (you don’t have to provision storage in advance).&lt;/li&gt;
&lt;li&gt;Amazon S3 replicates your objects across multiple Availability Zones in a Region.&lt;/li&gt;
&lt;li&gt;Amazon S3 is not storage attached to compute.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;4. Amazon EFS&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Amazon EFS provides highly optimized file storage for a broad range of workloads and applications. It is the only cloud-native shared file system with fully automatic lifecycle management. Amazon EFS file systems can automatically scale from gigabytes to petabytes of data without needing to provision storage. Tens, hundreds, or even thousands of compute instances can access an Amazon EFS file system at the same time.&lt;/p&gt;

&lt;p&gt;Amazon EFS Standard storage classes are ideal for workloads that require the highest levels of durability and availability. EFS One Zone storage classes are ideal for workloads such as development, build, and staging environments.&lt;/p&gt;

&lt;p&gt;Here are a few important features of Amazon EFS to know about when comparing it to other services:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It is file storage.&lt;/li&gt;
&lt;li&gt;Amazon EFS is elastic, and automatically scales up or down as you add or remove files. And you pay only for what you use.&lt;/li&gt;
&lt;li&gt;Amazon EFS is highly available and designed to be highly durable. All files and directories are redundantly stored within and across multiple Availability Zones.&lt;/li&gt;
&lt;li&gt;Amazon EFS offers native lifecyle management of your files and a range of storage classes to choose from.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;5. Amazon FSx&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Amazon FSx provides native compatibility with third-party file systems. You can choose from NetApp ONTAP, OpenZFS, Windows File Server, and Lustre. With Amazon FSx, you don't need to worry about managing file servers and storage. This is because Amazon FSx automates time consuming administration task such as hardware provisioning, software configuration, patching, and backups. This frees you up to focus on your applications, end users, and business.&lt;/p&gt;

&lt;p&gt;Amazon FSx file systems offer feature sets, performance profiles, and data management capabilities that support a wide variety of use cases and workloads. Examples include machine learning, analytics, high performance computing (HPC) applications, and media and entertainment.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;strong&gt;File System&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Description&lt;/strong&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Amazon FSx for NETAPP ONTAP&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Fully managed shared storage built on the NetApp popular ONTAP file system&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Amazon FSx for OpenZFS&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Fully managed shared storage built on the popular OpenZFS file system&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Amazon FSx for Windows File Server&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Fully managed shared storage built on Windows Server&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Amazon FSx for Lustre&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Fully managed shared storage built on the world's most popular high-performance file system&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

</description>
      <category>aws</category>
      <category>cloud</category>
      <category>s3</category>
    </item>
  </channel>
</rss>
