Deploy Java Web Application in AWS Elastic Beanstalk | AWS Tutorial for Beginners | Edureka

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hello guys this is Armenia from Eureka and I welcome you to this session on deploying java web applications in AWS so before we move any further let us have a quick look at the agenda for today's session first we will try to know what exactly is AWS then we will talk about what are the benefits of deploying java web applications in AWS and then we will see a demo in which I will show you how do you deploy java web applications in AWS so this is a very simple agenda and I hope you guys understand it and guys one more thing before proceeding further just subscribe to the ad Rica's youtube channel and also hit the bell icon so that you never miss an update from Ed Eureka and also if you're someone who's looking for a course in AWS then you can find the link for that course in the description box below so without any further ado let us begin with the first topic what is AWS so AWS or Amazon Web Services is a cloud service from Amazon which provides services in the form of building blocks these building blocks can be used to create and deploy any type of application in the cloud these services or building blocks are designed to work with each other and result in applications which are sophisticated and highly scalable so this was the formal definition of AWS and I hope you guys know that since we are talking about a double s so this is nothing but a cloud computing so we are talking about cloud computing here so for those who don't know what cloud computing is let me just quickly tell you the definition of it so it is the use of remote servers on the internet to store manage and process data rather than a local server or personal computer so there are basically three categories in cloud computing the first one is the software as a service so this allows companies to use software without having to purchase them which reduces the expenditure of the company drastically since they are already installed on the cloud server they can be quickly deployed and therefore it saves a lot of time for the companies the second category is the platform as a service so it allows developers to build applications collaborate on projects without having to purchase or maintain infrastructure and the third and the final category is the infrastructure as a service so it allows companies to rent servers storage space etc from a club provider so when we talk about AWS it's more of an infrastructure as a service so now let us take a deep dive into AWS and understand what all services it has to offer us so as you can see on the screen these are the various domains in AWS compute migration security identity and compliance and many more so if you talk about compute it is used to process data on the cloud by making use of powerful processors which serve multiple instances at a time the next domain is the storage and content delivery the storage as the name suggests is used to store data in the cloud this data can be stored anywhere but content delivery on the other hand is used to cache data nearer to the user so as to provide low latency the third domain is the data business the data base domain is used to provide reliable relational and non-relational database instances managed by AWS the next domain is the networking it includes services which provide a variety of networking features such as security faster access and so on the next domain is the management pools it includes services which can be used to manage and monitor your AWS instances so guys whatever I am discussing right now is just an overview I'll show you on the Amazon Web Services website or the portal about this domains the next domain is the security and identity it includes services for user authentication or limiting access to a certain set of audience on your AWS resources so these are the various domains of AWS and I'll just quickly show you about this services or the domains that we just discussed ok so if you go on the AWS portal here you can find in the services tab the various domains that we just discussed such as compute storage management database security identity and compliance migration so these are the various services that a SS provides us I hope I'm clear with whatever we have covered till now so now let us talk about why Java Web Application AWS or the advantages that AWS has to offer us so the first and foremost advantage is the easiness of the AWS so AWS is designed to allow application providers and vendors to quickly and securely host your applications whether an existing application or a new software is a service based application you can use AWS management console or well-documented web services api s-- who access a double aces application hosting platform the next advantage is the flexibility AWS enables you to select the operating system programming language web application platform database and other services that you need with AWS you receive a virtual environment that lets you load the software and services your application requires this eases the migration process for existing applications while preserving options for building new solutions the next advantage of the benefit is the cost-effectiveness here you pay only for the compute power storage and other resources that you use with no long-term contracts or upfront commitments so this is I think a very big advantage that AWS has to offer us and the next benefit is the reliability with AWS you take advantage of a scalable reliable and secure global computing infrastructure the virtual backbone of amazon.com multibillion-dollar online business that has been honed for over a decade and the next advantage here is these scalability using AWS tools auto scaling an elastic load balancing your application can scale up or down based on the requirement or the demand backed by Amazon's massive infrastructure you can have access to compute and storage resources whenever you need them and the next benefit that we are going to discuss is this security AWS utilizes an end-to-end approach to secure and harden or infrastructure this includes physical operational and software measures so these were the advantages of AWS and now the main part of our session like how does it work like how do you deploy a java web application in AWS so before we see how to deploy java web application let me just share a few best practices that you must follow the size and installation complexity of web applications can vary greatly therefore there is rarely a one-size-fits-all solution for deploying and hosting java applications however there are some Universal best practices to consider when deploying any web application first understand the deployment installation and configuration characteristics of the applications next understand application expectations from initial deployment to future scalability availability and backup and recovery requirements next use automation whenever possible for deployment and other tasks where consistency is important and finally leverage source code or application repositories to protect your application now let us see various types of java applications and their four mechanisms EWS offers several tools and services to enable both AWS managed and customer managed java application deployment so guys as you can see on the screen this one table and this shows a high-level reference to help you identify the most appropriate option for a specific scenario so say for example if you have a custom java application which is developed in eclipse then the deployment mechanism for that is single click deployment from within the Eclipse and the deployment method or the environment for that is AWS toolkit for Eclipse so I'm going to show you in the later part of this session how do you do this in Eclipse and if you have a java web application which is deployed as a jar file or a war file or maybe even a zip file so in that case the mechanism is automated deployment of packaged application using AWS elastic beanstalk so you have to make use of AWS elastic beanstalk service of AWS for deployment of such applications so now let us discuss a few things about AWS elastic beanstalk so elastic beanstalk is an easy-to-use service for deploying and scaling java web applications elastic beanstalk supports several platform configurations for java applications including multiple versions of Java with the Apache Tomcat application server and Java only configurations for the applications that do not use prom cap the Java only option allows customers to include any required library Java files in the source bundle for the Java web applications that do not use a web container or use a different one suggest jetty or a glassfish once deployed the elastic beanstalk automatically manages capacity provisioning load balancing and auto scaling so guys this was about the AWS elastic beanstalk as you can see on the screen this is the diagram or this is the mechanism that AWS elastic beanstalk follows so i'm going to show you how does this work so now we are going to see the demo part of this session and here I will show you how do you create a in java web application in Eclipse and first we will deploy it locally on a local server say for example Apache Tomcat and then we will deploy that application on AWS okay so this is going to be the flow of this demo and before moving to the demo part there are a few prerequisites that you must follow so as you can see on the screen you need JDK JDK 8 or a higher version Tomcat 8 or any higher version of Tomcat Eclipse ID and free AWS account so these are the prerequisites that you must fulfill and now let us talk about the demo part ok so here I will open eclipse handle first you need to create a project here in Eclipse so if you create click on file new and here I will select dynamic web project so here you can name your project whatever name that you want say for example my project in this case and here in the target runtime you must select the apache tomcat version that you are using so my system i have installed apache tomcat that is version 9 so here it is showing me watch it tomcat ok and the dynamic wave model version 4 this is 4.0 ok so if you click on next again you click on next so finally click on finish here and your project will be created so what you need to do here is right click on your project click on new and select a CSV file so JSP is nothing but Java server page so here you have to name your file name it as my file or whatever name that you want and click on finish so here you can see the JSP file has been created this is the project which I have created before and here is the JSP file that I'm talking about so you can find that file here in web content ok index dot JSP so what you need to do here is you have to just add one simple line in the body section of this JSP just a simple command kind of thing or our test kind of thing so here I'm just writing one sentence this is a test JSP being served from the AWS so you can write whatever you want and we are just going to test this whether it's working properly or not ok and one more thing that I have to show you here if you right click on project go on build path configure build path and if you click on project facets here so here in the run time you must select apache tomcat voice online or version it or whatever version you are using this box must be checked ok so this is fine you're good to go so as you can see this server has been added here tomcat motion is over at the localhost so once this is added what you need to do here is simply right click on the project run as run on server so it will ask you choose an existing server or manually define so here this has been selected choose an existing server tomcat version 9 and click on finish so once you do this on the console you can see this has been displayed this is a test with GSP being served from AWS so now we have deployed this application on the local server and enough we will deploy this on AWS so for that what you need to do here is you have to download the plug-in AWS toolkit plugin so for that click on help in eclipse and click on Eclipse marketplace so now here you have to search for AWS plugin type AWS plugin and if you search this it might take a few seconds okay so here as you can see AWS toolkit for eclipse 2.0 so this has already been installed on my Eclipse and if it is not installed you just have to click here install and it gets downloaded okay so this was about the AWS toolkit plug-in and the next what you need to do here is you have to go on your AWS home page so here in the AWS documentation and a reference guide you have to click on AWS security credentials we need access keys here so that you know the server on Eclipse points to the remote server on AWS okay so for that you have to click on this section understanding and getting your security credentials so once you come here you have to click on access keys okay so now you have to click on this I am console so here you have to click on this I am console applique so here since I have already created access keys so that's why it is showing me an option of delete your root access key so what you can do here is click on manage security credentials once you click here you'll be navigated to this page and here you can select continue to security credentials and access keys okay so since I have already created one access key it is showing me here the access key ID and if you want to create one you new access key you can select the option here of create new access key so once you select this option of creating new access key so you'll be directed to a page where you will get this access key ID and secret access key so you just need to copy that from the AWS portal and you must save it somewhere so say for example you can create a text file and you can save it here because we will be needing this in Eclipse so once you save it now what you do is go back to eclipse okay so what we need to do here is we have just created access key in the previous step and your once you come to eclipse click on windows preferences okay so from this left-hand section you have to select AWS tooltip and here the profile name by default is default and here you need to paste those key ID and the secret access key over here as you can see I have already done that so you just need to paste it here and click on apply and close so once you do that what you need to do here is as you can see there's one server folder here right click on servers click on you so here what you need to select s click on server server click on next so here you have to select the tomcat version that you are using so in my case I'm using Tomcat version 9 server server hostname is localhost and the server name is by default if you click on next ok so here you have to add the projects that you want to add here so in my case my project name is web demo nav have to add it here ok click on finish so once you click on finish you'll be able to see one server that has been created here the name of the application the web demo and AWS environment and AWS elastic Beanstalk and here this is the region Asia Pacific Mumbai ok so this is how you create a server which points to the remote server on EWS so now for running this application just simply right click on the project run ass and here you will see an option of AWS SEM local so if you click here to view the output you what you need to do is right-click on the server here and if you click on Amazon Web Services Pio running version ok so as you can see here this is a test JSP being served from AWS so this is the message or the text that we had written in the body section of the JSP file that we created so this message shows that our application has been deployed so this was the output here so before moving further we'll be needing a war file of this project so for that you just click right click here or project and click on export so here select war and you can save the war file to whatever destination that you want ok so in my case I've saved it on he drive ok so if you come to the AWS home page in the services section you need to click on elastic beanstalk okay so once you click on elastic beanstalk so here you have to create click on create new application have to name the application and then description okay so once you do that you have to click on create so you can name whatever you want here my description is optional here and tags as of now we don't need any tags and click on create so since I've already created one application here pay more app okay so I'll be running this application so this is just for your information I'm creating one new half here and now for this application my web app there's no environment currently ok so what you need to do is click on create one now ok so here you have to select the web server environment click on select ok so domain name as of now you can leave it to blank description is optional here ok platform so here you need to select Tomcat because we deployed our application on Tomcats ok so we are creating that tomcat instance here so that's why we chose Tomcat in here you need to upload your own code so if you click here it asks for a zip file or a war file so in the previous step you created I mean you exported one more file of your project and you saved it to a particular destination so in my case I saved it to II drive so just you have to click on upload here and choose this file ok so here in my II drive this this is war file web demo dot more click click here so this is added here I click on upload and here you have to click on create an manga so as you can see here this will take a few minutes and once the environment is created as you can see here you will be able to sing this this page here which shows all the events related to the application and the health of that application once the environment has been created what you have to do is this upload and deploy it click on upload and deploy so choose the file that war file that we created from eclipse so once you choose this file you have to click on deploy so once that is done you will be able to see this one URL here that has been created and if you click on this URL so as you can see here this is a test JSP being served from AWS so this shows that our application has been successfully deployed on AWS and this is how you deploy a Java Web Application AWS so guys with this we have come to the end of this session I hope you have enjoyed this session and you have understood whatever I have explained here if you have any queries please write them in the comment box below and my team is here to help you with your doubts so this was all from me in this session on deploying Java web applications in AWS thank you so much I hope you have enjoyed listening to this video please be kind enough to like it and you can comment any of your doubts and queries and we will reply them at the earliest do look out for more videos in our playlist and subscribe to any rekha channel to learn more happy learning
Info
Channel: edureka!
Views: 49,375
Rating: undefined out of 5
Keywords: yt:cc=on, deploy java web application in aws, how to deploy java web application in aws using elastic beanstalk, deploy java web application on elastic beanstalk aws, aws java web application tutorial, aws java tutorial, aws java, aws java sdk ec2 example, creating java web application on aws, aws java developer tutorial, what is aws, deploying web application on aws, why java web applications in aws, how to deploy web applications on aws, aws edureka, edureka, aws training
Id: Ozc5Yu_IcaI
Channel Id: undefined
Length: 20min 39sec (1239 seconds)
Published: Thu Jan 16 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.