Don鈥檛 be afraid of the command line (CLI), it鈥檚 insanely useful. This live stream explores those uses and shows you how to use the AWS CLI to accomplish some simple but helpful tasks in the AWS Cloud.
Reasonably Accurate 馃馃 Transcript
Good morning, everybody. How you doing? So just the view here. Boom, there we go. Right on. All right. Let me just double check the levels. We are streaming live again on LinkedIn. It is apparently big hair Monday really have to do something with his We are continuing our March down to a tab us reinvent.
We are watching this on YouTube after the fact, please comment below. I will Circle back as I do with every one of these videos on demand address one of your questions are in the next stream. But the idea here is pretty straightforward pretty simple. We鈥檙e going to touch on areas of the AWS Cloud.
They may not be familiar with the reason being we have a 69 days from this Monday right now up until when reinvent kicks off in December. Yes, that鈥檚 a very very long way away. But there is a ton of different things to watch to learn to understand and comprehend to kind of get the most out of reinvent.
I really want you to get the most out of room and I think it鈥檚 a fantastic conference. I think everybody who goes has a blast em, and if you can learn a lot so we covered last time we covered AWS Lambda, which is a critical service that I鈥檓 sure we鈥檙e going to be actually bouncing a back and forth to a bunch of times and it鈥檚 just that important but some of the feedback I got talking to people was that it might have been a little too much because it鈥檚 a people maybe you weren鈥檛 used to at talking about programming.
They weren鈥檛 used to getting their hands dirty. diving in and doing stuff, you know, we set up something pretty sure for pretty simple and I think did the takeaway was that school we see and understand sort of how How this can be a benefit but what season do a little bit more.
Let鈥檚 cover some other area. So I thought hey, you know what today? We鈥檙e going to cover the command line. And you know, I am apparently you鈥檙e crazy Professor because every time I touch my hair it gets worse impressive feat. I know but we鈥檙e going to talk about the command line.
So I鈥檓 going to switch over to my screen at we鈥檙e going to make sure you鈥檙e chilling right one cool looking primarily on my display, but I鈥檒l come back for key points at you guys here in a camera. We are going to give ourselves a little bit less time at today.
I what we鈥檙e going to do is I鈥檓 going to put some time up on this clock make sure it鈥檚 the right thing. We鈥檙e going to say. what鈥檚 a let鈥檚 go to 25 minutes after the hour. So 20 minutes on the clock. I need to add sound effects of a stream deck.
I should put sound effects into this to make it a little cooler. And that is what we set up last time. We set up an a Lambda function that helped us every time we dropped something into an S3 bucket and it fired off an event into the logs telling us what we put in and I鈥檓 so I think that was pretty straightforward.
I like I said, I got some feedback that led to today鈥檚 topic which is the command line. So if questions were going along please fired off in LinkedIn, I have it that browser set up so that I can see the quality of what鈥檚 going on. They鈥檙e going to double-check the stream quality here, which seems to be good sup.
We are going to talk about the command line interface. Let me adjust fly is a tool that you type in to wait for the command line This is present on pretty much every database managed. Am I at specifically the Amazon Linux am I? It鈥檚 a present in a bunch of default things that you find.
So Beanstalk at present on a lot of people containers its present. What is actually the tool that like to manipulate or work with AWS Services. Now, why would you want to do this when I see how I won鈥檛 because it鈥檚 pretty straightforward and simple and it鈥檚 a little less complicated than programming but there鈥檚 a really cool and interesting thing about the command line interface and the command line interface is actually a complete and near-perfect mirror of the application programming interface of the apis that run 8 so we saw in last week鈥檚 episode the last episode of the show.
We were looking at Lambda and we were doing some things within Lambda based on actions that happened within the AWS API my foot back to that console. So you see here when S3 we added a trigger that meant anytime anyone called the put API. So putting an object putting an object into at 3 and 8 p.m.
I was called to do that and then we reacted to that. Well the command line interface lets us call that API we can actually put an object into S3 from the account. If you want we can also do anything down. So the way the AWS API works is like a mirror image of the command line interface.
So I鈥檝e got a couple examples that I wanted to walk through and to show you but if you want to see something done or me to stumble around and fail doing something, please fired off in the comments here on LinkedIn and we鈥檒l tackle it but this is a standard solution you can install it so you can see here on Mac and Linux you can install it from python directly.
It does run in Python. If your don鈥檛 have that setup, you can use Homebrew on python Mac to install on Windows. You can install it through the installer. She just downloaded run the 64-bit or 32-bit. And once you have it installed the font size here, you are going to need to add some credential so you can have credentials every time you run a command.
It鈥檚 a pain in the butt. What you can do is actually create a credential file that keeps things I saved and that鈥檚 actually the default when you start up. I let me come back to this year. So configuration and credential files is going to save your access key and secret key for the account that you can figure in a profile.
So you don鈥檛 always have to add it. Now. If you鈥檙e running the CLI in the eighth of his clouds or from an ec2 instance your permissions get assigned that鈥檚 a lot easier to handle but we鈥檝e done is I鈥檝e already set up at this profile file so you can see here very fancy access key secret key and then you put your access key and secret key that you get for creating user.
I mean, you can set up your default regions and your default output. So that鈥檚 a one-time activity. You guys can figure that out of a great help files the to do that. Example of an AWS command to AWS triggers the seal I missed your calling as a service S3 and then CP copy just like it is on Linux just like it is on Mac copy this local file my video.
MP4 into this bucket S3 my bucket pretty straightforward. So a copy this to that. Very very easy that is a great example of something that works nice and simply right. So if we go to RS3, we have a road to reinvent bucket. Let me pull up my command line.
Make sure you guys can see this. So I鈥檓 going to switch programming over 200 or the streaming over to I share I鈥檓 going to turn off my logo that we go. I mean up the font size of it here. So if I just simply type clear that awrs, you see it pulls up the help right takes a second.
Then goes we鈥檒l wait a minute. You want help I could do that. I could say give me some help and then you鈥檒l see it鈥檒l just start to automatically page in the command line. So AWS command line unified tool great and gives us the default parameters and how to set this up very very simple and we鈥檙e going to quit out of that pushed you to quit we鈥檙e going to copy that same command.
Where is a AWS S3 CP and I have a file on my desktop that I鈥檓 going to copy to S3 colon colon road to reinvent at and we鈥檙e going to flip over real quick. So I鈥檝e got that cute up already have this file in here. We鈥檙e going to delete it.
Delete that file. Yes. Yes. The bucket is empty makes a little smoother demo. And now that we come back here. So AWS great invoking the command line tool S3. The service were talking to CP is short for copy cuz it lines up with Windows and Linux and Unix at we鈥檙e going to copy this file for my desktop.
So I it鈥檚 a ad for a course I did on mastering I walk to add the three. X3 name of the bucket Road Arena if I hit answer fingers crossed this should work. I think I have it configured correctly. And you see my firewalls actually and asked me to make sure I can allow that upload so desktop to Rotary event to my browser.
Hope you guys back to my browser. So here we have that bucket. If I simply click the refresh button on the bucket while we have copied a file to S3. Rocket science amazing super simple. There鈥檚 a ton of options are consumed you鈥檙e copying things into S3 at but very simple very basic hear.
What we鈥檝e done is used in the command line to push a file into S3 now. We know from last time that could trigger a whole bunch of actions, right? So the reason why I鈥檓 showing you this is uploading something in S3. It鈥檚 an image we could have sent this to a number of other services to our process that image to do something with that image.
And if we send a document we could do the same if we sent a video we could do a bunch of stuff with having a really straightforward interface for people righteous command line. Just type this command and you鈥檙e good or copy this command in your good so you don鈥檛 have to have everything crazy complicated right? So I read an article this morning where someone was trying to create a serverless API for some internal usage and any interesting thing they had was there saying was coughing on my arm or leg just upload from if it鈥檚 just an internal team thing like you need somebody to transfer a file or the kickoff of workflow.
We just typed in one quick word or command and we were Off to the Races. So I can show you why this might be useful we鈥檙e going to search for translate. So translate. I always hesitate showing Google when I鈥檓 hot on a livestream, but always use for so translate very very simple, very straightforward take something from one language flip it into another language at with reasonably decent accuracy.
It鈥檚 it鈥檚 still machine translation, but it gets the point across so your service has a landing page like you鈥檙e looking at right now and explain the marketing positioning of its quick blurb natural and accurate language translation could have guessed that from the name Amazon translate, but there are a bunch of services there their names don鈥檛 line up what鈥檚 going on with the We just kill my notifications here with the with the service.
You normally see some sort of launch video or customer attestation benefits and then use cases right and customer references. It鈥檚 the same setup for every Target landing page and that鈥檚 actually really really useful but we want to hear is across the Stop Bar. So easy Amazon translate overview features pricing at pricing is important to double-check.
I don鈥檛 like running up a random bill. So we鈥檙e going to be in the freezer cuz I haven鈥檛 sent anything to translation this month and 2 million characters per month for 12 months. So I鈥檓 this is an account that set up still with the free tier. But even after that it鈥檚 only $15 per million characters.
So if we sent a few characters and I love when they do these fractions of a penny diseases have no idea 15 bucks per million characters, that鈥檚 a ton of stuff to throw through translate. So we鈥檙e good here. We鈥檙e going to be in a fraction. I we should be in the free tier.
We make it into a fractional charge. But what I really want is Resources are the top. You see the service name overview Futures prices resources that will always send you to if there鈥檚 training available but also the HTML and PDF versions of the documentation the developer guide now that I鈥檓 not a developer, but remember how we talked about the CLI.
The command line interface is a mirror of the API developer to use if we click on HTML we鈥檙e going to get to the web version and we鈥檙e actually going to flip over to the new look of the web version have cuz this snazzy we get how all this works, right? So we see her supported languages that we have a number of East Asian languages Germanic languages.
So we鈥檙e going to start with a source language of English at we鈥檙e going to flip that into maybe a romance language of French cuz at least I can give you a reasonable verification of that translation and but there鈥檚 been quite a few supported languages, which is really really cool and got to love how finish get to some classification but then Down here.
You have some things that don鈥檛 work. So simplified to traditional Chinese and vice-versa doesn鈥檛 work at Korean Hebrew will not work as a perineal region to Arabic or Hebrew and for the record in case you鈥檙e wondering why I call it finish it from a linguistic perspective finishes just fascinating everybody always ask but my last name is actually Dutch Dutch Canadian 50% Dutch for the record.
But yeah, we鈥檙e going to go English to French. But if we understand these cases were trying to translate some some words real real quick. And this is sometimes it鈥檚 faster than doing Google translate, but I think it鈥檚 a really interesting sort of concept and very simple service to work with from Amazon, right you鈥檝e supported languages and we have language codes for that.
So for English if TN for French, it鈥檚 a far that鈥檚 really what we need to know. You could have translate automatically configure this if you want not a problem at we鈥檙e going to click on getting started and then you鈥檒l see there鈥檚 a nice little trick here with getting started in the console so we could go through the web.
And try it and see what鈥檚 the temp out but we can really do is getting started with the console will see the command line. So AWS translate translate text. So you wonder why is the double translate but remember r a c l i setup is very simple and very straightforward AWS to trigger the CLI name of the service name of the action in the service.
So if RS3 with AWS S3 CP for copy for translate we鈥檙e going to AWS translate translate text is the name of the endpoint or calling with an API call. We鈥檙e actually making call for so what we鈥檙e going to do here at we鈥檙e going to admit the region where I have Source language target language and some texts.
So let鈥檚 flip back to our command line which feels like this is more technical than last week. But really it鈥檚 not right. So translate translate text and then I鈥檓 just going to double-check. I have this source code language ever goes Double Dash source golang Is English Double Dash target language code is going to be French text is Hello World fancy exciting stuff.
If you have questions, let me know hit me up on the stream here in LinkedIn and I am monitoring off the side. But if we send this so, let鈥檚 just review this command to make sure we鈥檙e Crystal Clear EOS to trigger. The CLI translate is the name of the service were dealing with Translate text is the call with actually making to the translate service.
We鈥檙e giving a source language of English a target language of French and we鈥檙e saying hello world and we and we get the response which if I hadn鈥檛 missed typed would have been correct. Let me send that. We鈥檙e hello doesn鈥檛 have a W-2 monster and you saw that why do you stop me? You should have stopped me like expelled you up front.
Where could I make mistakes? That鈥檚 a ridiculous mistake. I鈥檓 glad it was that kind of mistake to start with if we say hello at it鈥檚 going to send then turn around and tell us our translated, Texas Board Ramones, which is Flappy Bird word translation what you see with translation similar to natural language processing we were trying to figure out the meaning is the more texts.
You send it the better. So if we go, this is from the livestream to hello, this is from the livestream should have a better translation but live stream is going to mess it up because this is where we going to see where automatic translation generally sucks in French and a lot of the time they use English words for technical stuff and a lot of time they use a literal translations, but there鈥檚 an official list of French technology words are very few people use so we鈥檒l see what pops up here translate English to French.
Hello. This is from the livestream we get this this is Joan on the switches. Let鈥檚 try that again. Translate translates text with the source language codes at the auto and the target language code. Set to Spanish. I don鈥檛 speak Spanish. But let鈥檚 see the difference. This is from the livestream so language auto to target language.
And your hola esto es de la transmision en Vivo live. So English, that鈥檚 it. Nice and simple pretty straightforward. Now you can send anything you want through to the live stream to the translator. So let鈥檚 get a little more complicated because once you鈥檙e in the command line, you鈥檙e in this entire ecosystem of other command line things.
What we鈥檙e going to do is we鈥檙e going to pull out a very simple thing back here. Just thinking on the fly at what I鈥檓 going to do is I鈥檓 just loading up a text editor in the background here and saving a file sample, but what I鈥檝e done is created.
A file that has a bunch of texts that right. So cat is a cabinet. I think who knows cats and the contents of a file from the file to the command line just like it did here so there are two ways to use the CLI in Amazon. I just copied work off of the page the marketing page my words are working just as well as my hair is this morning and as you can tell disastrous, so what we鈥檙e going to do is actually use I鈥檓 a Json file.
So if I fire that up again and let me just open this So I鈥檓 going to change this file a little bit of yours translate likes text files to be in a sec format. So we are going to set up properly and I鈥檓 so again, I鈥檓 just maintaining the file in the background.
He likes them as Json documents. So that is a document with a little bit more format to it. I鈥檓 going to save this and I鈥檒l show you have to start planning and I think he鈥檚 got two minutes flat. So but that鈥檚 alright sample desktop if we do this. So now what we鈥檝e done you鈥檒l see the difference here is there鈥檚 a bracket there is a key and a value in a source language and a code.
So what we鈥檙e going to do is we鈥檙e actually going to clear that out. We鈥檙e going to AWS translate at translate text. Would help if I could spell seal I input Jason and then in this case File. users sample, that should work. Because it did not find my user cuz I forgot one extra.
/ so the way this works is this is a local. So we鈥檝e done a TBS translate translate were using a different input this time using CLI command line interface import Json file and you give a full path to the file starting with file colon slash slash than the full path on Max.
For the root start with that extra / if we do that we are getting a missing input target language code. So we did not specify in our sample language code. We wanted we have a source code, but we don鈥檛 have a Target. So I鈥檓 going to do that right now.
I鈥檓 going to add the target language. Are we go? target language code And in this case, I think I remember my codes. We鈥檙e going to double-check. We鈥檙e going to fire that command back. There are no perfect. So I sent it sad that same set. But in this case, I asked it to translate to Dutch and Alfred it along.
So the translation text many are on the CLI blah blah blah blah blah. You do not want to see me pronounce this word cuz I鈥檒l probably spit up all over my land. In Dutch, we love to roll our G鈥檚 in our ages for some reason but here we go.
We鈥檝e passed it a file, right and that鈥檚 worked well, but if we go back to our original, which is basically just sending a text directly what you can actually do and this may or may not work again. We鈥檙e trying and is pull that this is totally shot in the dark hair team.
So what you can do is figure out other ways to get text into there. And I think what I needed to do was Slash forum. a little Prime and another little Prime not working still concept pretty straightforward. You have a command line. We鈥檙e at a time here, but I wanted to highlight.
This is just a really simple and easy one. A really simple and easy one to do. When was very poignant in Spanish but this is a quick introduction to the AWS CLI. So the CLI is a direct and complete mirror of the API, which means if you鈥檙e not comfortable with programming you鈥檙e trying to learn each new service.
The command line is really helpful if you just want to do one thing as we saw in our Command to undo scroll on a pier at as we saw an archimandrite here to copy a file from our local system into S3 very very simple AWS for the command line interface S3 for the service CP is a shortcut for copy to make it line up with the rest of the operating system are local file into our destination bucket that worked like a charm.
We also playing around a little bit with the translation feature. So again here we have a WS translate and witches are so hated. Translate for are the service were calling the endpoint or calling his translate text to give it a source code in this case for laundry City Auto is it you figured out translate Target.
We did Spanish or French we did and we gave a text to give a text from configuration file Wilson, give a text directly to the command line that directly for the command line when you remember like I don鈥檛 on a Monday with crazy hair and things are going well.
Would you remember how to pipe things at in two places on the command line? It鈥檚 really simple and straightforward and you can then actually just pull from various files. Now, there are some limits around a translation in before we sign off. Let鈥檚 go to that real quick and just with any AWS service, especially the ones around natural language you are going to see that there are limits.
Now. The good news is is there always documented so we鈥檙e back door documentation here on the side guidelines and limits in this case character encoding always needs to be utf-8 which is Unicode generally at four languages at 6 need that鈥檚 how you keep all the diacritics the accents of the cool little things and there but here鈥檚 the key document size 5000x you need to send smaller chunks of text.
In fact, all of the examples as they like it here. So you translate a webpage. Here鈥檚 how you translate a large document. They start by taking the document and breaking it up into smaller pieces that get under the 5,000 bite limit that you can fire off a custom terminology and stuff within the service has a bunch of stuff that is in Amazon translate that we didn鈥檛 touch cuz we鈥檙e just looking for an example and put the key takeaway hairs at the seal is really handy once you set it up if you鈥檙e not in the eighth of his class if you鈥檙e running it locally on a laptop or an iMac or whatever.
You鈥檒l need an access key and a secret key. If you鈥檙e running it in the AWS Cloud Your Role will dictate what you can do and then remembered AWS name of the service name of the endpoint in a bunch of options if the direct mirror of the programming interface, which makes life really easy and simple for a lot of stuff.
When is great way to learn and kind of play around and poke at the different of your services? And I know this is a little crazy. I mean it鈥檚 reflective of my hair. It鈥檚 Monday. It鈥檚 Monday. I鈥檓 going to be for me this also highlights the spirit the spirit of these.
Streams leading up to reinvent her really just casual learning something together making some mistakes. You saw me Miss type of bunch of stuff. It happens to all of us. That鈥檚 no reason not to learn just keep moving forward roll with it at learn from your mistakes and you could call person.
This morning we copy to file for the command line to a local eat S3 and we translated some text real simple really easy. We did that in 25-30 minutes, really you don鈥檛 know prior coffee, which is like no prior experience. Let me know here on LinkedIn. Let me know on YouTube what you guys want to see next.
I got a bunch of plans. I am publishing a schedule. Hopefully this week that鈥檚 actually tied to another effort to update my website as a reminder. I have published The Ultimate Guide to eight of his reinvent 2019 a publishes every year. This is this year鈥檚 headed up on a cloud Guru.
I鈥檒l put the link here in LinkedIn. So you guys can see that basically it goes through. What鈥檚 what at the show and what you should be looking for a next. Milestone are coming up in the next few weeks is some reserving seats for sessions. We鈥檙e going to be talking about that live on the screen when the time comes, but be prepared by now by reading the guide go in and start the sessions you鈥檙e interested in.
This is going to be amazing conference. I hopefully you following me on the streams leading up to the conference is going to give you even more of an edge at learn even more stuff. Thanks for joining me. As always. I will catch you guys on the next episode of this later this week.
Keep those comments coming up. I do review them and then add that to the content calendar or chocolate on the next a segment. So I will talk to you soon. Thanks for joining me early Monday. Have a great one. Good morning, everybody. How you doing? So just the view here.
Boom, there we go. Right on. All right. Let me just double check the levels. We are streaming live again on LinkedIn. It is apparently big hair Monday really have to do something with his We are continuing our March down to a tab us reinvent. We are watching this on YouTube after the fact, please comment below.
I will Circle back as I do with every one of these videos on demand address one of your questions are in the next stream. But the idea here is pretty straightforward pretty simple. We鈥檙e going to touch on areas of the AWS Cloud. They may not be familiar with the reason being we have a 69 days from this Monday right now up until when reinvent kicks off in December.
Yes, that鈥檚 a very very long way away. But there is a ton of different things to watch to learn to understand and comprehend to kind of get the most out of reinvent. I really want you to get the most out of room and I think it鈥檚 a fantastic conference.
I think everybody who goes has a blast em, and if you can learn a lot so we covered last time we covered AWS Lambda, which is a critical service that I鈥檓 sure we鈥檙e going to be actually bouncing a back and forth to a bunch of times and it鈥檚 just that important but some of the feedback I got talking to people was that it might have been a little too much because it鈥檚 a people maybe you weren鈥檛 used to at talking about programming.
They weren鈥檛 used to getting their hands dirty. diving in and doing stuff, you know, we set up something pretty sure for pretty simple and I think did the takeaway was that school we see and understand sort of how How this can be a benefit but what season do a little bit more.
Let鈥檚 cover some other area. So I thought hey, you know what today? We鈥檙e going to cover the command line. And you know, I am apparently you鈥檙e crazy Professor because every time I touch my hair it gets worse impressive feat. I know but we鈥檙e going to talk about the command line.
So I鈥檓 going to switch over to my screen at we鈥檙e going to make sure you鈥檙e chilling right one cool looking primarily on my display, but I鈥檒l come back for key points at you guys here in a camera. We are going to give ourselves a little bit less time at today.
I what we鈥檙e going to do is I鈥檓 going to put some time up on this clock make sure it鈥檚 the right thing. We鈥檙e going to say. what鈥檚 a let鈥檚 go to 25 minutes after the hour. So 20 minutes on the clock. I need to add sound effects of a stream deck.
I should put sound effects into this to make it a little cooler. And that is what we set up last time. We set up an a Lambda function that helped us every time we dropped something into an S3 bucket and it fired off an event into the logs telling us what we put in and I鈥檓 so I think that was pretty straightforward.
I like I said, I got some feedback that led to today鈥檚 topic which is the command line. So if questions were going along please fired off in LinkedIn, I have it that browser set up so that I can see the quality of what鈥檚 going on. They鈥檙e going to double-check the stream quality here, which seems to be good sup.
We are going to talk about the command line interface. Let me adjust fly is a tool that you type in to wait for the command line This is present on pretty much every database managed. Am I at specifically the Amazon Linux am I? It鈥檚 a present in a bunch of default things that you find.
So Beanstalk at present on a lot of people containers its present. What is actually the tool that like to manipulate or work with AWS Services. Now, why would you want to do this when I see how I won鈥檛 because it鈥檚 pretty straightforward and simple and it鈥檚 a little less complicated than programming but there鈥檚 a really cool and interesting thing about the command line interface and the command line interface is actually a complete and near-perfect mirror of the application programming interface of the apis that run 8 so we saw in last week鈥檚 episode the last episode of the show.
We were looking at Lambda and we were doing some things within Lambda based on actions that happened within the AWS API my foot back to that console. So you see here when S3 we added a trigger that meant anytime anyone called the put API. So putting an object putting an object into at 3 and 8 p.m.
I was called to do that and then we reacted to that. Well the command line interface lets us call that API we can actually put an object into S3 from the account. If you want we can also do anything down. So the way the AWS API works is like a mirror image of the command line interface.
So I鈥檝e got a couple examples that I wanted to walk through and to show you but if you want to see something done or me to stumble around and fail doing something, please fired off in the comments here on LinkedIn and we鈥檒l tackle it but this is a standard solution you can install it so you can see here on Mac and Linux you can install it from python directly.
It does run in Python. If your don鈥檛 have that setup, you can use Homebrew on python Mac to install on Windows. You can install it through the installer. She just downloaded run the 64-bit or 32-bit. And once you have it installed the font size here, you are going to need to add some credential so you can have credentials every time you run a command.
It鈥檚 a pain in the butt. What you can do is actually create a credential file that keeps things I saved and that鈥檚 actually the default when you start up. I let me come back to this year. So configuration and credential files is going to save your access key and secret key for the account that you can figure in a profile.
So you don鈥檛 always have to add it. Now. If you鈥檙e running the CLI in the eighth of his clouds or from an ec2 instance your permissions get assigned that鈥檚 a lot easier to handle but we鈥檝e done is I鈥檝e already set up at this profile file so you can see here very fancy access key secret key and then you put your access key and secret key that you get for creating user.
I mean, you can set up your default regions and your default output. So that鈥檚 a one-time activity. You guys can figure that out of a great help files the to do that. Example of an AWS command to AWS triggers the seal I missed your calling as a service S3 and then CP copy just like it is on Linux just like it is on Mac copy this local file my video.
MP4 into this bucket S3 my bucket pretty straightforward. So a copy this to that. Very very easy that is a great example of something that works nice and simply right. So if we go to RS3, we have a road to reinvent bucket. Let me pull up my command line.
Make sure you guys can see this. So I鈥檓 going to switch programming over 200 or the streaming over to I share I鈥檓 going to turn off my logo that we go. I mean up the font size of it here. So if I just simply type clear that awrs, you see it pulls up the help right takes a second.
Then goes we鈥檒l wait a minute. You want help I could do that. I could say give me some help and then you鈥檒l see it鈥檒l just start to automatically page in the command line. So AWS command line unified tool great and gives us the default parameters and how to set this up very very simple and we鈥檙e going to quit out of that pushed you to quit we鈥檙e going to copy that same command.
Where is a AWS S3 CP and I have a file on my desktop that I鈥檓 going to copy to S3 colon colon road to reinvent at and we鈥檙e going to flip over real quick. So I鈥檝e got that cute up already have this file in here. We鈥檙e going to delete it.
Delete that file. Yes. Yes. The bucket is empty makes a little smoother demo. And now that we come back here. So AWS great invoking the command line tool S3. The service were talking to CP is short for copy cuz it lines up with Windows and Linux and Unix at we鈥檙e going to copy this file for my desktop.
So I it鈥檚 a ad for a course I did on mastering I walk to add the three. X3 name of the bucket Road Arena if I hit answer fingers crossed this should work. I think I have it configured correctly. And you see my firewalls actually and asked me to make sure I can allow that upload so desktop to Rotary event to my browser.
Hope you guys back to my browser. So here we have that bucket. If I simply click the refresh button on the bucket while we have copied a file to S3. Rocket science amazing super simple. There鈥檚 a ton of options are consumed you鈥檙e copying things into S3 at but very simple very basic hear.
What we鈥檝e done is used in the command line to push a file into S3 now. We know from last time that could trigger a whole bunch of actions, right? So the reason why I鈥檓 showing you this is uploading something in S3. It鈥檚 an image we could have sent this to a number of other services to our process that image to do something with that image.
And if we send a document we could do the same if we sent a video we could do a bunch of stuff with having a really straightforward interface for people righteous command line. Just type this command and you鈥檙e good or copy this command in your good so you don鈥檛 have to have everything crazy complicated right? So I read an article this morning where someone was trying to create a serverless API for some internal usage and any interesting thing they had was there saying was coughing on my arm or leg just upload from if it鈥檚 just an internal team thing like you need somebody to transfer a file or the kickoff of workflow.
We just typed in one quick word or command and we were Off to the Races. So I can show you why this might be useful we鈥檙e going to search for translate. So translate. I always hesitate showing Google when I鈥檓 hot on a livestream, but always use for so translate very very simple, very straightforward take something from one language flip it into another language at with reasonably decent accuracy.
It鈥檚 it鈥檚 still machine translation, but it gets the point across so your service has a landing page like you鈥檙e looking at right now and explain the marketing positioning of its quick blurb natural and accurate language translation could have guessed that from the name Amazon translate, but there are a bunch of services there their names don鈥檛 line up what鈥檚 going on with the We just kill my notifications here with the with the service.
You normally see some sort of launch video or customer attestation benefits and then use cases right and customer references. It鈥檚 the same setup for every Target landing page and that鈥檚 actually really really useful but we want to hear is across the Stop Bar. So easy Amazon translate overview features pricing at pricing is important to double-check.
I don鈥檛 like running up a random bill. So we鈥檙e going to be in the freezer cuz I haven鈥檛 sent anything to translation this month and 2 million characters per month for 12 months. So I鈥檓 this is an account that set up still with the free tier. But even after that it鈥檚 only $15 per million characters.
So if we sent a few characters and I love when they do these fractions of a penny diseases have no idea 15 bucks per million characters, that鈥檚 a ton of stuff to throw through translate. So we鈥檙e good here. We鈥檙e going to be in a fraction. I we should be in the free tier.
We make it into a fractional charge. But what I really want is Resources are the top. You see the service name overview Futures prices resources that will always send you to if there鈥檚 training available but also the HTML and PDF versions of the documentation the developer guide now that I鈥檓 not a developer, but remember how we talked about the CLI.
The command line interface is a mirror of the API developer to use if we click on HTML we鈥檙e going to get to the web version and we鈥檙e actually going to flip over to the new look of the web version have cuz this snazzy we get how all this works, right? So we see her supported languages that we have a number of East Asian languages Germanic languages.
So we鈥檙e going to start with a source language of English at we鈥檙e going to flip that into maybe a romance language of French cuz at least I can give you a reasonable verification of that translation and but there鈥檚 been quite a few supported languages, which is really really cool and got to love how finish get to some classification but then Down here.
You have some things that don鈥檛 work. So simplified to traditional Chinese and vice-versa doesn鈥檛 work at Korean Hebrew will not work as a perineal region to Arabic or Hebrew and for the record in case you鈥檙e wondering why I call it finish it from a linguistic perspective finishes just fascinating everybody always ask but my last name is actually Dutch Dutch Canadian 50% Dutch for the record.
But yeah, we鈥檙e going to go English to French. But if we understand these cases were trying to translate some some words real real quick. And this is sometimes it鈥檚 faster than doing Google translate, but I think it鈥檚 a really interesting sort of concept and very simple service to work with from Amazon, right you鈥檝e supported languages and we have language codes for that.
So for English if TN for French, it鈥檚 a far that鈥檚 really what we need to know. You could have translate automatically configure this if you want not a problem at we鈥檙e going to click on getting started and then you鈥檒l see there鈥檚 a nice little trick here with getting started in the console so we could go through the web.
And try it and see what鈥檚 the temp out but we can really do is getting started with the console will see the command line. So AWS translate translate text. So you wonder why is the double translate but remember r a c l i setup is very simple and very straightforward AWS to trigger the CLI name of the service name of the action in the service.
So if RS3 with AWS S3 CP for copy for translate we鈥檙e going to AWS translate translate text is the name of the endpoint or calling with an API call. We鈥檙e actually making call for so what we鈥檙e going to do here at we鈥檙e going to admit the region where I have Source language target language and some texts.
So let鈥檚 flip back to our command line which feels like this is more technical than last week. But really it鈥檚 not right. So translate translate text and then I鈥檓 just going to double-check. I have this source code language ever goes Double Dash source golang Is English Double Dash target language code is going to be French text is Hello World fancy exciting stuff.
If you have questions, let me know hit me up on the stream here in LinkedIn and I am monitoring off the side. But if we send this so, let鈥檚 just review this command to make sure we鈥檙e Crystal Clear EOS to trigger. The CLI translate is the name of the service were dealing with Translate text is the call with actually making to the translate service.
We鈥檙e giving a source language of English a target language of French and we鈥檙e saying hello world and we and we get the response which if I hadn鈥檛 missed typed would have been correct. Let me send that. We鈥檙e hello doesn鈥檛 have a W-2 monster and you saw that why do you stop me? You should have stopped me like expelled you up front.
Where could I make mistakes? That鈥檚 a ridiculous mistake. I鈥檓 glad it was that kind of mistake to start with if we say hello at it鈥檚 going to send then turn around and tell us our translated, Texas Board Ramones, which is Flappy Bird word translation what you see with translation similar to natural language processing we were trying to figure out the meaning is the more texts.
You send it the better. So if we go, this is from the livestream to hello, this is from the livestream should have a better translation but live stream is going to mess it up because this is where we going to see where automatic translation generally sucks in French and a lot of the time they use English words for technical stuff and a lot of time they use a literal translations, but there鈥檚 an official list of French technology words are very few people use so we鈥檒l see what pops up here translate English to French.
Hello. This is from the livestream we get this this is Joan on the switches. Let鈥檚 try that again. Translate translates text with the source language codes at the auto and the target language code. Set to Spanish. I don鈥檛 speak Spanish. But let鈥檚 see the difference. This is from the livestream so language auto to target language.
And your hola esto es de la transmision en Vivo live. So English, that鈥檚 it. Nice and simple pretty straightforward. Now you can send anything you want through to the live stream to the translator. So let鈥檚 get a little more complicated because once you鈥檙e in the command line, you鈥檙e in this entire ecosystem of other command line things.
What we鈥檙e going to do is we鈥檙e going to pull out a very simple thing back here. Just thinking on the fly at what I鈥檓 going to do is I鈥檓 just loading up a text editor in the background here and saving a file sample, but what I鈥檝e done is created.
A file that has a bunch of texts that right. So cat is a cabinet. I think who knows cats and the contents of a file from the file to the command line just like it did here so there are two ways to use the CLI in Amazon. I just copied work off of the page the marketing page my words are working just as well as my hair is this morning and as you can tell disastrous, so what we鈥檙e going to do is actually use I鈥檓 a Json file.
So if I fire that up again and let me just open this So I鈥檓 going to change this file a little bit of yours translate likes text files to be in a sec format. So we are going to set up properly and I鈥檓 so again, I鈥檓 just maintaining the file in the background.
He likes them as Json documents. So that is a document with a little bit more format to it. I鈥檓 going to save this and I鈥檒l show you have to start planning and I think he鈥檚 got two minutes flat. So but that鈥檚 alright sample desktop if we do this. So now what we鈥檝e done you鈥檒l see the difference here is there鈥檚 a bracket there is a key and a value in a source language and a code.
So what we鈥檙e going to do is we鈥檙e actually going to clear that out. We鈥檙e going to AWS translate at translate text. Would help if I could spell seal I input Jason and then in this case File. users sample, that should work. Because it did not find my user cuz I forgot one extra.
/ so the way this works is this is a local. So we鈥檝e done a TBS translate translate were using a different input this time using CLI command line interface import Json file and you give a full path to the file starting with file colon slash slash than the full path on Max.
For the root start with that extra / if we do that we are getting a missing input target language code. So we did not specify in our sample language code. We wanted we have a source code, but we don鈥檛 have a Target. So I鈥檓 going to do that right now.
I鈥檓 going to add the target language. Are we go? target language code And in this case, I think I remember my codes. We鈥檙e going to double-check. We鈥檙e going to fire that command back. There are no perfect. So I sent it sad that same set. But in this case, I asked it to translate to Dutch and Alfred it along.
So the translation text many are on the CLI blah blah blah blah blah. You do not want to see me pronounce this word cuz I鈥檒l probably spit up all over my land. In Dutch, we love to roll our G鈥檚 in our ages for some reason but here we go.
We鈥檝e passed it a file, right and that鈥檚 worked well, but if we go back to our original, which is basically just sending a text directly what you can actually do and this may or may not work again. We鈥檙e trying and is pull that this is totally shot in the dark hair team.
So what you can do is figure out other ways to get text into there. And I think what I needed to do was Slash forum. a little Prime and another little Prime not working still concept pretty straightforward. You have a command line. We鈥檙e at a time here, but I wanted to highlight.
This is just a really simple and easy one. A really simple and easy one to do. When was very poignant in Spanish but this is a quick introduction to the AWS CLI. So the CLI is a direct and complete mirror of the API, which means if you鈥檙e not comfortable with programming you鈥檙e trying to learn each new service.
The command line is really helpful if you just want to do one thing as we saw in our Command to undo scroll on a pier at as we saw an archimandrite here to copy a file from our local system into S3 very very simple AWS for the command line interface S3 for the service CP is a shortcut for copy to make it line up with the rest of the operating system are local file into our destination bucket that worked like a charm.
We also playing around a little bit with the translation feature. So again here we have a WS translate and witches are so hated. Translate for are the service were calling the endpoint or calling his translate text to give it a source code in this case for laundry City Auto is it you figured out translate Target.
We did Spanish or French we did and we gave a text to give a text from configuration file Wilson, give a text directly to the command line that directly for the command line when you remember like I don鈥檛 on a Monday with crazy hair and things are going well.
Would you remember how to pipe things at in two places on the command line? It鈥檚 really simple and straightforward and you can then actually just pull from various files. Now, there are some limits around a translation in before we sign off. Let鈥檚 go to that real quick and just with any AWS service, especially the ones around natural language you are going to see that there are limits.
Now. The good news is is there always documented so we鈥檙e back door documentation here on the side guidelines and limits in this case character encoding always needs to be utf-8 which is Unicode generally at four languages at 6 need that鈥檚 how you keep all the diacritics the accents of the cool little things and there but here鈥檚 the key document size 5000x you need to send smaller chunks of text.
In fact, all of the examples as they like it here. So you translate a webpage. Here鈥檚 how you translate a large document. They start by taking the document and breaking it up into smaller pieces that get under the 5,000 bite limit that you can fire off a custom terminology and stuff within the service has a bunch of stuff that is in Amazon translate that we didn鈥檛 touch cuz we鈥檙e just looking for an example and put the key takeaway hairs at the seal is really handy once you set it up if you鈥檙e not in the eighth of his class if you鈥檙e running it locally on a laptop or an iMac or whatever.
You鈥檒l need an access key and a secret key. If you鈥檙e running it in the AWS Cloud Your Role will dictate what you can do and then remembered AWS name of the service name of the endpoint in a bunch of options if the direct mirror of the programming interface, which makes life really easy and simple for a lot of stuff.
When is great way to learn and kind of play around and poke at the different of your services? And I know this is a little crazy. I mean it鈥檚 reflective of my hair. It鈥檚 Monday. It鈥檚 Monday. I鈥檓 going to be for me this also highlights the spirit the spirit of these.
Streams leading up to reinvent her really just casual learning something together making some mistakes. You saw me Miss type of bunch of stuff. It happens to all of us. That鈥檚 no reason not to learn just keep moving forward roll with it at learn from your mistakes and you could call person.
This morning we copy to file for the command line to a local eat S3 and we translated some text real simple really easy. We did that in 25-30 minutes, really you don鈥檛 know prior coffee, which is like no prior experience. Let me know here on LinkedIn. Let me know on YouTube what you guys want to see next.
I got a bunch of plans. I am publishing a schedule. Hopefully this week that鈥檚 actually tied to another effort to update my website as a reminder. I have published The Ultimate Guide to eight of his reinvent 2019 a publishes every year. This is this year鈥檚 headed up on a cloud Guru.
I鈥檒l put the link here in LinkedIn. So you guys can see that basically it goes through. What鈥檚 what at the show and what you should be looking for a next. Milestone are coming up in the next few weeks is some reserving seats for sessions. We鈥檙e going to be talking about that live on the screen when the time comes, but be prepared by now by reading the guide go in and start the sessions you鈥檙e interested in.
This is going to be amazing conference. I hopefully you following me on the streams leading up to the conference is going to give you even more of an edge at learn even more stuff. Thanks for joining me. As always. I will catch you guys on the next episode of this later this week.
Keep those comments coming up. I do review them and then add that to the content calendar or chocolate on the next a segment. So I will talk to you soon. Thanks for joining me early Monday. Have a great one.