ever wished you could control all your AWS services with one simple tool today we are diving into AWS Cloud apis the universal remote control for managing your Cloud resources we will cover the essentials of aw's apis create an ec2 instance an S3 bucket and explore AWS Lambda and Cloud control API stick around for more surprises and tips that will transform you into a cloud speaking wizard also we have added the chapters in the description for your reference so that you can also skip to your interested [Music] section hey everyone welcome to this tutorial on mastering AWS Cloud apis whether you are new to AWS or cloud computing don't worry we are going to make this as simple as possible it AWS Cloud apis are your all-in-one tool for managing AWS Services instead of juggling different tools for each service you can use these powerful apis to handle everything seamlessly by the end of this video you will know how to create an ec2 instance an S3 bucket and even run a serverless function with AWS Lambda plus we will explore the cloud control API for a more integrated approach let's get started what is an API an API or application program interface is like a bridge that allows different software applications to communicate think of it like a waiter taking your order in a restaurant and bringing your food from the kitchen apis make it possible for apps to request and exchange data efficiently for example when you use a weather app it communicates with a Weather Service API to fetch data common examples include the Google Maps API which allows apps to display maps and location data and the Twitter API which lets application interact with Twitter's functions like posting tweets or reading tweets geni API such as openi gp4 API allow developers to integrate Advanced language understanding and generation capabilities into their applications in cloud computing API help manage resources like storage and virtual servers examples include the AWS S3 API which allows for managing cloud storage the Azure compute API which manages virtual machines and the Google Cloud pups sub API which handles messaging between different services and applications what exactly are these Cloud apis they are specialized tools that let you interact with cloud services extending the basic concept of apis to the vast world of cloud computing Cloud apis allows you to create manage and use resources like storage and servers in the cloud they're crucial because they offer scalability seamless integration and automation making it easy to build and manage powerful applications in the cloud environment one of the leading providers of these cloud apis is Amazon web services or AWS as a top cloud service provider AWS offers a wide range of services from Storage to computing power AWS apis are particularly powerful because they allow developers to interact with these diverse Services efficiently by leveraging AWS apis developers can tap into the full potential of cloud computing now let's dive deeper and look at some key AWS apis and see them in action IM imagine a storage Solution that's not only scalable and secure but also incredibly easy to use welcome to the world of Amazon S3 in this video we will dive into how Amazon's simple storage service is revolutionizing data storage for businesses and individuals whether you're looking to store manage or analyze your data discover why S3 is the go-to choice for Tech Enthusiast around the globe ready to dive into the world of cloud storage let's see how you can effortlessly manage your data with Amazon S3 one of the most popular cloud storage Services let's explore these essential AWS apis Amazon S3 simple storage service used for storing data in the cloud we will see how to create a bucket upload and retrieve files before we start the demo of Amazon S3 and how to create your ec2 in how to explore with your Cloud control apis we first need to create an Amazon web service account so to do that go to your AWS amazon.com and you can see that you have AWS free tire here create a free account button is there click on the create a free account button it will take you for your signing up page enter your uh email address or alternatively you can have your account name verify your email address a link will be sent to your uh email ID once your email is verified it will take you to your payment link don't worry just add your credit card information details unless and until you are into your free access Tire limits you will not be charged for any of the usages which you do on your AWS Management console since I am an existing user I will just sign into an existing adws account I'll just log in with the credentials I already have after sign signing in it will take you to your console home since I've already explored I am ec2 Lambda and S3 all these apis so you can see that the recently visited services are over here right now after you have created your account the next thing we will be doing is we will be exploring how to create an S3 bucket and how to upload files into your S3 bucket to do that you click on your S3 if you don't find S3 on your console home you can just go to your search button there and click on S3 and then you will have your uh scalable storage S3 in the cloud you can just click that service over here and it will navigate you to your awss 3 console now the next thing what you need to do is we need to create a bucket so you can see that there is a button over here which says create bucket you just click on the create bucket here you can just give a bucket name anything I'll just give it as AWS bucket and then going with the default settings over here I'm not changing anything here and bucket versioning is disabled I am not adding any tag over here I'm just going with those default settings and you can see that the encryption type is server side encryption and Amazon S3 manag keys I'm just keeping the default settings here and I'm creating a bucket so create a bucket so here you can say that after see that after creating the bucket you can upload files and folders to The Bu bucket and configure additional bucket settings as well so I've just given the name as demo S3 AWS and I'm keeping the default settings and I'm going and creating a bucket with the help of my create bucket button here so once I click on this you can see that the bucket is created and this is the bucket which has been created now I'll just click on this and I can upload my files over here so you have a button over here called as upload I'm clicking on the upload here and then add files this image here and then I'm trying to upload the file here so you can see that the upload is succeeded right and you can see the file over here now similarly you can add more files there I added only one file over here now if you want to delete this you can just click on this and you can delete the file you can see see that the if a folder is selected all objects in your folder will be deleted so I'm saying yes okay and I have to write here perally delete okay and you can see that the delete object is enabled over here and I'm clicking on that and I'm deleting the image which I have stored in my S3 demo bucket right so I'm closing using this and you can see that this is my S3 demo bucket and the image file has been deleted it's so easy right you can just try to create an bucket and you can try to add your images you can store your images you can retrieve your images also you can delete your images now let's explore our Amazon ec2 instance so you can see that I recently visited my ec2 instance so I will click on my ec2 instance here it will navigate you to your instance page and I need to launch an instance so I'll just click on launch an ec2 instance it will guide me through the different steps which are required for launching an ec2 instance right so I'll just give an instance name as demo AWS ec2 instance and I'm selecting my Amazon Linux AWS which is anyways the default settings over here and then you can see that the instance type by default it is t2. micro this is what I'm using it and I'm not using any key pair required to create uh a new key pair as of now right and then I'm just taking up all the default settings like allow your SSH traffic from all these things configuring storage I'm just keeping those default settings over here and then uh number of instances to be created as one and you can see all the default uh settings are over here and then I'm just trying to click on launch instance key pair it's prompting me for uh create a new key pair so I'll just give it as new key ec2 new key ec2 okay and key type is RSA and then going again with the default settings I'm launching my instance here so you can see that it is launching instances and creating your initiations in security control groups right now let's check our instance now I'm going to click on view all instances so you can see that this is the instance which I was creating and as of now the instant state is pending right so the instance State should move from pending to running State we'll just give it a a while and now you can see that your instance state is running right now you can see that your instance state is running now if you want to um check on your instance state that is stop instance or reboot instance or terminate instance you can do that with the help of this uh button called as instance state so I'm going to stop my instance here I'm just clicking on stop instance it is just prompting me whether are you sure you want to stop this instance or not I'm just clicking on stop here so you can see that uh successfully initiated stopping and your instant state is moved from running to stopping here right so we will wait till uh the instance state is stopped and then we will try to terminate the instance state so you can see that the instance state is stopped now so we similarly we will try to terminate the instance it's again prompting me whether you are sure that you want to terminate the instance I click on terminate and you can see that from stopped it is moving it has moved from shutting down right the instance date is moved from shutting down so we'll just wait for a while to see that the instance has been terminated so you can see that the instance has been terminated so cool right creating your ec2 instance with just a click and launching your instance and stopping and terminating your instances now let's use our AWS Lambda in my console since I've already used Lambda you can see that Lambda Services is already here on my management console right if you don't find you can just go on uh this tab over here for search and you can just type Lambda here and you can see the service is there you can just click on your Lambda service here so you can see that my Lambda Service uh has opened and it says that Lambda service lets you run code without thinking about your servers first thing we need to do is we need to create a function so I will click on create a function here I'm keeping the default settings which says author for your scratch and I'm trying to create a function name I'm trying to give a function name here which is say uh demo AWS Lambda right so here I'm trying to create a runtime so I'll just click on python 3.12 runtime I'm choosing python
3.12 and keeping the permissions same and I'm just trying to create a function over here so it will take a while so you can see that my demo AWS Lambda function has been created now now so what's the next thing we need to do here is so in my function code I'm just trying to write my function here wherein I'm just trying to give an output called as hello from Lambda this is what I want to be printed right so I just added my uh piece of code over here and then I will click on deploy you can see that successfully updated the function here next thing we need to do is click on test configure test event and then I'm just leaving it to the default settings here and I'm clicking on Save it's prompting me to give the event name so I gave the event name and I'm just clicking on Save right so next thing I will do is test and then you can see that we have successfully updated our function and then you can see that the status code is 200 which is a success status and then the body has been displayed over here that is hello from Lambda so far we have explored Amazon S3 ec2 and Lambda all powerful Tools in their own right now let's look at AWS Cloud control API which ties everything together AWS Cloud control API is a unified API that allows you to manage the life cycle of various AWS resources imagine you have different remotes to your TV sound system and air conditioner it's a hazle right AWS Cloud control API is like a universal remote that can control all your AWS services such as ec2 elastic compute Cloud for virtual servers S3 simple storage service for storage RDS relational database service for databases Lambda for running code without managing servers Dynamo DB for no SQL databases this makes managing your cloud resources easier and more efficient why use AWS Cloud control apis here are a few reasons Simplicity learn one set of commands to manage all AWS Services efficiency save time and reduce errors with a consistent way to control different Services automation easily automate tasks across multiple services with less complexity sounds great right now now let's see how we can set it up and use it we will use an online code editor called riplet to make things simple riplet allows you to write and run code directly in your browser without needing to install anything on your computer here is what you need to do now moving on to our Cloud control API demo right so as I said we will be using riplet so I have opened it on my web browser https riplet and you can see that it is telling you what exactly is uh replate and what are the things you can do with the help of your replate right so I'm just clicking on continue and you can just provide your first name your last name and how much software creation experience do you have all these details you can fill in and you can click on continue since I've already uh have an account over here so I'm not going to add these credentials again okay next thing which we need to do is click on create riplet it will ask for which language you want to use so I want to create a nodejs template create riplet here so you can see that the riplet is booting and you can just close this or if you want to explore the code editor you can just go ahead and explore your code editor here and now you can see that the replate is booting and it is connected now we are ready to have our project files being added over here but before we add our project files we just need to uh have our SDK AWS SDK to be installed so I'll go to the console over here so I'm installing my AWS SDK so this will take a while and you can see that it is installed here right next thing which we need to do is we need to create an access key so to create an access key we need to go to your AWS Management console okay now I am in my AWS Management console so I will go to my I am here I will just click on I am that is your identity access management and then I will go to my users here since I've already created my cloud control API I'm just going to use that uh if you want to create your own user just click on create user and follow the instructions maybe you you can just give a sample uh Cloud API and then click on next and then let this be add users to your group and then go to next and it will ask you to review and then you will be able to create your user so I'm just creating it for you so you can see that we have created a user right this is what we have created now now if you click on this you can see that uh we have something called as uh add permissions so we are now on your sample Cloud API I am so I'm just clicking on my security credentials here and then create access key right so it is asking why do you want to create an access key so I'm just saying that I'm trying to run that application using your AWS compute uh service and then I I'm clicking on this that I understand the terms and conditions for which we are trying to create this access key and I'm going to create next over here so uh just give this as description tag as demo key right and then then I'm trying to create an access key here right so you will be able to download your CSV file keep the CSV file uh save so that you'll be able to access your access keys and your secret access key and your secret access key right this is how your um Excel file will look like wherein the access key and your secret access key will be downloaded so we need these access key and your secret access key for running your uh Cloud control apis right so I have opened index.js file in my project and I have added the code here first thing what we doing is we are trying to import our AWS SDK after we have imported our AWS SDK we are trying to configure our AWS SDK with the credentials which we have just created I told you right we created our access key and your secret access key right and then next thing what we are trying to do over here is we trying to create a new instance of the cloud control uh class and then we are writing a function to create your S3 bucket right which will help you in trying to um store your images and retrieve your images right we are writing a function so that we can get the status of whether the resource has been created or not and also we are trying to have a TR catch Loop which will help us in trying to uh figure out if there are any errors right and then we are writing a function to create your new S3 bucket uh now next thing what we are trying to do is we trying to create a function for creating your ec2 instances and an S3 bucket so you can see that we have created two functions here right okay so this is what we are doing in our index.js file now to add your AWS access key ID and your secret access key ID and your region over here uh you just uh click on search and then go to secret right and then this is my new secret and then I'm trying to copy my access key ID and my value here at secret and then I'm trying to add my secret access key here add secret and now next thing which we need to add is our AWS region right so I'm adding my AWS region here so we'll go to our AWS Management console so I have added my access key ID my secret access key ID and AWS region and this is how it will uh configure and take from your AWS config update right so you can see that the ec2 inst has been uh created the S3 bucket has been created you can see the status that it is in progress and after 30 seconds you can see that the S3 bucket is created and your ec2 instance is created so with the help of one control uh API you will be able to use the different Services which your AWS provides so in this demo we have used your S3 um uh services and ec2 instance services using our Cloud control API congratulations you have reached the end of our comprehensive journey through AWS Cloud apis let's quickly recap what we have covered we started with understanding what apis are and how they act as bridges for communication between different software applications we explored the concept of cloud apis which extended the basic API functionality to the cloud environment offering scalability integration and automation we don't dove into Amazon S3 learning how to create buckets upload files and retrieve them you saw firsthand how S3 simplifies cloud storage we also launched and managed virtual servers using Amazon E2 demonstrating how it is easy to run applications in the cloud we explored serverless Computing by creating and running a Lambda function which highlighted the power of running code without provisioning servers finally we discovered the AWS Cloud control API a powerful tool to manage multiple AWS services with a single set of commands we created both an ec2 instance and an S3 bucket showcasing the API Simplicity and efficiency throughout this course we have emphasized the importance of AWS cloud apis in simplifying and streamlining cloud Resource Management these tools are not only powerful but also incredibly userfriendly making it easier for you to build manage and scale applications in the cloud we hope you found this tutorial both informative and engaging by mastering these AWS apis you are now equipped with the skills of efficiently manage Cloud resources automate tasks and enhance your application performance if you enjoyed this video don't forget to like And subscribe for more tutorials on AWS and cloud computing thanks for watching and happy cloud computing
2024-08-01