Effortless Chrome Installation on EC2 Web Servers: A Step-by-Step Guide

Effortless Chrome Installation on EC2 Web Servers: A Step-by-Step Guide

Introduction :-

Are you running web applications on #Amazon EC2 instances and need a hassle-free way to install #Chrome for headless browsing? Look no further! In this guide, we’ll walk you through the process of automating #Chrome installation on your EC2 web servers. This can be a game-changer for web scraping, #automated #testing, or any application that requires browser interaction. Let’s dive in and streamline your #EC2 setup.

Pre-requestisites:-

  • Aws account with required permissions

Procedure

Step-1 :- First Login to your #Aws Management console and navigate to ec2.

Step-2 :- Use the below user data for installing chrome on #Ec2 Webserver.

#!/bin/bash
sudo su root
echo "export APP_ENV=dev" >> /etc/environment
echo "export TYPE_SERVER=AWS" >> /etc/environment
sudo yum update -y amazon-linux-extras
sudo wget https://dl.google.com/linux/chrome/rpm/stable/x86_64/google-chrome-stable-110.0.5481.177-1.x86_64.rpm && yum localinstall -y google-chrome-stable-110.0.5481.177-1.x86_64.rpm

Step-3 :- Create the ec2 webserver (instance) with above configuration.

Step-4 :- Once the instance gets created, go a head and connect to your ec2 instance using ssh as shown below.

Step-5 :- Select the instance in which u have created with the above user data.

Step-6 :- Click on connect and connect to your instance.

Step-7 :- Check whether the google #chrome is being installed or not on the ec2 instance as shown below.

Step-8 :- As u can see that the #chrome has been installed on the #instance.

Conclusion :-

Automating #Chrome #installation on your EC2 web servers can save you time and effort, enabling smoother #operations for web-related tasks. Whether you’re a #developer, #tester, or #data enthusiast, having #Chrome readily available in your #EC2 environment opens up new possibilities. By following this guide, you’ve learned how to simplify the setup process and ensure your applications run seamlessly on #AWS. Happy browsing! 🌐🚀#AWS #EC2 #Chrome #Automation #WebDevelopment