---
title: "How to Install Jenkins on AWS EC2 Instance"
lang: "en"
author: "Mohammad Abu Mattar"
canonical: https://mkabumattar.com/post/install-jenkins-on-aws-ec2-instance
---

![Blog post image for How to Install Jenkins on AWS EC2 Instance - In this post, I will show you how to create an EC2 instance on AWS and install Jenkins on it.](/_astro/hero.BzqOEmzv_ZquOeL.webp)

[Home](/)›[Blog](/blog)›[All Categories](/blog/categories)›[AWS](/blog/categories/aws)

Blog

[Prev in AWSInfrastructure Automation on AWS: CloudFormation, SAM, and Terraform for IaC](/blog/post/infrastructure-automation-on-aws-cloudformation-sam-and-terraform-for-iac)[Next in AWSKarpenter vs. Cluster Autoscaler on AWS: Picking the Right Tool for Your Kubernetes Scaling](/blog/post/karpenter-vs-cluster-autoscaler-aws-kubernetes-scaling)

[AWS](/blog/categories/aws)[Jenkins](/blog/categories/jenkins)[EC2](/blog/categories/ec2)[DevOps](/blog/categories/devops)[CI/CD](/blog/categories/cicd)

# How to Install Jenkins on AWS EC2 Instance

[Mohammad Abu Mattar](/authors/mohammad-abu-mattar)Published: 06 Dec 202207 Mins read10 Mins listen

[Markdown for AI(opens in a new tab)](/post/install-jenkins-on-aws-ec2-instance/index.md "Open the plain-Markdown version of this page, for pasting into an AI tool")

TL;DR

In this post, I will show you how to create an EC2 instance on AWS and install Jenkins on it.

Series

[Jenkins CI/CD with AWS](/series/jenkins-cicd-with-aws)1/3

[NextHow to CI/CD AWS With Github using Jenkins](/blog/post/how-to-ci-cd-aws-with-github-using-jenkins)

All posts in this series (3)

Blog3

1.  [How to Install Jenkins on AWS EC2 InstanceYou are here](/blog/post/install-jenkins-on-aws-ec2-instance)
2.  [How to CI/CD AWS With Github using Jenkins](/blog/post/how-to-ci-cd-aws-with-github-using-jenkins)
3.  [How to Setup Jenkins on AWS Using CloudFormation](/blog/post/how-to-setup-jenkins-on-aws-using-cloudformation)

### How to Install Jenkins on AWS EC2 Instance

Contents

[Introduction](#introduction)[Prerequisites](#prerequisites)[Create a VPC](#create-a-vpc)[Step 1: Create a VPC](#step-1-create-a-vpc)[Step 2: Enable DNS hostname support and DNS support on the VPC](#step-2-enable-dns-hostname-support-and-dns-support-on-the-vpc)[Step 3: Create a public subnet](#step-3-create-a-public-subnet)[Step 4: Enable auto-assign public IP on the subnet](#step-4-enable-auto-assign-public-ip-on-the-subnet)[Step 5: Create an internet gateway](#step-5-create-an-internet-gateway)[Step 6: Attach the internet gateway to the VPC](#step-6-attach-the-internet-gateway-to-the-vpc)[Step 7: Create a route table](#step-7-create-a-route-table)[Step 8: Create a custom route table association](#step-8-create-a-custom-route-table-association)[Step 9: Add a default route to the internet gateway](#step-9-add-a-default-route-to-the-internet-gateway)[Step 10: Create a security group](#step-10-create-a-security-group)[Step 11: Add a rule to the security group](#step-11-add-a-rule-to-the-security-group)[Create an EC2 instance](#create-an-ec2-instance)[Step 1: Get the latest AMI ID](#step-1-get-the-latest-ami-id)[Step 2: Create a key pair](#step-2-create-a-key-pair)[Step 3: Create a user data script](#step-3-create-a-user-data-script)[Step 4: Create an EC2 instance](#step-4-create-an-ec2-instance)[Step 5: Create an Elastic IP](#step-5-create-an-elastic-ip)[Step 6: Associate the Elastic IP with the EC2 instance](#step-6-associate-the-elastic-ip-with-the-ec2-instance)[Connect to the Jenkins server and set up Jenkins](#connect-to-the-jenkins-server-and-set-up-jenkins)[Step 1: Connect to the Jenkins server](#step-1-connect-to-the-jenkins-server)[Step 2: Set up Jenkins](#step-2-set-up-jenkins)[Step 3: Configure Jenkins](#step-3-configure-jenkins)[Conclusion](#conclusion)[References](#references)

## [Introduction](#introduction)

In this post, I will show you how to create an EC2 instance on AWS and install Jenkins on it.

## [Prerequisites](#prerequisites)

-   AWS CLI installed and configured
-   IAM user with the following permissions:
    -   AmazonVPCFullAccess
    -   AmazonEC2FullAccess

## [Create a VPC](#create-a-vpc)

### [Step 1: Create a VPC](#step-1-create-a-vpc)

To create a VPC, run the following command:

Terminal window

```
1# Create a VPC2AWS_VPC=$(aws ec2 create-vpc \3  --cidr-block 15.0.0.0/16 \4  --query 'Vpc.VpcId' \5  --output text)6
7# Add a name tag to the VPC8aws ec2 create-tags \9  --resources $AWS_VPC \10  --tags Key=Name,Value=jenkins-vpc
```

Explanation:

-   `AWS_VPC` is a variable that holds the VPC ID.
-   `--cidr-block` The IPv4 network range for the VPC, in CIDR notation.
-   `--query` The JMESPath query that is used to extract data from the output.
-   `--output` The output format of the command.

### [Step 2: Enable DNS hostname support and DNS support on the VPC](#step-2-enable-dns-hostname-support-and-dns-support-on-the-vpc)

To enable DNS hostname support and DNS support on your custom VPC, run the following command:

Terminal window

```
1# Modify your custom VPC and enable DNS hostname support, and DNS support2# Enable DNS hostnames3aws ec2 modify-vpc-attribute \4  --vpc-id $AWS_VPC \5  --enable-dns-hostnames "{\"Value\":true}"6
7# Enable DNS support8aws ec2 modify-vpc-attribute \9  --vpc-id $AWS_VPC \10  --enable-dns-support "{\"Value\":true}"
```

Explanation:

-   `--enable-dns-hostnames` Indicates whether the instances launched in the VPC get DNS hostnames.
-   `--enable-dns-support` Indicates whether DNS resolution is supported for the VPC.

### [Step 3: Create a public subnet](#step-3-create-a-public-subnet)

To create a public subnet, run the following command:

Terminal window

```
1# Create a public subnet2AWS_PUBLIC_SUBNET=$(aws ec2 create-subnet \3  --vpc-id $AWS_VPC \4  --cidr-block 15.0.1.0/24 \5  --query 'Subnet.SubnetId' \6  --output text)7
8# Add a name tag to the public subnet9aws ec2 create-tags \10  --resources $AWS_PUBLIC_SUBNET \11  --tags Key=Name,Value=jenkins-public-subnet
```

Explanation:

-   `AWS_PUBLIC_SUBNET` is a variable that holds the public subnet ID.
-   `--vpc-id` The ID of the VPC.
-   `--cidr-block` The IPv4 network range for the subnet, in CIDR notation.
-   `--query` The JMESPath query that is used to extract data from the output.
-   `--output` The output format of the command.

### [Step 4: Enable auto-assign public IP on the subnet](#step-4-enable-auto-assign-public-ip-on-the-subnet)

To enable auto-assign public IP on the subnet, run the following command:

Terminal window

```
1# Enable auto-assign public IP on the subnet2aws ec2 modify-subnet-attribute \3  --subnet-id $AWS_PUBLIC_SUBNET \4  --map-public-ip-on-launch
```

Explanation:

-   `--subnet-id` The ID of the subnet.
-   `--map-public-ip-on-launch` Indicates whether to assign a public IPv4 address to instances launched in the subnet.

### [Step 5: Create an internet gateway](#step-5-create-an-internet-gateway)

To create an internet gateway, run the following command:

Terminal window

```
1# Create an internet gateway2AWS_INTERNET_GATEWAY=$(aws ec2 create-internet-gateway \3  --query 'InternetGateway.InternetGatewayId' \4  --output text)5
6# Add a name tag to the internet gateway7aws ec2 create-tags \8  --resources $AWS_INTERNET_GATEWAY \9  --tags Key=Name,Value=jenkins-internet-gateway
```

Explanation:

-   `AWS_INTERNET_GATEWAY` is a variable that holds the internet gateway ID.
-   `--query` The JMESPath query that is used to extract data from the output.
-   `--output` The output format of the command.

### [Step 6: Attach the internet gateway to the VPC](#step-6-attach-the-internet-gateway-to-the-vpc)

To attach the internet gateway to the VPC, run the following command:

Terminal window

```
1# Attach the internet gateway to the VPC2aws ec2 attach-internet-gateway \3  --internet-gateway-id $AWS_INTERNET_GATEWAY \4  --vpc-id $AWS_VPC
```

Explanation:

-   `--internet-gateway-id` The ID of the internet gateway.
-   `--vpc-id` The ID of the VPC.

### [Step 7: Create a route table](#step-7-create-a-route-table)

To create a route table, run the following command:

Terminal window

```
1# Create a route table2AWS_ROUTE_TABLE=$(aws ec2 create-route-table \3  --vpc-id $AWS_VPC \4  --query 'RouteTable.RouteTableId' \5  --output text)6
7# Add a name tag to the route table8aws ec2 create-tags \9  --resources $AWS_ROUTE_TABLE \10  --tags Key=Name,Value=jenkins-route-table
```

Explanation:

-   `AWS_ROUTE_TABLE` is a variable that holds the route table ID.
-   `--vpc-id` The ID of the VPC.
-   `--query` The JMESPath query that is used to extract data from the output.
-   `--output` The output format of the command.

### [Step 8: Create a custom route table association](#step-8-create-a-custom-route-table-association)

To create a custom route table association, run the following command:

Terminal window

```
1# Create a custom route table association2aws ec2 associate-route-table \3  --subnet-id $AWS_PUBLIC_SUBNET \4  --route-table-id $AWS_ROUTE_TABLE
```

Explanation:

-   `--subnet-id` The ID of the subnet.
-   `--route-table-id` The ID of the route table.

### [Step 9: Add a default route to the internet gateway](#step-9-add-a-default-route-to-the-internet-gateway)

To add a default route that sends outbound traffic through the internet gateway, which is what makes the subnet public, run the following command:

Terminal window

```
1# Associate the subnet with route table, making it a public subnet2aws ec2 create-route \3  --route-table-id $AWS_ROUTE_TABLE \4  --destination-cidr-block 0.0.0.0/0 \5  --gateway-id $AWS_INTERNET_GATEWAY
```

Explanation:

-   `--route-table-id` The ID of the route table.
-   `--destination-cidr-block` The IPv4 CIDR address block used for the destination match.
-   `--gateway-id` The ID of an internet gateway or virtual private gateway attached to your VPC.

### [Step 10: Create a security group](#step-10-create-a-security-group)

To create a security group, run the following command:

Terminal window

```
1# Create a security group2AWS_SECURITY_GROUP=$(aws ec2 create-security-group \3  --group-name aws-security-group \4  --description "AWS Security Group" \5  --vpc-id $AWS_VPC \6  --query 'GroupId' \7  --output text)8
9# Add a name tag to the security group10aws ec2 create-tags \11  --resources $AWS_SECURITY_GROUP \12  --tags Key=Name,Value=jenkins-security-group
```

Explanation:

-   `AWS_SECURITY_GROUP` is a variable that holds the security group ID.
-   `--group-name` The name of the security group.
-   `--description` A description for the security group.
-   `--vpc-id` The ID of the VPC.
-   `--query` The JMESPath query that is used to extract data from the output.
-   `--output` The output format of the command.

### [Step 11: Add a rule to the security group](#step-11-add-a-rule-to-the-security-group)

To add a rule to the security group, run the following command:

Terminal window

```
1# Add a rule to the security group2
3# Add SSH rule4aws ec2 authorize-security-group-ingress \5  --group-id $AWS_SECURITY_GROUP \6  --protocol tcp \7  --port 22 \8  --cidr 0.0.0.0/0 \9  --output text10
11# Add HTTP rule12aws ec2 authorize-security-group-ingress \13  --group-id $AWS_SECURITY_GROUP \14  --protocol tcp \15  --port 80 \16  --cidr 0.0.0.0/0 \17  --output text18
19# Add HTTPS rule20aws ec2 authorize-security-group-ingress \21  --group-id $AWS_SECURITY_GROUP \22  --protocol tcp \23  --port 443 \24  --cidr 0.0.0.0/0 \25  --output text26
27# Add Jenkins rule28aws ec2 authorize-security-group-ingress \29  --group-id $AWS_SECURITY_GROUP \30  --protocol tcp \31  --port 8080-8090 \32  --cidr 0.0.0.0/0 \33  --output text
```

Explanation:

-   `--group-id` The ID of the security group.
-   `--protocol` The IP protocol name or number.
-   `--port` The port number or range of port numbers.
-   `--cidr` The IPv4 CIDR range.
-   `--output` The output format of the command.

## [Create an EC2 instance](#create-an-ec2-instance)

### [Step 1: Get the latest AMI ID](#step-1-get-the-latest-ami-id)

To get the latest AMI ID, run the following command:

Terminal window

```
1# Get the latest AMI ID2AWS_AMI=$(aws ec2 describe-images \3  --owners 'amazon' \4  --filters 'Name=name,Values=amzn2-ami-hvm-2.0.*' \5  'Name=state,Values=available' \6  --query 'sort_by(Images, &CreationDate)[-1].[ImageId]' \7  --output 'text')
```

Explanation:

-   `AWS_AMI` is a variable that holds the AMI ID.
-   `--owners` The AWS account ID of the owner.
-   `--filters` The filters.
-   `--query` The JMESPath query that is used to extract data from the output.
-   `--output` The output format of the command.

### [Step 2: Create a key pair](#step-2-create-a-key-pair)

To create a key pair, run the following command:

Terminal window

```
1# Create a key pair2aws ec2 create-key-pair \3  --key-name aws-key-pair \4  --query 'KeyMaterial' \5  --output text > aws-key-pair.pem6
7# Change the permission of the key pair8chmod 400 aws-key-pair.pem
```

Explanation:

-   `--key-name` The name of the key pair.
-   `--query` The JMESPath query that is used to extract data from the output.
-   `--output` The output format of the command.
-   `>` The output is redirected to a file.
-   `aws-key-pair.pem` The name of the file.
-   `chmod 400 aws-key-pair.pem` Change the permission of the key pair, so that only the owner can read and write.

### [Step 3: Create a user data script](#step-3-create-a-user-data-script)

To create a user data script, run the following command:

```
1# Create a user data script2cat << EOF > user-data.sh3#!/bin/bash4
5# update the system6sudo yum update -y7
8# add the jenkins repo9sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo10sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key11sudo yum upgrade12
13# install java14sudo amazon-linux-extras install java-openjdk11 -y15
16# install jenkins17sudo yum install jenkins -y18
19# start jenkins20sudo systemctl start jenkins21
22# enable jenkins23sudo systemctl enable jenkins24
25# install git26sudo yum install git -y27EOF
```

Explanation:

-   `cat << EOF > user-data.sh` The output is redirected to a file.
-   `user-data.sh` The name of the file.
-   `#!/bin/bash` The shebang line.
-   `sudo yum update -y` Update the system.
-   `sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo` Add the Jenkins repo.
-   `sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key` Import the Jenkins repo key.
-   `sudo yum upgrade` Upgrade the system.
-   `sudo amazon-linux-extras install java-openjdk11 -y` Install Java.
-   `sudo yum install jenkins -y` Install Jenkins.
-   `sudo systemctl start jenkins` Start Jenkins.
-   `sudo systemctl enable jenkins` Enable Jenkins.

### [Step 4: Create an EC2 instance](#step-4-create-an-ec2-instance)

To create an EC2 instance, run the following command:

Terminal window

```
1# Create an EC2 instance2AWS_INSTANCE=$(aws ec2 run-instances \3--image-id $AWS_AMI \4--instance-type t2.micro \5--key-name aws-key-pair \6--monitoring "Enabled=false" \7--security-group-ids $AWS_SECURITY_GROUP \8--subnet-id $AWS_PUBLIC_SUBNET \9--user-data file://user-data.sh \10--query 'Instances[0].InstanceId' \11--output text)12
13# add a name tag to the instance14aws ec2 create-tags \15  --resources $AWS_INSTANCE \16  --tags Key=Name,Value=jenkins-server
```

Explanation:

-   `AWS_INSTANCE` is a variable that holds the instance ID.
-   `--image-id` The ID of the AMI.
-   `--instance-type` The instance type.
-   `--key-name` The name of the key pair.
-   `--monitoring` The monitoring for the instance.
-   `--security-group-ids` The IDs of the security groups.
-   `--subnet-id` The ID of the subnet.
-   `--user-data` The user data to provide when launching the instance.
-   `--query` The JMESPath query that is used to extract data from the output.
-   `--output` The output format of the command.

### [Step 5: Create an Elastic IP](#step-5-create-an-elastic-ip)

To create an Elastic IP, run the following command:

Terminal window

```
1# Create an Elastic IP2AWS_ELASTIC_IP=$(aws ec2 allocate-address \3  --domain vpc \4  --query 'AllocationId' \5  --output text)6
7# add a name tag to the Elastic IP8aws ec2 create-tags \9  --resources $AWS_ELASTIC_IP \10  --tags Key=Name,Value=jenkins-server-elastic-ip
```

Explanation:

-   `AWS_ELASTIC_IP` is a variable that holds the Elastic IP ID.
-   `--domain` The domain name.
-   `--query` The JMESPath query that is used to extract data from the output.
-   `--output` The output format of the command.

### [Step 6: Associate the Elastic IP with the EC2 instance](#step-6-associate-the-elastic-ip-with-the-ec2-instance)

To associate the Elastic IP with the EC2 instance, run the following command:

Terminal window

```
1# Associate the Elastic IP with the EC2 instance2aws ec2 associate-address \3  --allocation-id $AWS_ELASTIC_IP \4  --instance-id $AWS_INSTANCE
```

Explanation:

-   `--allocation-id` The allocation ID.
-   `--instance-id` The ID of the instance.

## [Connect to the Jenkins server and set up Jenkins](#connect-to-the-jenkins-server-and-set-up-jenkins)

### [Step 1: Connect to the Jenkins server](#step-1-connect-to-the-jenkins-server)

To connect to the Jenkins server, run the following command:

Terminal window

```
1# Get the public IP address of the Jenkins server2AWS_PUBLIC_IP=$(aws ec2 describe-instances \3  --instance-ids $AWS_INSTANCE \4  --query 'Reservations[0].Instances[0].PublicIpAddress' \5  --output text)6
7# Connect to the Jenkins server8ssh -i aws-key-pair.pem ec2-user@$AWS_PUBLIC_IP
```

Explanation:

-   `AWS_PUBLIC_IP` is a variable that holds the public IP address of the Jenkins server.
-   `ssh -i aws-key-pair.pem ec2-user@$AWS_PUBLIC_IP` Connect to the Jenkins server.

### [Step 2: Set up Jenkins](#step-2-set-up-jenkins)

To set up Jenkins, run the following command:

Terminal window

```
1# Get the initial admin password2sudo cat /var/lib/jenkins/secrets/initialAdminPassword
```

Explanation:

-   `sudo cat /var/lib/jenkins/secrets/initialAdminPassword` Get the initial admin password.

### [Step 3: Configure Jenkins](#step-3-configure-jenkins)

To configure Jenkins:

1.  Go to `http://<public-ip-address>:8080/`.

![jenkins-1](/assets/blog/0031-install-jenkins-on-aws-ec2-instance/jenkins-1.png)

2.  Enter the initial admin password.

![jenkins-2](/assets/blog/0031-install-jenkins-on-aws-ec2-instance/jenkins-2.png)

3.  Select the recommended plugins.

![jenkins-3](/assets/blog/0031-install-jenkins-on-aws-ec2-instance/jenkins-3.png)

4.  Create the first admin user.

![jenkins-4](/assets/blog/0031-install-jenkins-on-aws-ec2-instance/jenkins-4.png)

5.  Jenkins is ready.

![jenkins-5](/assets/blog/0031-install-jenkins-on-aws-ec2-instance/jenkins-5.png)

## [Conclusion](#conclusion)

In this tutorial, you learned how to install Jenkins on an AWS EC2 instance.

## [References](#references)

-   [Jenkins Official Website](https://www.jenkins.io/)
-   [Jenkins User Documentation](https://www.jenkins.io/doc/)
-   [Installing Jenkins on Linux](https://www.jenkins.io/doc/book/installing/linux/)
-   [AWS Command Line Interface (CLI) User Guide](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html)
-   [Amazon EC2 User Guide for Linux Instances](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts.html)
-   [Amazon VPC User Guide](https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html)
-   [AWS Identity and Access Management (IAM) User Guide](https://docs.aws.amazon.com/IAM/latest/UserGuide/introduction.html)
-   [AWS Key Pairs and Amazon EC2 Instances](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html)
-   [Security Groups for your VPC - Amazon VPC](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html)
-   [User data and shell scripts for EC2 instances](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html)
-   [Elastic IP addresses - Amazon EC2](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html)
-   [Connect to your Linux instance using SSH - Amazon EC2](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AccessingInstancesLinux.html)
-   [Managing Jenkins Plugins](https://www.jenkins.io/doc/book/managing/plugins/)
-   [Getting started with Jenkins](https://www.jenkins.io/doc/pipeline/tour/getting-started/)

Was this useful?

## Tags

[#Jenkins Installation](/blog/tags/jenkins-installation)[#AWS EC2 Setup](/blog/tags/aws-ec2-setup)[#Linux Server](/blog/tags/linux-server)[#CI/CD Tools](/blog/tags/cicd-tools)[#AWS CLI](/blog/tags/aws-cli)[#VPC Configuration](/blog/tags/vpc-configuration)[#Security Groups](/blog/tags/security-groups)

## Share

[Facebook](https://facebook.com/sharer/sharer.php?u=https%3A%2F%2Fmkabumattar.com%2Fblog%2Fpost%2Finstall-jenkins-on-aws-ec2-instance "Share on Facebook")[Twitter](https://twitter.com/intent/tweet/?text=How%20to%20Install%20Jenkins%20on%20AWS%20EC2%20Instance&url=https%3A%2F%2Fmkabumattar.com%2Fblog%2Fpost%2Finstall-jenkins-on-aws-ec2-instance "Share on Twitter")[LinkedIn](https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Fmkabumattar.com%2Fblog%2Fpost%2Finstall-jenkins-on-aws-ec2-instance&title=How%20to%20Install%20Jenkins%20on%20AWS%20EC2%20Instance&summary=In%20this%20post%2C%20I%20will%20show%20you%20how%20to%20create%20an%20EC2%20instance%20on%20AWS%20and%20install%20Jenkins%20on%20it.&source=https://mkabumattar.com "Share on LinkedIn")[WhatsApp](https://wa.me/?text=How%20to%20Install%20Jenkins%20on%20AWS%20EC2%20Instance%20https%3A%2F%2Fmkabumattar.com%2Fblog%2Fpost%2Finstall-jenkins-on-aws-ec2-instance "Share on WhatsApp")[Telegram](https://t.me/share/url?url=https%3A%2F%2Fmkabumattar.com%2Fblog%2Fpost%2Finstall-jenkins-on-aws-ec2-instance&text=How%20to%20Install%20Jenkins%20on%20AWS%20EC2%20Instance "Share on Telegram")[Reddit](https://www.reddit.com/submit?url=https%3A%2F%2Fmkabumattar.com%2Fblog%2Fpost%2Finstall-jenkins-on-aws-ec2-instance&title=How%20to%20Install%20Jenkins%20on%20AWS%20EC2%20Instance "Share on Reddit")[Hacker News](http://news.ycombinator.com/submitlink?u=https%3A%2F%2Fmkabumattar.com%2Fblog%2Fpost%2Finstall-jenkins-on-aws-ec2-instance&t=How%20to%20Install%20Jenkins%20on%20AWS%20EC2%20Instance "Share on Hacker News")[Pinterest](https://pinterest.com/pin/create/button/?url=https%3A%2F%2Fmkabumattar.com%2Fblog%2Fpost%2Finstall-jenkins-on-aws-ec2-instance&media=&description=In%20this%20post%2C%20I%20will%20show%20you%20how%20to%20create%20an%20EC2%20instance%20on%20AWS%20and%20install%20Jenkins%20on%20it. "Share on Pinterest")[Email](<mailto:?subject=How%20to%20Install%20Jenkins%20on%20AWS%20EC2%20Instance&body=Check out this article: https%3A%2F%2Fmkabumattar.com%2Fblog%2Fpost%2Finstall-jenkins-on-aws-ec2-instance>)

## Comments

## You might also enjoy

More posts on similar topics

[![How to Setup Jenkins on AWS Using CloudFormation](/_astro/hero.r9yMhIoW_Z3Ovj6.webp)](/blog/post/how-to-setup-jenkins-on-aws-using-cloudformation)

## [How to Setup Jenkins on AWS Using CloudFormation](/blog/post/how-to-setup-jenkins-on-aws-using-cloudformation)

-   [Mohammad Abu Mattar](/authors/mohammad-abu-mattar)
-   [AWS](/blog/categories/aws)
-   [Jenkins](/blog/categories/jenkins)
-   [CloudFormation](/blog/categories/cloudformation)
-   [DevOps](/blog/categories/devops)
-   [CI/CD](/blog/categories/cicd)

Introduction In a previous blog post, we set up Jenkins on AWS using the AWS CLI (How to Install Jenkins on AWS EC2 Instance). In this blog post,

[#AWS CloudFormation](/blog/tags/aws-cloudformation)[#Jenkins Setup](/blog/tags/jenkins-setup)[#EC2 Instance](/blog/tags/ec2-instance)+5 tags

[read more](/blog/post/how-to-setup-jenkins-on-aws-using-cloudformation)

[![How to CI/CD AWS With Github using Jenkins](/_astro/hero.B1mpyM8T_14dvIE.webp)](/blog/post/how-to-ci-cd-aws-with-github-using-jenkins)

## [How to CI/CD AWS With Github using Jenkins](/blog/post/how-to-ci-cd-aws-with-github-using-jenkins)

-   [Mohammad Abu Mattar](/authors/mohammad-abu-mattar)
-   [CI/CD](/blog/categories/cicd)
-   [DevOps](/blog/categories/devops)
-   [AWS](/blog/categories/aws)
-   [Jenkins](/blog/categories/jenkins)
-   [GitHub](/blog/categories/github)

Introduction In a previous post, I showed you how to set up Jenkins on an AWS EC2 instance. You can read that post here. In this post, I will sho

[#CI/CD Pipeline](/blog/tags/cicd-pipeline)[#Jenkins](/blog/tags/jenkins)[#GitHub Integration](/blog/tags/github-integration)+6 tags

[read more](/blog/post/how-to-ci-cd-aws-with-github-using-jenkins)

[![How To Connect A Two EC2 Instances Database and Files Transfer Using AWS CLI](/_astro/hero.839lq2GB_1XSap0.webp)](/blog/post/how-to-connect-a-two-ec2-instances-database-and-files-transfer-using-aws-cli)

## [How To Connect A Two EC2 Instances Database and Files Transfer Using AWS CLI](/blog/post/how-to-connect-a-two-ec2-instances-database-and-files-transfer-using-aws-cli)

-   [Mohammad Abu Mattar](/authors/mohammad-abu-mattar)
-   [AWS](/blog/categories/aws)
-   [EC2](/blog/categories/ec2)
-   [EBS](/blog/categories/ebs)
-   [EFS](/blog/categories/efs)
-   [Database](/blog/categories/database)
-   [Networking](/blog/categories/networking)

Introduction In this post, I will show you how to share a database and files between two EC2 instances using AWS CLI. I will use AWS CLI to create a VPC, EC2 instances, EBS, EFS, and security grou

[#AWS CLI](/blog/tags/aws-cli)[#EC2 Instance Communication](/blog/tags/ec2-instance-communication)[#EBS Volume](/blog/tags/ebs-volume)+7 tags

[read more](/blog/post/how-to-connect-a-two-ec2-instances-database-and-files-transfer-using-aws-cli)

[![How To Create An AWS EC2 Instance Using AWS CLI](/_astro/hero.Dh2x9Phr_14dc4A.webp)](/blog/post/how-to-create-an-aws-ec2-instance-using-aws-cli)

## [How To Create An AWS EC2 Instance Using AWS CLI](/blog/post/how-to-create-an-aws-ec2-instance-using-aws-cli)

-   [Mohammad Abu Mattar](/authors/mohammad-abu-mattar)
-   [AWS](/blog/categories/aws)
-   [EC2](/blog/categories/ec2)
-   [VPC](/blog/categories/vpc)
-   [AWS CLI](/blog/categories/aws-cli)
-   [WordPress](/blog/categories/wordpress)
-   [Linux](/blog/categories/linux)

Introduction In this tutorial we will create an AWS EC2 instance with the AWS CLI. We will build the network around it first, then launch the instance with a user data script that installs the Apa

[#AWS CLI EC2](/blog/tags/aws-cli-ec2)[#AWS CLI VPC](/blog/tags/aws-cli-vpc)[#VPC Configuration](/blog/tags/vpc-configuration)+8 tags

[read more](/blog/post/how-to-create-an-aws-ec2-instance-using-aws-cli)

[![How to Install and Configure Node.js on EC2 Instance Amazon Linux 2](/_astro/hero.CIYv_zEL_2aFueX.webp)](/blog/post/how-to-install-and-configure-nodejs-on-ec2-instance-amazon-linux-2)

## [How to Install and Configure Node.js on EC2 Instance Amazon Linux 2](/blog/post/how-to-install-and-configure-nodejs-on-ec2-instance-amazon-linux-2)

-   [Mohammad Abu Mattar](/authors/mohammad-abu-mattar)
-   [AWS](/blog/categories/aws)
-   [EC2](/blog/categories/ec2)
-   [Node.js](/blog/categories/nodejs)
-   [Linux](/blog/categories/linux)

Introduction Node.js does not exist in the default Amazon Linux 2 repository. So, we need to add the Node.js repository to the system. In this post, we will learn how to install and configure Node

[#Node.js Installation](/blog/tags/nodejs-installation)[#Amazon Linux 2](/blog/tags/amazon-linux-2)[#AWS EC2 Setup](/blog/tags/aws-ec2-setup)+3 tags

[read more](/blog/post/how-to-install-and-configure-nodejs-on-ec2-instance-amazon-linux-2)

[![How To Connect A EBS Volume To An Windows EC2 Instance Using Powershell/GUI](/_astro/hero.CPGBv147_1yKKK8.webp)](/blog/post/how-to-connect-a-ebs-volume-to-an-windows-ec2-instance-using-powershell-gui)

## [How To Connect A EBS Volume To An Windows EC2 Instance Using Powershell/GUI](/blog/post/how-to-connect-a-ebs-volume-to-an-windows-ec2-instance-using-powershell-gui)

-   [Mohammad Abu Mattar](/authors/mohammad-abu-mattar)
-   [AWS](/blog/categories/aws)
-   [Windows Server](/blog/categories/windows-server)
-   [EC2](/blog/categories/ec2)
-   [EBS](/blog/categories/ebs)
-   [PowerShell](/blog/categories/powershell)

Introduction In this post, we will learn how to connect an EBS volume to a Windows EC2 instance using PowerShell or the Disk Management GUI, and how to mount the volume on the instance. Prereq

[#AWS EBS](/blog/tags/aws-ebs)[#Windows EC2](/blog/tags/windows-ec2)[#Attach EBS Volume](/blog/tags/attach-ebs-volume)+5 tags

[read more](/blog/post/how-to-connect-a-ebs-volume-to-an-windows-ec2-instance-using-powershell-gui)

6 related posts
