Other Services

Other Services

AMI
Using a custom built AMI can provide the following advantages:
  1. Pre-installed packages needed
  1. Faster boot time (no need for ec2 user data at boot time)
  1. Machine comes configured with monitoring / enterprise software
  1. Security concerns - control over the machines in the network
  1. Control of maintenance and updates of AMIs over time
  1. Active Directory Integration out of the box
  1. Installing your app ahead of time (for faster denloys when auto-scaling)
  1. Using someone else's AMI that is optimised for DB, etc...
Note:AMI's are region specific
AMI Storage
Your AMI take space and they live in Amazon S3 • Amazon S3 is a durable, cheap and resilient storage where most of your backups will live (but you won't see in the S3 console) • By default, your AMls are private, and locked for your account / region. • You can also make your own AMI or tranfer to ther AWS accounts or sell them on the Marketplace.
Elastic IP
  • With an Elastic IP address, you can mask the failure of an instance or software by rapidly remapping the address to another instance in your account. • You can only have 5 Elastic IP in your account (you can ask AWS to increase that).
Note, try to avoid using Elastic IP because they often reflect poor architectural decisions. Instead, use a random public IP and register a DNS name to it Or, use a Load Balancer and don't use a public IP.
Placement Groups
  1. Cluster Group: Same Rack, Same AZs. Packs instances close together inside an Availability Zone. This strategy enables workloads to achieve the low-latency network performance necessary for tightly-coupled node-to-node communication that is typical of HPC applications.
  1. Spread Group: Small group of instances across multiple AZs. Strictly places a small group of instances across distinct underlying hardware to reduce correlated failures.
  1. Partition Group: Combination of the above. Spreads your instances across logical partitions such that groups of instances in one partition do not share the underlying hardware with groups of instances in different partitions. This strategy is typically used by large distributed and replicated workloads, such as Hadoop, Cassandra, and Kafka.
ECS
• Launch Docker containers on AWS You must provision & maintain the infrastructure (the EC2 instances) • AWS takes care of starting/Stopping containers • You can integrate Application Load Balancer
ECS Task Definitions
  1. Task Definitions are metadata in JSON format to tell ECS how to Run a Docker Container. It Contains Crucial Information like: • Image Name • Port Binding for Container and Host • Memory and CPU Required • Environment Variables • Networking Information • IAM Role • Logging Configurations (ex: CloudWatch) • Internet Gateway
ECS IAM Roles
EC2 Instance Profile:
  1. Used by the ECS Agent
  1. Make API Calls to ECS Service
  1. Send Container Logs to CloudWatch Logs
  1. Pull Docker Image from ECR
ECS Task Role:
  1. Allow Each Task to Have a Specific Role
  1. Use Different Roles for the Different ECS Services you Run
  1. Task Role is Defined in the Task Definition
ECS Service:
  1. ECS Services Help Define How Many Tasks Should Run and How They should be Run.
  1. They Ensure that the Number of Tasks Desired is Running Across our Fleet of EC2 Instance.
  1. They can be Linked to ELB / NLB / ALB if Needed
  1. You Can Run Task Without ECS Services!
Fargate
  • Launch Docker containers on AWS • You do not provision & maintain the infrastructure (no EC2 instances) • Serverless offering • AWS just runs containers for you based on the CPU/RAM you need
Lamda
PROS
CONS
Less time spent maintaining infrastructure
Less flexibility and control
Built-in scalability
Not necessarily cheaper
Only pay for what you need
Potential cold starts
Integrates with other AWS services
Limitations:
  1. Functions will timeout after 15 minutes.
  1. The amount of RAM available ranges from 128MB to 3008MB with a 64MB increment between each option.
  1. The Lambda code should not exceed 250mb in size, and the zipped version should be no larger than 50mb
  1. There is a limit of 1,000 requests that can run concurrently, any request above this limit will be throttled and will need to wait for other functions to finish running.
 
Elastic Beanstalk
  • Deploy and Scale: Deploys and scales your web applications, including the web application server platform.
  • Programming Languages: Java, PHP, Python, Ruby, Go, Docker, .NET, Node.js.
  • Application Servers: Apache http Server, Tomcat, Passenger, Puma, Nginx, and IIS.
  • Provision AWS Resources: Provisions the AWS resources for you, e.g. EC2, RDS, S3, Elastic Load Balancers, Auto Scaling Groups, etc.
  • Systems Administration: OS and application server updates. Monitoring, metrics, and health checks are all included.
  • Administrative Control: Can fully manage the EC2 instances for you or you can take full administrative control.
Elastic Cache
  • In-Memory Cache (Key Value): ElastiCache facilitates the seamless deployment, operation, and scalability of an in-memory cache in the cloud.
  • Enhances Database Performance: It provides the capability to access data from swift in-memory caches rather than slower disk-based storage, thereby improving overall database performance.
  • Ideal for Read-Heavy Database Workloads: In-Memory Cache is particularly beneficial for caching the results of I/O-intensive database queries. Additionally, it proves valuable in storing session data for distributed applications.
    • Types
      Memcached
      Redis
      Great for basic object caching.
      A more sophisticated solution with enterprise features like persistence, replication, Multi-AZ, and failover.
      Scales horizontally, but no persistence, Multi-AZ, or failover.
      Supports sorting and ranking data (e.g., for gaming leaderboards), and complex data types like lists and hashes.
      A good choice for simple caching needs.
Cognito
  1. Sign-up and sign-in options for your apps.
  1. Access for guest users.
  1. Acts as an identity broker between you, eliminating the need for writing custom code.
  1. Synchronizes user data across multiple devices.
  1. Integration with social media authentication and web ID providers.
Aurora
  • 5x Performance: Amazon Aurora offers up to 5 times better performance compared to MySQL and 3 times better performance compared to PostgreSQL databases.
  • Lower Price Point: Despite the improved performance, Aurora is available at a much lower price point, making it a cost-effective choice for applications requiring high performance.
  • Similar Performance and Availability: While delivering enhanced performance, Aurora maintains similar levels of performance and availability as traditional relational databases, ensuring reliability and uptime for your applications.
DynamoDB
Amazon DynamoDB is a fully managed NoSQL database service designed to provide fast and flexible storage for various applications. It offers consistent, single-digit millisecond latency regardless of the scale of your application.
Key Features of DynamoDB:
  1. NoSQL Database: DynamoDB supports both document and key-value data models, allowing you to store and retrieve data in a flexible manner.
  1. Fully Managed: DynamoDB is a fully managed database service, meaning AWS handles administrative tasks such as hardware provisioning, setup, configuration, and maintenance, allowing you to focus on developing your applications.
  1. Scalability: DynamoDB scales seamlessly to handle any amount of traffic and data, automatically adjusting its capacity to meet your application's needs. It can handle millions of requests per second and trillions of rows, making it suitable for applications with high traffic and demanding workloads.
  1. Low Latency: With its optimized architecture, DynamoDB delivers consistent, single-digit millisecond latency, enabling fast read and write operations. This makes it well-suited for real-time applications and use cases that require rapid data access.
  1. Versatility: DynamoDB is widely applicable and can be used for a variety of applications such as mobile, web, gaming, ad-tech, IoT, and more. Its flexible data model and reliable performance make it a suitable choice for diverse use cases.