AWS CLI & EC2 Made Easy!

Day-5 | AWS CLI Full Guide | How to connect to EC2 Instance from UI & Terminal | AWS CFT walk though

Estimated read time: 1:20

    Learn to use AI like a Pro

    Get the latest AI workflows to boost your productivity and business performance, delivered weekly by expert consultants. Enjoy step-by-step guides, weekly Q&A sessions, and full access to our AI workflow archive.

    Canva Logo
    Claude AI Logo
    Google Gemini Logo
    HeyGen Logo
    Hugging Face Logo
    Microsoft Logo
    OpenAI Logo
    Zapier Logo
    Canva Logo
    Claude AI Logo
    Google Gemini Logo
    HeyGen Logo
    Hugging Face Logo
    Microsoft Logo
    OpenAI Logo
    Zapier Logo

    Summary

    In this insightful video by Abhishek Veeramalla, viewers get a detailed walkthrough of connecting to AWS EC2 instances from both the AWS UI and the terminal, enhancing efficiency using AWS CLI, Cloud Formation Templates, and scripting automation with AWS APIs. The session covers practical examples using CLI commands, setting up access credentials, and alternative tools for Windows and Mac users. Perfect for DevOps engineers eager to streamline their AWS workflows, the video combines theoretical insights with practical execution and a hands-on assignment to drive home the learning.

      Highlights

      • Abhishek explains connecting to AWS EC2 instances through both UI and CLI, offering flexibility 👾
      • The video dives into using various terminal options for different operating systems, enhancing accessibility 💻
      • Simplifies complex concepts like Cloud Formation Templates and their use in infrastructure management 📈
      • Hands-on demonstration of AWS CLI installation and configuration for efficient AWS service management 🌐
      • Encourages viewers to perform tasks hands-on with an assignment on AWS CLI and resource creation 🎯

      Key Takeaways

      • Learn how to efficiently connect to AWS EC2 using AWS CLI and terminal 👨‍💻
      • Discover the power of automation and scripting to manage AWS resources 🔄
      • Get to know different terminal options suitable for both Mac and Windows users 🖥️
      • Understand how to utilize AWS Cloud Formation Templates for resource management 📜
      • The importance of securing access credentials and using them correctly for AWS CLI authentication 🔑

      Overview

      In this video, Abhishek Veeramalla takes viewers on an educational journey through AWS, focusing on connecting to EC2 instances using both the AWS UI and command line interface (CLI). The session is tailored to enhance understanding of AWS systems and improve efficiency for DevOps tasks.

        The tutorial covers the nitty-gritty of AWS CLI setup, detailing steps from downloading the CLI to configuring it with access credentials for seamless AWS operations. Abhishek shares practical tips and alternatives for different operating systems, making the learning process smooth and inclusive.

          Closing with an engaging assignment, Abhishek urges viewers to independently explore AWS CLI commands and resource creation, ensuring they apply theoretical lessons in practical ways. This video is a treasure trove for budding DevOps engineers and tech enthusiasts keen on mastering AWS.

            Chapters

            • 00:00 - 00:30: Introduction and Overview of Day 5 The Introduction and Overview of Day 5 starts with the host, Abhishek, welcoming viewers back to his channel. It's the fifth day of a series where the focus for this session will be on the efficient creation of virtual machines. Abhishek reminds viewers about the previous sessions where they covered what virtual machines are, how to create them, and some fundamental concepts related to virtual machines. He recommends new viewers who haven't watched the earlier sessions (Day Zero to Day Four) to go back and watch those videos to catch up.
            • 00:30 - 01:00: Review and Prerequisites In this chapter titled 'Review and Prerequisites', the instructor guides the viewer through the process of logging into a virtual machine and discusses automated methods for creating these virtual machines. They emphasize the importance of automation to improve efficiency, explaining that scripting can be used to automate the creation of AWS instances or virtual machines through various methods such as AWS API, AWS CDK, AWS CLI, or AWS CloudFormation. It encourages viewers who have not done so to review previous classes available in the devops playlist to better understand these concepts.
            • 01:00 - 02:30: Logging into AWS EC2 Instance through UI The chapter discusses the initial steps necessary for logging into an AWS EC2 instance, focusing on doing so through the AWS UI. It briefly mentions different options available, like CloudFormation templates and Terraform, before detailing the UI approach. The presentation is meant to guide beginners who need to understand these fundamental steps.
            • 02:30 - 05:00: Connecting through Terminal and Terminal Options This chapter provides a walkthrough on connecting to an EC2 instance through the AWS console. It describes navigating to the EC2 dashboard, identifying the running instances, and using the AWS instance ID to establish a connection. The process includes clicking on 'connect' to initiate a connection to the specified IP address, with a note on deleting the instance post-connection.
            • 05:00 - 10:00: Using SSH to Access EC2 through Terminal The chapter titled 'Using SSH to Access EC2 through Terminal' discusses the process of establishing an SSH connection to a virtual machine on Amazon EC2. The narrator clarifies that the IP address will be deleted after the session, indicating a temporary setup. The connection demonstration shows successful interaction with the virtual machine, located in North Virginia, through the terminal command line. The narrator creates a file named 'Abhishek' using the 'touch' command and verifies its creation with the 'ls' command, illustrating complete control over the remote machine.
            • 10:00 - 16:00: AWS CLI Installation and Configuration The chapter discusses the various methods available for logging into virtual machines, with a specific focus on using the AWS console. It emphasizes the importance of choosing a method that suits one's convenience, especially for DevOps engineers who may need to access numerous virtual machines daily. The chapter advises against constantly using the AWS console to connect to machines due to practicality concerns, such as session management.
            • 16:00 - 20:00: Demonstration of AWS CLI with S3 This chapter discusses the demonstration of AWS CLI with S3, focusing on the challenges of maintaining an active session when logged into the AWS UI. The inconvenience of using the web interface is highlighted, suggesting that many users prefer terminal-based access, possibly opting for tools like Mobile X term, NoMachine, or virtual machines with custom packages for better efficiency and personalized configurations.
            • 20:00 - 25:00: AWS CLI for EC2 Instance Creation The chapter discusses how to set up a terminal on a personal laptop to connect to a virtual machine using the AWS CLI. It highlights the cancellation of UI-based connections and emphasizes the importance of having the correct terminal application based on the laptop's operating system, such as the iTerm for Mac users.
            • 25:00 - 31:00: CloudFormation Templates Overview This chapter provides an overview of CloudFormation templates, with a focus on terminal options for users on different operating systems. The speaker discusses the use of 'item', a terminal application recommended for macOS users, due to its ease of installation and user-friendly interface. Windows users, on the other hand, are advised to explore various options available to them as the default Command Prompt may not offer the best user experience.
            • 31:00 - 40:00: AWS API and Automation Scripts The chapter discusses the use of terminal applications for AWS API and Automation scripts, specifically focusing on Putty and Mobile Xterm. Putty is highlighted as a widely used option despite its less appealing user interface. For users seeking a better interface, Mobile Xterm is recommended as an alternative which can be used across various platforms.
            • 40:00 - 48:00: Summary and Assignments The chapter presents options for managing connections to virtual machines using different tools. It highlights the use of Mobile extm for managing connections, noting the differences in capabilities between free and paid versions. Free accounts usually handle connections for up to 10 virtual machines, while paid versions can handle more, possibly up to 1000. The speaker mentions preferring Terminal for Mac users, and suggests Mobile extm or No Machine for Windows users.
            • 48:00 - 51:00: Closing Remarks The speaker discusses experiences with using different software tools, specifically 'no machine' and 'mobile extram' for Windows. They indicate personal preference for 'mobile extram' due to its lighter weight but ultimately suggest that the choice of software is not critical, emphasizing compatibility with any terminal of one's choice.

            Day-5 | AWS CLI Full Guide | How to connect to EC2 Instance from UI & Terminal | AWS CFT walk though Transcription

            • 00:00 - 00:30 hello everyone my name is Abhishek and welcome back to my channel so today we are at day five and in this class we are going to learn about the efficient way of creating virtual machines because in the previous classes we learned about what is a virtual machine we looked at how to create virtual machines and we learned about the concept of virtual machines right so if you haven't watched our previous videos uh like you know Day Zero to day four I would highly recommend you to go and go back and watch those videos all the videos are
            • 00:30 - 01:00 available in the devops playlist and then you can come back and watch this video uh so for today what we'll do is we will try to understand how to log into the virtual machine that we have created and what are the automated ways of creating these virtual machines so if you followed our previous class we talked about improving the efficiency by using the automation that is by using scripting you can automate your AWS instance or the virtual machines creation using either the AWS API AWS cdk AWS CLI a you can also use AWS cloud
            • 01:00 - 01:30 formation templates and finally terraform so these are the different options that are available so for today what we'll start with is we'll start with login to the AWS ec2 instance because that is the first step that everybody has to understand so to log into the AWS ec2 instance there are two different ways one is you can again go back to your AWS uh you know UI so this is my AWS console you can come to the AWS console and what you can do is
            • 01:30 - 02:00 you can go to the ec2 dashboard in the ec2 dashboard if you see if you watch carefully here I have one instance that is running so click on the instance that is running and then you have a option called AWS instance ID click on the instance ID so there is a option here to click on connect so once you click on connect scroll down and again there is an option to connect once you do this it will try to establish the connection with the IP address like this is the IP address I will delete this instance so there is no
            • 02:00 - 02:30 problem in sharing this IP address uh as of now because once the video recording is done I would uh delete this virtual machine so you see the connection is established and now I am connected to this virtual machine so this virtual machine can be anywhere in the world currently this is in the North Virginia and I can make instructions to this virtual machine like for example I'll show you creating a file okay so what I can do is I can say touch and create a file called Abhishek and if I do LS the file is created so that means I am able
            • 02:30 - 03:00 to log into this virtual machine and I can do any instructions with this virtual machine so this is one way of doing things right so here I am doing it through the AWS console but always use an approach which is convenient for you because as a devops engineer every day you might have to log into hundreds of virtual machines or tens of virtual machines so always you cannot go to the AWS console and click on these uh connect button and log into this machine and also your session will not be
            • 03:00 - 03:30 remaining your session will not remain for a long time here uh let's say you uh or away from your laptop for a couple of minutes so your session might go away so all of because to our and this is again not an efficient way of doing because you are logging through the AWS UI and uh probably people are very convenient with their own terminals or they might use some fancy terminals like Mobile X term or they might use uh no machine or different types of virtual machines and they have their own packages like Bobo
            • 03:30 - 04:00 so avoid this thing and I'll show you how to install a terminal in your personal laptop and connect to this virtual machine okay so now I'll go back because I don't want this connection I can simply click on the close button and my AWS connection that I have established through the UI is canceled so to connect through your terminal firstly you have to have a terminal in your laptop okay so it depends on which laptop you're using for example if you are on Mac there is a terminal called item okay this is I terminal that is
            • 04:00 - 04:30 called item so item is the best one that I would prefer for users who are using Mac okay so just come here uh click on the item and you can simply download okay it hardly takes you one minute to download and install I personally use item and I find it much better than the other options that are available but if you have Windows you have a wide range of options uh that are available because the default terminal that comes with the windows that is the command prompt is not so user friendly
            • 04:30 - 05:00 so always go with the other things like you know you have Puti putty is something that is widely used click on putty and you have an option to download putty so click on the download putting and the user interface is not so great compared to the other options so if you want a better user interface you can also go for mobile extern okay so Mobile X term is uh another terminal that you can use on any platform so here you have option for like using mobile extern you can uh save
            • 05:00 - 05:30 your connections for 10 virtual machines like you know you can save your uh password and uh you can authenticate uh with 10 virtual machines easily if you're using a free account and if you have a paid version of Mobile extm you can go up to 100 or 1000 virtual machines I don't remember exactly so these are the different options that are available so personally I use terminal like I mentioned so if you're on Mac you can go with that if you're on Windows I would suggest mobile extern or no machine no machine is another option so I'll show you that as well
            • 05:30 - 06:00 so this is no machine I've used it in the past and personally I I also found it uh very useful uh I used mobile extram and no machine so both of them are good if you want to try uh things on Windows you can use any of this thing mobile stem is slightly lighter in weight so I would uh prefer mobile extra more no machine so these are all uh you know not so important things you can use any uh browser or you can sorry any terminal that you are interested with so this is
            • 06:00 - 06:30 a terminal that I have at this point of time uh let me share that with you okay so this is a terminal that I'm using and let me increase the font of it perfect I think it looks good to you now how do I log into this virtual machine from my terminal I'll show you okay so come here if you scroll down so again I came to the ec2
            • 06:30 - 07:00 dashboard this is the instances I clicked on the instance button that I required and now always go with the public IP address okay so the private IP address is only accessed within the AWS Network So within your VPC or within the it depends upon your AWS configuration but understand this as a closed IP network okay so if you want to connect from your laptop or from any external sources what you need to do is you have to pick up this IP address that is the public IP address okay and that by
            • 07:00 - 07:30 default we have created a Ubuntu machine already I think people already know it from our previous videos so what we'll do is SSH Ubuntu upgrade the IP address that we saved now as you click on enter it will for the first very first time it would ask you do you want to remember the fingerprint always mention yes and once you do this the connection would be denied I know uh it would be direct but I would I just wanted to show you the reason why the permission is denied is because you have not provided the key
            • 07:30 - 08:00 value pair if you remember the previous class I mentioned that you have to provide the key value pair while you log in because key value pair is a way that you authenticate to your AWS virtual machines so how do you do that SSH minus I I stands for the identity file and I know where my identity file is I stored my identity file in a specific location that I am aware and if you are aware uh sorry if you wanted to modify the location you can also modify and you can store that in your downloads or desktop
            • 08:00 - 08:30 any any location that you want personally I just saved it in the downloads location so I called it test11 pm and followed by Ubuntu at the rate the same IP address that I have previously provided now again if you click on the enter this would fail one more time saying that the permissions that you have provided are too open so what is the reason for saying the permissions are too open okay so pem file is basically a secret file
            • 08:30 - 09:00 or you know it has sensitive information so in your case your virtual machine uh personally now you are logging into your laptop okay but sometimes what happens is your resources might be shared okay so as a devops engineer you might work from different uh resources so let's say you are using a shared virtual machine or you're using a shared physical server from here you want to log into AWS so pem file does not allow you to keep the permissions open because this is my personal pen file right this is Spam
            • 09:00 - 09:30 file for Abhishek or my AWS account so if this is open somebody else can access this webm file and log into your machine so always keep the permissions closed so for that what you can do is chmoding which will change the permissions don't worry if you are not aware of shell we would learn them in the future and just change it to six double zero okay followed by your pen file location it would modify the location and then again click on the up arrow and then enter the same command now you will be
            • 09:30 - 10:00 successfully logged now we are successfully logged into the AWS instance so this is how you do it through the command line through the UI I already showed you just click on the connect button click on sorry click on the instances click on the connect button and you would be logged in but if you want to do through the CLI this is the process perfect I hope now everybody is clear on I would again show you if I click on LS this is the file that we have created through the UI that file will remain because the virtual machine is same now let me do touch Abhishek 2 just to make
            • 10:00 - 10:30 sure that I am able to create and I am able to connect to the server through the CLI as well so if you see the file is created and the file is created in the IP address this is the IP address of your virtual machine uh so your file is created in the AWS instance so with this we learned how to connect to the virtual machine and how to create a file in the virtual machine just to ensure that the connection is established through the UI and the CLI
            • 10:30 - 11:00 perfect so using day 4 day 3 and day 5 what we have learned we learned about the concept of virtual machine we learned about how to connect to a virtual machine how theoretically we looked at the different options right we learned the concept of the API how users can or how devops Engineers can automate the process of creating the virtual machines using different script options that is using the AWS CLI or AWS cdk CFT terraform or the AWS API itself so these are the
            • 11:00 - 11:30 different options that are available now let's talk practically okay because we have lot we talked a lot of theoretical stuff now let's move to the Practical things of it so firstly let's start with the basic and the easiest one that is the AWS CLI before I do that I would show you how to delete an instance as well because I'm done with this specific instance I can click here and I can say click on the actions and my bad okay so
            • 11:30 - 12:00 I have minimized the screen and now I am slightly confused when I explain so what you do is you can go to the instance State and stop the instance first okay you can also terminate the instance but uh always a better practice is to stop the instance and then terminate the instance okay so once you terminate this instance your instance will be deleted uh if you don't want to use this instance one more time you can simply shut down the instance or you can also stop the instance like uh when the stop
            • 12:00 - 12:30 is useful is let's say you are buying an instance from AWS so AWS does billing for you depending upon the time the server is in start state or in the active state so or in the running State So to avoid such problems what you can do is when your work is completed uh or when you don't want to use this instance any longer you can simply stop the instance at the terminate the instance completely perfect now we are stopping and terminating the instance while this goes
            • 12:30 - 13:00 on what we'll do is we will look at each and every option to create uh the easy to instance practically okay or the automated way of things to improve the efficiency the first option and the easiest option that is available today is AWS CLI okay so what is AWS CLI like I mentioned AWS CLI is a command line interface using the AWS command line interface what you can do is you can directly interact with your AWS uh API or using your uh or to your AWS
            • 13:00 - 13:30 account and create any resource on AWS okay today AWS provides you hundreds of services and all of these hundreds of services can be created using an automated way using AWS CLI so to achieve that firstly you need to download the AWS CLI what is AWS CLI it's just a binary download AWS CLI okay so here is the here is the option AWS command line interface AWS CLI or here
            • 13:30 - 14:00 you can also look at download installing or updating a version of AWS CLI let me click on this option and here I would go for an option called installation or download let me see if I find an option here if you see here here are different ways to install if you're on Windows you can click on this option if you're on Mac OS you can click on this button and if you're on Linux you can click on this button let's say you're on Windows simply click on this button it would uh download a 64-bit MSI for you and you
            • 14:00 - 14:30 can follow the steps like next next and it would install the package for you after that you can either add it to your path or you can use it from the location where you have installed so in my case I'm on Mac and I've already installed it so if I just come here and run AWS so how do you verify if your AWS is installed or not simply use the command called AWS space version if you receive this sort of output that means that your AWS CLI is installed
            • 14:30 - 15:00 so once your AWS CLI is installed that itself will not do anything for you because you just installed a AWS CLI binary but what is the actual thing your AWS CLI this package that I have this AWS binary that I have okay if I do which AWS so this is just a binary but this dial binary does not have my user information or it does not have my account information so firstly I have to authenticate with my AWS so for that what you need to do is that
            • 15:00 - 15:30 so go to your AWS console you know you have a user option here click on the drop down once you come here there is an option called security credentials click on the security credentials okay once you do that scroll down scroll down a bit there is an option called access Keys okay here click on create access keys okay say I understand the risk and then create access key so your access key is created and this is the secret access
            • 15:30 - 16:00 key so this is access key and this is a secret for the access key hello do not share this information with anybody and once the video is completed I would also delete uh the access key I'm not even showing you the secret of the access key but it is always safe to hide the access key as well as the secret for the access key okay now I have this information what I will do is I'll make a copy of this access key and a secret for this access key in the vault or any uh storage like the secret storage location on my laptop okay so
            • 16:00 - 16:30 always keep that information safe now once that is done go back to your command line and use this command AWS space configure okay now it would ask you to enter the AWS access key ID I would copy this from here I would enter the access key ID after that it says AWS secret access key again click on this button show button it will show your secret access key enter that here finally it will ask you the default region you can keep it us east region one okay default output form
            • 16:30 - 17:00 and let it be Json that's it now we are authenticated with the AWS so now whatever command I enter here will be reflected in the AWS for example now uh let me uh click on the services option here let me try to find the S3 buckets because S3 buckets are very lightweight if you want to create AWS ec2 instance it would require a couple of steps so I would show you with S3 bucket so let's say here there are three S3 buckets you can see three S3 buckets
            • 17:00 - 17:30 right I want to get this information from the command line what I can simply do AWS S3 LS see what will happen okay another record welcome AWS access key okay so just let me stop sharing because I want to enter the information for for my access key ID so the previous access key ID I deleted so I have to re-enter the access key idea and the password so just let me stop sharing for a minute and uh I'll enter the credentials and then we can
            • 17:30 - 18:00 start sharing I stopped sharing I do AWS con I did AWS configure one more time then I went back to my AWS console to retrieve my uh secret key and the information okay so you have to go to the security uh credentials option perfect let me retrieve my uh access key here
            • 18:00 - 18:30 okay I entered my access key pattern yeah so I entered my access key and after that I want to enter my uh password that is the secret for the access key so let me go back click on the copy I copied the AWS secret access key now I clicked on the enter default region Json perfect I think now I'm done with it so let me
            • 18:30 - 19:00 start sharing here so screen share started perfect now I just started the sharing back AWS S3 LS so I want to get the same information that is available on the UI if you see here so these are the three S3 buckets which my CLI is saying let me confirm if those buckets are correct
            • 19:00 - 19:30 okay so if I come back here yeah I have three S3 buckets okay that same information is retrieved from the AWS CLS I can also create S3 bucket by saying AWS S3 MB stands for make bucket I'll say Abhishek one two three four five uh six four two so the S3 bucket name has to be unique so that's why I'm uh okay so I have not provided the enough arguments but using the MB bucket you can also create a bucket or you can do
            • 19:30 - 20:00 anything from the CLI that was my main intention perfect so you understood how to deal things with AWS CLI so this was one way of automating so if you want the exact command for uh so what you can do is AWS CLI ec2 instance create okay so if you go to the AWS documentation there is a option for each and every command that is here so using this command you can create a AWS instance okay so the commands are
            • 20:00 - 20:30 directly available in the AWS documentation so if you just take this command and if I provide this command here but I have to provide the image information I have to provide what is the type of instance that I want to use what is my key value pair location security groups and subnet ID okay once I provide all of this information and click on enter my AWS ec2 instance will be created but I don't want to take your time in providing all of these details I think you will be able to uh read this documentation and create that
            • 20:30 - 21:00 stuff it's not a big deal so I'm not going into the details of it but using the S3 information I showed you how to interact right all that in so all the things that are important is how to create a security credentials right once you create the security credentials you have to authenticate and once you are authenticated then you can follow this reference documentation the commands are pre-available so you can just copy these commands for your automation you can
            • 21:00 - 21:30 either put them in a shell script python script or anything that you want to do perfect or you can just store that in your GitHub repository and whenever you want to create an instance you can simply use this command uh you can clone it from your GitHub copy it and you can use this so this is one way of doing things that is AWS CLI so till now we looked how to do the things from the AWS UI we also looked how to do the things from the AWS client so the next thing is how to do the things with AWS cloud formation template
            • 21:30 - 22:00 so now what is cloud formation template so if you remember our previous class uh don't worry we are not going to the details of cloud formation template because the cloud formation template terraform all of these things will fall into the infrastructure as code concept which will be dealing in the future videos but for now cloud formation templates are another way of talking with your AWS a API and so this is a GitHub repository you can come here called AWS labs this is the organization there is a repository called cloud formation templates and you have wide
            • 22:00 - 22:30 range of examples here click on AWS then click on Services let me go to the ec2 service and what I want to do is I want to create a AWS ec2 instance okay go with this option this is an example and you have the entire script here so theoretically and practically even I am not going to remember all of the script so even I would refer for some examples and I would use this script now once you use this script what you have to do is you can come here so this is my AWS screen click on CFT so so this is the
            • 22:30 - 23:00 cloud formation option go to the cloud formation and you know you can create your own Stacks using the template so click on the create stack option is the template ready use a sample template or create template in designer okay if you have a template already ready uh like you know in my case I have the template ready from the GitHub examples or you can use a sample template here in the sample you can select ec2 if you have ec2 you will get that sample if you don't have you can like I showed you you can get that from
            • 23:00 - 23:30 a GitHub repository the sample is ready perfect the template is ready you can upload either it from a S3 bucket or use upload a template file so to upload a template file you can copy this in your local and you can choose the file and click on the next button so that's how you create the AWS cloud formation template and using the cloud formation template as well you can create resources on your AWS now don't worry why I'm not explaining you the cloud formation templates why I'm not showing you how to create these things because
            • 23:30 - 24:00 they fall into a different category that is IAC that is infrastructure as code and we learn these things in the future videos so don't worry if you are not aware for now you understood how to create resources from the UI you understood how to create resources from the CLI that is more than enough and cloud formation template you just got an idea of the things perfect now the next thing that we talked about is using the script automation that is the AWS API itself so using the AWS API you either have to
            • 24:00 - 24:30 write a shell script or you can use uh your favorite programming language like in my case I want to automate the things using python so like I mentioned you python has a support to a module that is called boto3 okay photo 3 is a very well maintained uh python module so they have a wonderful documentation as well this is a boto3.8 Amazon aws.com so you have all the required documentation how to install Moto 3 if you are new to python as well like you know they uh provide
            • 24:30 - 25:00 you the steps how to install this specific package and how to configure like in our previous case I showed you already once you do AWS configure that is more than required because Moto 3 can pick the information from your AWS configure file so there is a configuration file and you know once you run this command moto3 can also pick the information from there once it is done okay we are not going into the details of boto3 and how we are going to write this scripts but this is a very simple script like you know this script will create uh sorry list running
            • 25:00 - 25:30 ec2 instances and what is the thing that you have done as a developer or as a devops engineer you just write a python file here what you would say import moto3 and then these are the simple uh like you know steps that you would write in Python to list the ec2 instance let's say you don't know how to write the script okay don't worry again Moto 3 has a wonderful documentation and using the documentation you can easily learn how to write uh the bottom three commands what is the request that you have to
            • 25:30 - 26:00 send what is the response that you will get and how to handle the response these are the things okay so this is how you automate stuff on AWS and the same thing will be applicable to the Microsoft Azure as well so what are the different things that we have learned how to practically do it from the AWS UI that is AWS console next thing that we have learned is to use AWS CLI and for using the AWS CLI or for using the AWS boto3 module
            • 26:00 - 26:30 the first thing that you have to do is you have to go to your account and in the account you have to click on the security credentials and you have to get access token and then download the AWS CLI package that is from the AWS documentation and once you do that we ran a command called AWS configure right once you click on AWS once you run the command called AWS configure what will happen is it would ask you for the essential information that is what is your access key ID what is the secret for your access kid once
            • 26:30 - 27:00 that information is done you are good to go and you can play with the AWS through your CLI itself so that way you can automate stuff around AWS okay so if you have any questions on today's video you can put those questions in the comment section uh as you know I reply to each and every comment and don't worry if you did not understand the concept of cloud formation templates there is a reason why I did not explain because we are going to deal it with the IAC that is
            • 27:00 - 27:30 infrastructure as code concept now the assignment that I want to give here is to install the AWS CLI package by your own and then create the security credentials and authenticate your AWS using your terminal you can either use potty mobile exterm or any other terminal that you want and make a call with your AWS you can either create S3 bucket you can either list S3 bucket create list ec2 instances whatever you want to do just go through the AWS documentation follow the commands like
            • 27:30 - 28:00 uh if you again want to look at the AWS documentation so what you can simply come here go to your favorite browser say AWS CLI doc excuse me my bad so this is AWS CLA documentation here you have example for everything okay so click on the command references let me just increase the font and you can go with any command that you want okay so there are all the commands that
            • 28:00 - 28:30 are available you can just go through let's say I want to go with S3 click on the S3 option and then with examples they provide you everything how to move a bucket how to remove a bucket how to copy objects into the bucket everything is available and let's say today we learned about ec2 right so let me search for ec2 so this is easy too and I want to create an instance so search for create where is it
            • 28:30 - 29:00 okay okay create instance export not this one you can search for run instance okay so run instances and using this you can you know basically provide all the required information here you can just go through the documentation and you can create an instance so that is the task for today okay go through the AWS reference documentation because we cannot go through each and every topic here because we are not doing the AWS
            • 29:00 - 29:30 course we are doing the complete devops course so what we will do is we will only learn specific set of things like I mentioned we will do the breadth of the knowledge you have to do your homework you have to uh do some assignments that I am giving to you so that you can get perfect on a specific topic now don't worry if you don't understand anything put that in the comment section uh and if many people are requesting for the same thing I can extend one more class and I can explain you how to uh do the
            • 29:30 - 30:00 things with the AWS CLI but for today I hope uh everything is clear uh with respect to the automation side of things how to automate uh things and how to uh create content on the AWS using the CLI or using the cloud formation templates or using AWS bootle 3. so there is a small request don't forget to like this video and if you have a good or bad feedback definitely mention that feedback in the comment section I will definitely take
            • 30:00 - 30:30 your feedback positive and after that if you have any people that you know they are planning to learn devops or you know they have they are very passionate about learning devops do share these videos with them because the main goal of doing the free devops course is to make and understand uh I mean uh make these videos reached to larger audience and maximum people are benefited from this videos I hope you enjoyed the video for today I'll see you in the next video Take Care
            • 30:30 - 31:00 thank you so much