Posts

Showing posts from September, 2025

Deploying and Managing Infrastructure at Scale

Image
Deploy and Manage Infrastructure at Scale CloudFormation CloudFormation is a declarative way of outline your AWS Infrastructure, for any resources (most of them are supported) For example, within a CloudFormation template, you say: I want a security group I want two EC2 instances using this security group I want an S3 bucket I want a load balancer (ELB) in front of these machines Then CloudFormation creates those for you, in the right order, with the exact configuration that you specify Benefits of CloudFormation Infrastructure as code No resource are manually created, which is excellent for control Changes to the infrastructure are reviewed through code Cost Each resources within the stack is tagged with an identifier so you can easily see how much a stack costs you You can estimate the costs of your resources using the CloudFormation template Savings strategy: In Dev, you could automation deletion of templates at 5 PM and recreated at 8 AM safely Productivity Ability to destroy and r...

AWS Serverless Services for Computation

Image
 AWS Serverless Services for Computation Docker Docker is a software development platform to deploy apps Apps are packaged in containers that can be run on any OS Apps run the same, regardless of where they're run Any machine No compatibility issues Predictable behavior Less work Easier to maintain and deploy Works with any language, any OS, any technology Scale containers up and down very quickly (seconds) Docker images and storage Docker images are stored in Docker Repositories Public: Docker Hub https://hub.docker.com/ Find base images for many technologies or OS: Ubuntu MySQL NodeJS, Java .... Private: Amazon ECR (Elastic Container Registry) Docker vs Virtual Machines Docker is "sort of" a virtualization technology, but not exactly Resources are shared with the host => many containers on one server ECS ECS = Elastic Container Service Launch Docker containers on AWS You must provision & maintain the infrastructure (the EC2 instances) AWS takes care of starting/s...

Databases in AWS

Image
 Databases in AWS Databases Storing data on disk (EFS, EBS, EC2 Instance Store, S3) can have its limits Sometimes, you want to store data in a database.... You can structure the data You build indexes to efficiently query/search through the data You define relationships between your datasets Databases are optimized for a purpose and come with different features, shapes and constraints Relational Databases Looks like Excel spreadsheets, with links between tables for relationship and normalizing data as per requirement. NOSQL Databases NoSQL = non-SQL = non relational databases NoSQL databases are purpose built for specific data models and have flexible schemas for building modern applications Benefits: Flexibility: easy to evolve data model Scalability: designed to scale-out by using distributed clusters High-performance: optimized for a specific data model Highly functional: types optimized for the data model Examples: key-value, document, graph, in-memory, search databases NoSQL d...

Amazon S3

Image
 Amazon S3 S3 is one of the main building blocks of AWS Infinitely scaling storage Many websites use Amazon S3 as a backbone Many AWS services use S3 as an integration as well Amazon S3 use cases Backup and storage Disaster Recovery Archive Hybrid Cloud storage Application hosting Media hosting Data lakes & big data analytics Software delivery Static website examples: Nasdaq stored 7 years of data into S3 glacier Sysco runs analytics on its data and gain business insights Amazon S3 - Buckets Amazon S3 allows people to store objects (files) in "buckets" (directories) Buckets must have a globally unique name (across all regions all accounts) Buckets are defined at the region level S3 looks like a global service but buckets are created in a region Naming convention No uppercase, No underscore 3-63 character long Not an IP Must start with lowercase letter or number Must Not start with the prefix xn-- Must Not end with the suffix -s3alias Amazon S3 - Objects Objects (files) ha...

ELB & ASG

Image
 Elastic Load Balancer and Auto Scaling Groups Scalability & High Availability Scalability means that an application / system can handle greater loads by adapting. There are two kinds of scalability: Vertical Scalability Horizontal Scalability ( = elasticity) Scalability is linked but different to High Availability Vertical Scalability Vertical Scalability means increasing the size of the instance For example, your application runs on a t2.micro Scaling that application vertically means running it on a t2.large Vertical scalability is very common for non distributed systems, such as a database. There's usually a limit to how much you can vertically scale (hardware limit) Horizontal Scalability Horizontal Scalability means increasing the number of instances / systems for your application Horizontal scaling implies distributed systems. This is very common for web applications / modern applications It's easy to horizontally scale thanks the cloud offerings such as Amazon EC2 H...

AMI, EC2 Image Builder, Local EC2 Instance Store, EFS, Shared Responsibility, FSx

Image
 AMI AMI = Amazon Machine Image AMI are a customization of an EC2 instance You add your own software, configuration, operating system, monitoring... Faster boot/ configuration time because all your software is pre-packaged AMI are built for a specific region ( and can be copied across regions) You can launch EC2 instances from: A public AMI: AWS provided Your own AMI: you make and maintain them yourself An AWS Marketplace AMI: an AMI someone else made (and potentially sells) AMI Process (from an EC2 instance) Start an EC2 instance and customize it Stop the instance (for data integrity) Build an AMI - this will also create EBS snapshots Launch instances from other AMIs EC2 Image Builder Used to automate the creation of Virtual Machines or container images Automate the creation, maintain, validate and test EC2 AMIs Can be run on a schedule (weekly, whenever packages are updated, etc....) Free service (only pay for the underlying resources) EC2 Instance Store EBS volumes are network d...