AWS Journey β Week 1 | AWS Cloud Fundamentals & First Deployment π
Understanding Public Cloud, IAM Security & Deploying Jenkins on EC2

Search for a command to run...
Understanding Public Cloud, IAM Security & Deploying Jenkins on EC2

No comments yet. Be the first to comment.
Learn AWS from a DevOps Engineer's perspective. This series covers AWS fundamentals, IAM, EC2, VPC, S3, Route 53, Load Balancers, Auto Scaling, CloudWatch, ECS, EKS, CI/CD, Infrastructure as Code, Monitoring, Security, and real-world DevOps projects using AWS.
A beginner-friendly journey into AWS networking architecture covering VPC design, subnetting, traffic flow, cloud security layers, firewall concepts, and DNS management using Amazon Route 53 with real-world DevOps scenarios.
π Build a Production-Ready CI Pipeline on AWS with GitHub, Docker & CodeBuild Learn how to automate Docker image building, testing, and deployment whenever code is pushed to GitHub.

Understand AWS CodePipeline from scratch, how CI/CD orchestration works, how Jenkins compares with AWS CodePipeline, and the key differences between open-source/self-managed tools and AWS managed services.

Learn AWS CI/CD from scratch with AWS CodeCommit. Understand CI/CD concepts, AWS Developer Tools, CodeCommit architecture, IAM permissions, repository creation, Git commands, authentication, security, real-world use cases, CodeCommit vs GitHub, best practices, troubleshooting, and interview questions.

Learn AWS CloudFormation (CFT) from scratch with simple explanations, real-world examples, YAML templates, best practices, Drift Detection, CloudFormation vs Terraform, interview questions, and hands-on demonstrations.

The AWS Command Line Interface (AWS CLI) is one of the most important tools for DevOps Engineers, Cloud Engineers, and System Administrators. While the AWS Management Console (GUI) is excellent for be

Cloud computing has completely changed the way organizations build, deploy, and manage applications. Instead of purchasing expensive physical servers and maintaining data centers, companies can now use cloud platforms like AWS, Azure, and Google Cloud to access computing resources whenever required.
In this blog, we will understand:
What is Cloud Computing?
Evolution from Traditional Data Centers to Cloud
What is Virtualization?
Public Cloud vs Private Cloud
Why AWS is Popular?
Benefits of AWS for DevOps Engineers
How to Create an AWS Account
This blog is part of the AWS Zero to Hero for DevOps Engineers journey, where we will learn AWS concepts practically with real-world examples.
Cloud Computing is the delivery of IT resources like servers, storage, databases, networking, and software over the internet on demand.
Instead of buying and managing physical hardware, organizations can rent resources from cloud providers and pay only for what they use.
Earlier, companies followed an on-premises infrastructure model:
Company β Buys Servers β Setup Data Center β Maintain Hardware β Deploy Applications
Challenges:
High hardware cost π°
Requires physical space
Manual maintenance
Limited scalability
Hardware failure risks
Example:
A company launching a new application needs:
Servers
Storage
Network devices
Security systems
IT administrators
Setting up everything can take weeks or months.
Cloud computing evolved because organizations needed faster, cheaper, and scalable infrastructure.
Physical Server
|
|
Operating System
|
|
Application
One physical server usually runs one application, causing resource wastage.
Virtualization is the technology that allows multiple virtual machines to run on a single physical server.
Example:
One powerful physical server can create:
Physical Server
|
|
Hypervisor
|
-----------------
| | |
VM-1 VM-2 VM-3
Linux Linux Windows
Benefits:
β
Better hardware utilization
β
Reduced infrastructure cost
β
Easy resource management
β
Faster deployment
Virtualization became the foundation of modern cloud computing.
A Public Cloud is a cloud environment where infrastructure is owned and managed by third-party cloud providers.
Examples:
Amazon Web Services (AWS)
Microsoft Azure
Google Cloud
Cloud providers manage:
Physical servers
Networking equipment
Data centers
Hardware maintenance
Security infrastructure
Users only consume required services.
A Private Cloud is a cloud infrastructure dedicated to a single organization.
Example:
A banking organization creates and manages its own cloud environment.
Architecture:
Organization
|
Private Cloud
|
Applications & Data
β
More control
β
Higher customization
β
Better compliance management
β Expensive infrastructure
β Requires skilled administrators
β Maintenance responsibility is on the organization
| Feature | Public Cloud | Private Cloud |
|---|---|---|
| Ownership | Cloud Provider | Organization |
| Cost | Low initial cost | High investment |
| Maintenance | Managed by provider | Managed internally |
| Scalability | Very high | Limited |
| Example | AWS, Azure, GCP | Enterprise Private Cloud |
| Best For | Startups, enterprises | Organizations requiring complete control |
Public cloud became popular because it solves many infrastructure problems.
You pay only for the resources you consume.
Example:
Instead of purchasing a server worth βΉ5 lakh:
Create cloud server
Use it for required time
Stop it when not needed
Pay only usage cost
Cloud allows applications to increase or decrease resources according to demand.
Example:
During a festival sale:
Normal Traffic
|
Increase Users
|
Automatically Add More Servers
After traffic decreases:
Remove Extra Resources
Save Cost
Cloud providers handle:
Server maintenance
Hardware replacement
Data center management
Network infrastructure
Developers and DevOps engineers can focus on applications.
AWS is one of the most widely used cloud platforms globally.
AWS was one of the first major cloud providers and has a large ecosystem.
AWS provides services for:
Compute
Storage
Networking
Databases
Security
Monitoring
Machine Learning
Containers
Examples:
| Requirement | AWS Service |
|---|---|
| Virtual Server | EC2 |
| Storage | S3 |
| Database | RDS |
| Networking | VPC |
| Kubernetes | EKS |
| Monitoring | CloudWatch |
AWS knowledge is highly valuable for:
DevOps Engineers
Cloud Engineers
Solutions Architects
SRE Engineers
Many organizations use AWS for production workloads.
Cloud repatriation means moving workloads back from cloud environments to on-premises infrastructure.
Reasons:
Cost optimization
Compliance requirements
Specific business needs
However, most organizations continue using cloud because of:
β
Flexibility
β
Scalability
β
Faster deployment
β
Managed services
Modern DevOps engineers work heavily with cloud environments.
AWS helps DevOps engineers manage:
EC2
VPC
Load Balancers
CloudFormation
AWS CLI
EKS
ECS
CodePipeline
CodeBuild
CodeDeploy
To start learning AWS, we need an AWS account.
β
Email address
β
Phone number
β
Payment card for verification
AWS provides a Free Tier that allows beginners to practice many services without immediate charges within free usage limits.
Go to AWS official website and select:
Create AWS Account
Provide:
Email address
Account name
Password
AWS verifies:
Mobile number
AWS requires payment details for identity verification.
Note:
Adding a card does not mean automatic charges if you stay within Free Tier limits.
For beginners:
Choose:
Basic Support Plan (Free)
After successful setup:
You can access:
AWS Management Console
|
|
AWS Services Dashboard
Imagine you want to build an e-commerce website.
You need:
Buy servers
Install software
Configure networking
Maintain hardware
Time: Weeks/Months
You can:
Create EC2 server
Store images in S3
Use RDS database
Configure Load Balancer
Monitor using CloudWatch
Time: Minutes
β Cloud computing provides IT resources over the internet.
β Virtualization made cloud computing possible.
β Public cloud removes hardware management responsibility.
β AWS is one of the leading cloud platforms.
β DevOps engineers must understand AWS services.
β AWS provides scalable, flexible, and cost-effective infrastructure.
AWS Identity and Access Management (IAM) is one of the most important security services in AWS that helps organizations control who can access AWS resources and what actions they can perform.
In simple words:
IAM answers two important questions:
Who are you? β Authentication
What are you allowed to do? β Authorization
Example:
Imagine an office building:
Authentication β Security guard checks your ID card.
Authorization β Your ID card decides which rooms you can enter.
Similarly, AWS IAM verifies users and provides permissions to access AWS services.
When an AWS account is created, it comes with a Root User that has complete access to all AWS services.
Using the root user for daily activities is dangerous because:
It has unlimited permissions.
Any mistake can impact the entire AWS account.
If credentials are compromised, attackers can access everything.
Therefore, AWS recommends:
β
Create separate IAM users
β
Assign only required permissions
β
Follow the Principle of Least Privilege
Understanding these two concepts is very important for AWS security.
Authentication verifies the identity of a user or application.
Examples:
Username and password
Access Key ID and Secret Access Key
Multi-Factor Authentication (MFA)
Example:
A developer logs into AWS using IAM credentials.
AWS verifies:
Is this user valid?
Authorization decides what actions the authenticated user can perform.
Example:
A developer may have permission to:
β
Create EC2 instances
β
View S3 buckets
But may not have permission to:
β Delete databases
β Modify IAM policies
AWS uses policies to define these permissions.
AWS IAM mainly consists of four important components:
Users
Groups
Policies
Roles
An IAM User represents an individual person or application that needs access to AWS.
Examples:
Developer
Tester
Database Administrator
DevOps Engineer
Example:
A company has:
Developers
|
|-- Rahul
|-- Amit
|-- Priya
Each employee can have their own IAM user.
Benefits:
β
Individual access control
β
Activity tracking
β
Better security
β
Easy permission management
An IAM Group is a collection of IAM users with similar permissions.
Instead of assigning permissions individually to every user, we create groups.
Example:
Development Group
Users:
- Rahul
- Amit
- Priya
Permissions:
- EC2 Access
- S3 Access
When a new developer joins:
Instead of creating permissions again:
Create User β Add User to Development Group
The user automatically gets required permissions.
Developers
QA Team
Administrators
Database Team
Security Team
Policies define what actions a user, group, or role can perform.
IAM policies are written in JSON format.
A policy contains:
Effect β Allow or Deny
Action β AWS operation
Resource β AWS resource
Example:
A policy allowing S3 access:
{
"Effect": "Allow",
"Action": [
"s3:*"
],
"Resource": "*"
}
Meaning:
Allow
|
|-- All S3 actions
|
|-- On all resources
IAM Roles provide temporary permissions to AWS services or users.
Unlike users:
Roles do not have passwords.
Roles provide temporary credentials.
Mostly used by applications and AWS services.
Example:
A web application running on EC2 needs access to S3.
Bad approach:
Store AWS Access Keys inside application code
Security risk β
Better approach:
EC2 Instance
|
|
IAM Role
|
|
S3 Access Permission
The application automatically gets permission through the role.
The complete IAM access flow:
User/Application
|
|
Authentication
|
|
IAM Policy Evaluation
|
|
Authorization
|
|
AWS Resource Access
Example:
Developer wants to create an S3 bucket.
Flow:
Developer Login
|
|
IAM verifies identity
|
|
Checks attached policies
|
|
Allow/Deny request
|
|
Create S3 Bucket
One of the most important AWS security principles.
Meaning:
Give users only the permissions they actually need.
Example:
A developer only needs:
Read + Write access to S3
Do not provide:
Administrator Access
because unnecessary permissions increase security risks.
Root account should only be used for:
Account setup
Billing configuration
Critical operations
For daily tasks:
Use IAM users.
Multi-Factor Authentication adds an extra security layer.
Example:
Password + Mobile OTP
Even if a password is leaked, attackers cannot access the account easily.
Avoid:
AWS_ACCESS_KEY=xxxxx
AWS_SECRET_KEY=xxxxx
inside application code.
Use:
Application
|
|
IAM Role
|
|
AWS Services
Remove:
Unused users
Old access keys
Unnecessary permissions
Steps:
AWS Console
|
IAM Service
|
Users
|
Create User
Provide:
Username
Access type
Permissions
Company requirement:
A developer needs access to S3.
Share AWS Root Credentials
Problem:
β No tracking
β Security risk
β Complete account access
Create user:
Developer Rahul
Attach policy:
AmazonS3FullAccess
Now:
Rahul can:
β
Create buckets
β
Upload files
β
Manage objects
But cannot:
β Delete EC2 instances
β Modify IAM users
A company has multiple teams:
Organization
βββ Developers
βββ QA Engineers
βββ DevOps Team
βββ Security Team
Each team requires different permissions.
Solution:
IAM Groups
Developer Group
|
βββ EC2 + S3 Access
QA Group
|
βββ Testing Environment Access
DevOps Group
|
βββ Full Infrastructure Access
This provides:
β
Better security
β
Easy management
β
Clear responsibility
DevOps engineers use IAM for:
Example:
Jenkins needs permission to deploy applications.
Solution:
Jenkins
|
IAM Role
|
AWS Deployment Permissions
Applications running inside Kubernetes need AWS access.
Solution:
Pod
|
IAM Role
|
AWS Services
Tools like:
Terraform
Ansible
CloudFormation
use IAM permissions to create and manage AWS resources.
Answer:
AWS IAM is a security service that helps manage users, permissions, and access control for AWS resources.
It provides authentication and authorization to securely manage AWS services.
| IAM User | IAM Role |
|---|---|
| Permanent identity | Temporary identity |
| Has username/password | No password |
| Used by humans | Used by applications/services |
| Long-term credentials | Temporary credentials |
Answer:
IAM Policy is a JSON document that defines permissions.
It specifies:
Which actions are allowed
On which resources
For which users or roles
Answer:
Root user has unlimited permissions.
Using it daily increases security risks.
AWS recommends creating IAM users with limited permissions.
Answer:
It means providing only the minimum permissions required to complete a task.
Example:
A developer who only needs S3 access should not receive administrator permissions.
β
IAM manages AWS access securely
β
Authentication verifies identity
β
Authorization controls permissions
β
Users represent individuals
β
Groups simplify permission management
β
Policies define access rules
β
Roles provide temporary permissions
β
Always follow least privilege security practices
Amazon EC2 (Elastic Compute Cloud) is one of the most important services in AWS that provides virtual servers in the cloud.
In simple words:
EC2 allows you to create and manage virtual machines on AWS without purchasing or maintaining physical hardware.
Instead of buying a physical server:
Traditional Infrastructure:
Company
|
|
Physical Server
|
|
Application
AWS provides:
AWS Cloud:
User
|
|
EC2 Instance (Virtual Server)
|
|
Application
With EC2, you can:
β
Launch servers within minutes
β
Choose CPU, memory, and storage according to requirements
β
Scale resources whenever needed
β
Pay only for what you use
Before cloud computing, organizations had to:
Buy physical servers
Setup data centers
Maintain hardware
Manage networking
Handle server failures
Problems:
β High infrastructure cost
β Long setup time
β Difficult scaling
β Hardware maintenance overhead
AWS EC2 solves these problems:
β
On-demand servers
β
Flexible pricing
β
Easy scaling
β
Global availability
The word Elastic means the ability to increase or decrease resources based on requirements.
Example:
An e-commerce website during normal days:
Users: 10,000
Required:
2 EC2 Instances
During a festival sale:
Users: 1,00,000
Required:
20 EC2 Instances
EC2 allows organizations to scale resources according to traffic.
Benefits:
β
Better performance
β
Reduced cost
β
High availability
An EC2 instance contains:
EC2 Instance
+-------------------+
| Operating System |
| Ubuntu / Linux |
+-------------------+
| Application |
| Jenkins |
+-------------------+
| CPU |
| Memory |
| Storage |
+-------------------+
AMI is a template used to create EC2 instances.
It contains:
Operating System
Software configuration
Required settings
Examples:
Ubuntu AMI
Amazon Linux AMI
Windows Server AMI
When launching an EC2 instance:
AMI
|
|
Creates
|
|
EC2 Instance
Instance type defines the hardware configuration of an EC2 machine.
It decides:
CPU power
Memory
Network performance
Storage capability
Example:
t2.micro
CPU:
1 vCPU
Memory:
1 GB RAM
AWS provides different instance families.
Balanced CPU, memory, and networking.
Used for:
Web servers
Development environments
Testing
Examples:
t2.micro
t3.medium
Beginner projects usually use:
t2.micro
because it is suitable for learning.
Designed for CPU-intensive workloads.
Used for:
Gaming servers
Scientific calculations
Batch processing
Example:
C Series
Designed for applications requiring high memory.
Used for:
Databases
Big data applications
Cache systems
Example:
R Series
Designed for high-speed storage.
Used for:
Data processing
Large databases
Analytics workloads
Uses GPUs for heavy processing.
Used for:
Machine learning
AI workloads
Video processing
A Region is a geographical location where AWS has data centers.
Examples:
Asia Pacific (Mumbai)
US East (North Virginia)
Europe (Ireland)
Availability Zone (AZ) is an isolated data center inside a region.
Example:
Mumbai Region
|
|
+--- Availability Zone A
|
+--- Availability Zone B
|
+--- Availability Zone C
Benefits:
β
High availability
β
Disaster recovery
β
Low latency
Security is managed using:
A Security Group acts like a virtual firewall.
It controls:
Incoming traffic
Outgoing traffic
Example:
Default:
SSH Port 22
Blocked
Allow:
Port 22 β SSH Access
Port 8080 β Jenkins Access
Port 80 β Website Access
AWS uses key pairs for secure authentication.
A key pair contains:
Public Key
+
Private Key (.pem file)
Example:
jenkins-key.pem
Used for SSH login.
Command:
ssh -i jenkins-key.pem ubuntu@<public-ip>
Before connecting:
Change permission:
chmod 600 jenkins-key.pem
Why?
Because AWS requires private keys to be accessible only by the owner.
Now let's deploy Jenkins on an EC2 instance.
Architecture:
Developer
|
|
AWS EC2 Instance
|
|
Ubuntu Server
|
|
Jenkins Application
|
|
CI/CD Pipeline
Configuration:
AMI:
Ubuntu
Instance Type:
t2.micro
Storage:
Default
Security Group:
SSH - Port 22
Custom TCP - Port 8080
Using SSH:
ssh -i key.pem ubuntu@public-ip
Successful login:
ubuntu@ip-172-xx-xx
Now we are inside our cloud server.
Run:
sudo apt update
Why?
To get the latest package information.
Jenkins requires Java.
Install:
sudo apt install openjdk-17-jdk
Verify:
java -version
Output:
openjdk version 17
Add Jenkins repository:
curl -fsSL https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo tee \
/usr/share/keyrings/jenkins-keyring.asc
Install Jenkins:
sudo apt install jenkins
Start Jenkins:
sudo systemctl start jenkins
Enable on startup:
sudo systemctl enable jenkins
Check status:
sudo systemctl status jenkins
Jenkins runs on:
Port 8080
Allow inbound traffic:
Custom TCP
Port:
8080
Source:
0.0.0.0/0
Now Jenkins can be accessed externally.
Open browser:
http://<EC2-Public-IP>:8080
Example:
http://13.xx.xx.xx:8080
Jenkins login page appears.
Run:
sudo cat /var/lib/jenkins/secrets/initialAdminPassword
Copy password and complete setup.
A company wants to automate application deployment.
Previously:
Developer
Manual Deployment
Production Server
Problems:
β Slow deployment
β Human errors
β No automation
Solution:
Developer
|
|
GitHub
|
|
Jenkins on EC2
|
|
Build + Test + Deploy
|
|
Production
Benefits:
β
Automated deployments
β
Faster releases
β
Better reliability
EC2 is commonly used for:
Example:
Frontend
Backend API
Database
Tools:
Jenkins
GitLab Runner
GitHub Actions Runner
Developers create temporary environments for testing.
Running:
Prometheus
Grafana
ELK Stack
Check server information:
uname -a
Check disk:
df -h
Check memory:
free -h
Check running services:
systemctl status
Install packages:
sudo apt install <package>
Answer:
Amazon EC2 is a cloud computing service that provides scalable virtual servers in AWS.
It allows users to run applications without managing physical infrastructure.
Answer:
Region is a geographical AWS location.
Availability Zone is an isolated data center inside a region.
Example:
Mumbai Region
AZ-A
AZ-B
AZ-C
Answer:
Security Group is a virtual firewall that controls inbound and outbound traffic for EC2 instances.
Answer:
Key pairs provide secure SSH authentication without using passwords.
Answer:
Jenkins runs on port 8080.
We allow port 8080 in Security Group and access:
http://EC2-Public-IP:8080
β
EC2 provides virtual servers in AWS
β
Elasticity allows scaling resources
β
Instance types decide performance
β
Regions and AZs provide availability
β
Security Groups protect servers
β
Key pairs provide secure access
β
Jenkins can be deployed easily on EC2
β
EC2 is one of the most important AWS services for DevOps engineers
Thank you for taking the time to read this article.
Technology is evolving rapidly, and continuous learning is one of the most valuable investments you can make in your career. Whether you're exploring DevOps, Cloud Computing, Artificial Intelligence, Cybersecurity, Software Development, Data Science, or Career Growth, the resources below can help you deepen your knowledge and stay ahead in the industry.
Learn from world-renowned universities and industry leaders including Google, IBM, Stanford, Microsoft, Meta, and many more.
β Professional Certificates β Career-focused Learning Paths β AI & Machine Learning Programs β Cloud & DevOps Certifications β Business & Leadership Courses
π https://imp.i384100.net/k0KvbV
One of the largest online learning platforms with practical, hands-on courses covering:
β DevOps & Kubernetes β Docker & Cloud Computing β AWS, Azure & GCP β Programming & Development β Cybersecurity & Ethical Hacking
π https://trk.udemy.com/MAL2MY
A great platform for anyone interested in:
β Python Programming β SQL & Databases β Data Analytics β Machine Learning β Artificial Intelligence
Interactive learning paths and hands-on projects make it ideal for beginners and professionals alike.
π https://datacamp.pxf.io/nX4kER
Access high-quality courses and certifications from leading institutions such as:
β Harvard University β MIT β Berkeley β Microsoft
Perfect for learners seeking university-level education online.
π https://edx.sjv.io/POvVeN
Enhance your creative skills with courses on:
β Graphic Design β Video Editing β Animation β Digital Marketing β Content Creation
π https://domestika.sjv.io/dynKAW
Discover exclusive lifetime deals on:
β AI Tools β Productivity Software β Developer Utilities β Marketing Platforms β Business Applications
A must-have resource for developers, creators, freelancers, and entrepreneurs looking to save money while accessing premium tools.
π https://appsumo.8odi.net/L04a33
Looking to start an online business or launch an eCommerce store?
Shopify provides everything you need to build, manage, and scale an online business.
β Online Store Builder β Payment Integration β Inventory Management β Marketing Tools
π https://shopify.pxf.io/Vxv09k
Create professional websites, blogs, and online stores with one of the most trusted web ecosystems in the world.
Ideal for:
β Personal Blogs β Portfolio Websites β Business Websites β eCommerce Stores
π https://automattic.pxf.io/Z6vR5W
Learn English and other languages through personalized one-on-one tutoring sessions with experts from around the world.
π https://preply.sjv.io/o4gBDY
Improve your professional communication skills and English fluency through structured learning programs.
π https://englishonline.sjv.io/9VOGa4
One of the most recognized language-learning platforms for immersive language acquisition.
π https://aff.rosettastone.com/X4OyqG
Interactive science kits and educational experiences designed to make STEM learning engaging and practical.
π https://imp.i328067.net/bk2beg
Educational materials and learning resources for students, teachers, and lifelong learners.
π https://carsondellosaeducation.sjv.io/E0JbjW
Creating detailed technical content, tutorials, guides, and learning resources takes significant time and effort.
If you find my articles helpful and would like to support my work, you can do so through the following platforms:
Support my open-source contributions, technical content, and community projects.
π https://github.com/sponsors/hritikranjan1
Enjoying my content? Consider buying me a chai and supporting future tutorials, guides, and educational resources.
π https://www.chai4.me/hritikranjan
Hritik Ranjan
π‘ AI Enthusiast βοΈ DevOps Learner π Cybersecurity Advocate π» Software Developer
π GitHub: https://github.com/hritikranjan1
π LinkedIn: https://linkedin.com/in/hritikranjan1
If this article added value to your learning journey:
β
Share it with your network
β
Bookmark it for future reference
β
Follow for more DevOps, AI, Cloud, Cybersecurity, and Software Engineering content
Thank you for reading and being part of this learning journey.
Keep Learning. Keep Building. Keep Growing. π