Apache NiFi on AWS
March 25, 2021
In this tutorial we’ll create an ec2 instance and install Apache Nifi. Also, we will set up properly and expose port 80.
If you are looking for something in detail for NiFi, you need to wait the second part of this post.
1. We will create an instance using the aws dashboard.
2. We need to select Amazon Machine Image from the list. I prefer Amazon Linux 2 AMI. It will be enough for our demo.
3. We will select an instance type. I prefered t2.micro.
4. Pass others till review page.
5. We need to create a new key pair or use exist one. Don't forget to download the Key Pair.
6. We have access to our instance now.
ssh -i "London-KP.pem" ec2-user@ec2-XX-XX-XX-XX.eu-west-2.compute.amazonaws.com
We need to install docker on our instance 1. Update the installed packages and package cache on your instance.
sudo yum update -y
2. Install the most recent Docker Engine package.
sudo amazon-linux-extras install docker
3. Start the Docker service.
sudo service docker start
4. Add the ec2-user to the docker group so you can execute Docker commands without using sudo.
sudo usermod -a -G docker ec2-user
Log out and log back in again to pick up the new docker group permissions. Verify that the ec2-user can run Docker commands without sudo.
The standalone unsecured instance runs a NiFi instance by itself. This is the minimum configuration needed to run a NiFi instance.
docker run --name nifi \ -p 18080:8080 \ -d \ apache/nifi:latest
This will provide a running instance, exposing the instance UI to the host system on port 18080, viewable at http://localhost:18080/nifi.
6. We need to change security rules to expose NiFi port 80.
7. That's all. We're able to see the dashboard. 🥳