DEV Community

Cover image for Exploring AWS Compute Services and Key Concepts in Module 6
Eunice js
Eunice js

Posted on

Exploring AWS Compute Services and Key Concepts in Module 6

AWS provides a wide range of compute services designed to meet various workloads and use cases. Below is an in-depth exploration of these services, EC2 instance choices, pricing models, and related tools essential for leveraging AWS's powerful infrastructure.

AWS Compute Services Overview

  1. Amazon EC2 (Elastic Compute Cloud):

    Offers resizable virtual machines (VMs) in the cloud, enabling users to run applications flexibly.

  2. Amazon EC2 Auto Scaling:

    Enhances application availability by automatically launching or terminating EC2 instances based on defined conditions.

  3. Amazon Elastic Container Registry (ECR):

    A managed service for storing and retrieving Docker container images.

  4. Amazon Elastic Container Service (ECS):

    A container orchestration service supporting Docker containers for simplified management.

  5. VMware Cloud on AWS:

    Enables hybrid cloud provisioning without custom hardware, bridging on-premises infrastructure with AWS.

  6. AWS Elastic Beanstalk:

    Provides a streamlined approach to running and managing web applications by handling provisioning, deployment, and scaling automatically.

  7. AWS Lambda:

    A serverless compute solution that charges only for compute time used. It eliminates the need for server management.

  8. Amazon Elastic Kubernetes Service (EKS):

    Simplifies running Kubernetes on AWS for container orchestration.

  9. Amazon Lightsail:

    A user-friendly service for building applications or websites with minimal setup.

  10. AWS Batch:

    Allows running batch jobs at any scale.

  11. AWS Fargate:

    A container service that reduces the need for server or cluster management, letting you focus on applications.

  12. AWS Outposts:

    Enables select AWS services to run in on-premises data centers.

  13. AWS Serverless Application Repository:

    Facilitates discovering, deploying, and publishing serverless applications.

Key Considerations Before Launching an EC2 Instance

When launching an EC2 instance, several decisions and configurations must be made:

  1. AMI (Amazon Machine Image):

    A template for creating EC2 instances. Choices include:

    • Quick-start: Preconfigured Linux and Windows AMIs provided by AWS.
    • My AMIs: Custom AMIs created by the user.
    • AWS Marketplace: Templates from third-party vendors.
    • Community AMIs: Shared AMIs from other users, often risky.
  2. Instance Type:

    Determines the combination of CPU, memory, storage, and network capacity.

    • Categories:
      • General Purpose: Balanced resources (e.g., t3.micro for web applications and testing).
      • Compute Optimized: High-performance CPU (e.g., c5 for scientific modeling and video encoding).
      • Memory Optimized: For memory-intensive workloads (e.g., r5 for databases and data analysis).
      • Storage Optimized: High storage I/O.
      • Accelerated Computing: Specialized for tasks like GPU-based machine learning.
  • Networking Features:
    • Up to 100 Gbps on high-performance instances like p3dn.24xlarge.
    • Enhanced networking options such as Elastic Network Adapter (ENA).
  1. Network Settings: Configuring VPCs and subnets for connectivity.

  2. IAM Role: Assign permissions for accessing AWS resources.

  3. User Data: Scripts to run during instance initialization.

  4. Storage Options:

    • Amazon Elastic Block Store (EBS): Persistent, durable storage.
    • Instance Store: Ephemeral storage tied to the lifecycle of the instance.
    • Additional Options: Elastic File System (EFS) and Amazon Simple Storage Service (S3).
  5. Tags: Metadata for organizing and managing resources.

  6. Security Group: Virtual firewalls controlling network traffic.

  7. Key Pairs: Encryption keys for secure access.

Amazon EC2 Pricing Models

AWS offers several pricing models tailored to different workloads:

  1. On-Demand Instances:

    • No long-term commitments; pay by the hour.
    • Ideal for low-cost flexibility.
  2. Spot Instances:

    • Runs as long as the bid price exceeds the spot price.
    • Suitable for large-scale dynamic workloads.
  3. Reserved Instances:

    • Offers discounts for a 1-year or 3-year commitment.
    • Ensures capacity availability.
  4. Dedicated Hosts and Instances:

    • Physical servers or hardware dedicated to a single customer.
    • Helps meet compliance and regulatory requirements.
  5. Scheduled Reserved Instances:

    • Capacity reservations for recurring schedules over 1 year.

Four Pillars of Cost Optimization

  1. Right Size: Select appropriately sized resources.
  2. Increase Elasticity: Scale dynamically with demand.
  3. Optimal Pricing Models: Leverage spot or reserved instances.
  4. Optimize Storage Choices: Use cost-effective storage like S3 or EFS.

Container Services

Containers offer lightweight, portable environments for applications.

  • Benefits:

    • Repeatable and self-contained.
    • Ensures consistency across environments.
    • Faster to start and stop than traditional VMs.
  • Docker: A platform for packaging applications into containers.

  • Amazon ECS: Simplifies container management. Choose between:

    • ECS on EC2: For granular control.
    • ECS with Fargate: For ease of use.
  • Amazon EKS: Simplifies Kubernetes management on AWS.

  • Amazon Elastic Container Registry (ECR): Fully managed service for storing and deploying container images.

AWS Lambda

AWS Lambda offers serverless, event-driven compute.

  • Event Sources:

    • S3, DynamoDB, SNS, SQS, API Gateway, and more.
  • Soft Limits (per region):

    • Concurrent executions: 1,000.
    • Function and layer storage: 75 GB.
  • Hard Limits (per function):

    • Max memory: 10,240 MB.
    • Max timeout: 15 minutes.

AWS Elastic Beanstalk

AWS Elastic Beanstalk simplifies application management by handling:

  • Infrastructure provisioning.
  • Deployment and scaling.
  • Health monitoring and logging.

Benefits:

  • Quick to start.
  • Developer productivity.
  • Complete resource control.

CONCLUSION

AWS Compute Services and tools empower users with the flexibility, scalability, and efficiency needed for modern applications. By understanding these services and making informed choices, businesses can optimize performance and costs while focusing on innovation.

Top comments (0)