Introduction to Amazon Lightsail Object Storage

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
okay let's get started so hello and welcome to today's webinar thank you for joining us my name is stuart and i'm the aws content director here at cloud academy and today we're going to be focusing on amazon light cell and in particular object storage when using light sale now this is a relatively new element of the service which was announced in july this year and it allows you to store your static content such as images videos or html files to use with your websites or applications now on the panel with me today we have darko he's a senior developer advocate at aws so welcome to the webinar darko i really appreciate you joining me um how are you and what are you calling him from today thank you sir um i am pretty good uh calling in from um rainy serbia uh so yeah it's uh it's eight it's 6 p.m here my time so uh yeah um very happy to be here it's yeah it's raining here as well it's pretty much all around the world i'm looking forward to it sorry like a typical november day so indeed in day to day uh yeah i'm looking forward to your presentation you have for us today um but before i hand it over to you darko to give us the agenda i just want to let everyone know that this webinar is being recorded and so you'll all receive a link to it as soon as it's been published and also if you do have any questions as we go through the presentation today then please use the chat window and we'll try to get um to as many of them as we can as we go through the session so okay over to you darko let's get into it thank you very much i do believe my screen has been shared so uh you should be able to see my screen over there or i don't know where go to webinar shows it for you but for me it's there um excellent let's let's kick it off i'm gonna switch to powerpoint now so i can kind of actually click on stuff um first of all thank you very much for joining me in this presentation i appreciate your time and uh as stuart said feel free to ask me questions there's a question box somewhere on the side so um we're gonna do this like it's live in real time so we're gonna try to answer the questions as soon as we can um so let's talk about amazon light sales storage first of all let me talk about you um have you ever wanted to host a website let's say a wordpress blog i'm sure you have i'm sure you met somebody who has um usually what you need to host the wordpress website you need a server right and of course you can get an ec2 instance on aws and all the fun things there but let's say you want something quick and dirty right you want something simple you don't have the people who can help you maintain it you just want some simple let's call it the vps hosting but with the backing of a major cloud this is where the light sale comes in right so we can we can give you all of the fun servers all of the compute resources to host your websites your blogs your whatevers but still be simple and robust as aws now when you host a website when you host something on wordpress it's all fine and dandy until you start talking about storage right storage is usually the problem here when you need to expand when you need to scale when you need to move a server storage gets effect very quickly so today i'm going to talk to you about how can you add storage to your light sale instances so um let's kick it off by kicking it off i mean let's look at the agenda so i'm gonna be talking today about amazon light sale some storage options um when it comes to amazon light sale and also i'm gonna be showing you how that actually works so we're gonna have a demo i've prepared something so um but i'm gonna do it live as much as possible okay let's kick it off um let me kick off my i wanna do my stopwatch here just so i i'm sure i'm on time so let's talk about amazon light sale what is amazon light sale we're wonderful with names so when you hear them where the word amazon lightsail you might not know what that is immediately but it is our vps offering our virtual private server if you ever had to pay or use your typical web hosting somewhere think of it like that it is definitely the easiest way to get started to get something running on a server on aws it is it is just a excellent neat little service that can help you host your website your your windows workloads some storage anything you want on aws again with a couple of clicks with wonderful predictable low pricing um it takes four clicks to launch a server that's all um you could do some database you can do containers and a whole lot of different things right so why would you use this why why not go on ec2 or rds or container services on aws well it's easy right it's you know just click and you can launch something within minutes uh it can it can actually scale as you use it it's relatively simple to scale it up and it's also possible to move it to ec2 if you outgrow let's say the usage on light sale and we manage all the fun things for you so from your servers to your storage to your databases and even to the container backends we all do it for you you just do what's important and that is build your website one of the fun things about aws and i i use the term fun very loosely is pricing um sometimes when you get into the weeds of aws and you start using multiple different services multiple different things pricing can be to say the least confusing um and lightsail has you covered here because lightsail has this amazing predictable pricing you literally pay how much does how much it says on the pin so if you if you take your instance if you take your server for three and a half dollars a month you pay three and a half dollars a month that's it right there is no additional cost you get your half a gig of ram you get your one vcpu you get 20 gigs of storage and you get one terabyte of transfer that's what you get for this money again it is just wonderful that you can kind of predict and sometimes some workloads are just fine with this you can just i know that i'm not gonna spend more than two terabytes of transfer and i will pay five bucks a month wonderful also if you do not want to spend time and worry about like uh configuring servers setting up wordpress how how much does it take you to install wordpress on your vanilla server like you set up a linux server how long does it take you to set up a wordpress website it takes a while right you have to install mysql you have to set up apache you have all those sort of things here you have one click blueprints right if you want to launch uh uh a website uh a nist an instance that contains wordpress it can you can do it in literally a click and it's just wonderful it gets there fast you have a bunch of other uh like blueprints especially for linux you can do also windows stuff they're here as well so it just makes your life so much easier so what is amazon light sale your vps is your virtual private servers your your databases your containers your load balancers your dns management and also you can do something with content delivery network so if you need a cdn for your data you can also set this up on light sale if you want to expand this if you want to go and reach out to aws and access some other things you can absolutely do that you can connect the network on light sail to a new to to a vpc so you can access some services there right you can you can access other database services absolutely and you can also have fun with the aws iam configurations and all the fun things and what's great you can actually move away from light sail if you decide that okay we've matured enough i need the brand of aws i need more complexity in my workload i can i wouldn't call it upgrade migrate to ec2 with your workload which is just fun it's a couple of clicks you can basically export your your server from light sail to ec2 which is which makes it so much fun what do people run here web applications developing environments websites business software anything you think can think under the sun it can run on light sales so it is not limited to a specific thing it's just a simple way of interacting with these things think of it a workload which doesn't require as much complexity in infrastructure it's just just just a great way to do it on light sale all right um i spent five minutes talking about light sail um and you be maybe wondering um who is this bald person and why is he screaming at me through the camera let me introduce myself stuart already did it for a moment but i am my name is yes my name is darko messersch i am a long time builder engineer i am something they used to call a system administrator i used to maintain a bunch of servers both windows and linux i spent i think 15 years now doing those things i always wanted to automate things i had a passion for automation i had a passion for making my life easy and now i want to make your life easy by teaching you some things and kind of showing you the tips and tricks and quirks how you can do things um in your day-to-day job while still having a you know an easy day at it i also happen to work for amazon web services as a developer advocate and i'm based in berlin germany but now i'm coming to you live from my childhood home i'm at my mom's house uh i got stuck in serbia for some reason and um yeah hello so also feel free to follow me on the social medias if you want i do some twitter i do linkedin i even do some youtube if you want to see my big bald head more that's the way to do it now let's move on from light sale as a as an option to store your servers to store your compute resources let's move on and talk about light sale storage right i i made sure to get a very old hard disk uh i was discussing this uh earlier this is a western digital wd 9504 for a a 44 megabyte hard drive we're not going to be talking about 44 megabyte hard drives we're going to be talking about storage options for your servers your instances well for anything on amazon light sales how you can actually how can you actually store files on light sale there's a couple of options we have here right a couple of options you can use to store your precious data and precious files on on on light cell let's start with the basic let's start with instant storage this is storage which is directly attached to your server right this is a directly attached to your ec2 instance it's it's a disk that is being accessed um as an operating system directly on your server right so every instance must have one right it's just that's where everything else everything sits on right it's your operating systems and it also persists no matter how much you reboot or restart or uh or move your instance around right and and simple enough this storage comes with the default bundle um of of of any server right and this just makes sense but this is sometimes not enough right having a having a single disk attached to a server is okay but you want more you want it scalable you want to be able to share storage between multiple servers you want to be able to back up your instances maybe maybe expand the storage as you grow maybe you want to do storage on a really fast and reliable level so there's a bunch of different options we can we can look at and you can use for your servers but before we get into that let's have a crash course in cloud storage right there are three types of storage typically accessed in the cloud block storage file storage and object storage what is block storage this is block storage your hard disk your virtual disk that is block storage data is stored on blocks on the disks it's physically stored in the disk and the operating system the the linux the windows you're running is responsible for writing things on that disk it's using local operating system calls to write on a file system which is contained on that operating system on that disk right it's your typical you know you mount the disc you format it you use it and you can actually have this thing on a light sail instance right you instead of just having a single what you call it the single root drive you can have multiple you can basically attach up to 15 disks up to 15 additional disks to your light sail instance let's say you have a wordpress server and you wish to expand the storage add an additional drive beyond your root operating system you can right you can attach this up to 16 terabytes per disk which is a lot um and it's going to actually persist beyond the life of an instance if you delete to the instance you can spin up a new instance attach that disk to it and the data will still be there what's wonderful about block storage in in light sale is that you can perform these things called snapshots snapshots are wonderful they basically take the snapshot of an existing disk it creates a copy of it constantly it can do automatic stuff you can do manually it's an incremental basically it's a way to keep your data secure it's not the end all beyond all backup solution but it's great you snapshot your disk you nuke your server you spin up a new one and you attach uh attach this one with the disk which is just wonderful it's it's just it's great there's a couple there's a bit of a storage fee when it comes to this one the only thing you pay for is having that snapshot sit somewhere and having it basically you know pay per month depending on how much megabytes the snapshot is so this is block storage this is something that should not be new to new to most of you um and and it's pretty straightforward right let's move on to the second thing let's talk about file storage isn't block storage faster don't you store files on blocks yes you do but the different when we look at file storage file storage is basically files stored in a directory tree now there is still a file system there there is um a disk somewhere but usually your operating system doesn't handle the actual writing to the disk it doesn't handle the writing to the blocks something else handles writing to the blocks but your server doesn't how does that work network file systems network file systems were art is a typical example of file storage what is wonderful about file storage is you can share a single piece of file storage a single file system among multiple different servers so in in the case of amazon lightsail you can use something like amazon efs which is our elastic file system it's basically a nas that runs somewhere in the cloud and what's great about it you can just attach this as a nas thing on your on your linux system it's posex compliant and you can just keep on writing files to it your operating system still needs to write to a file system but the actual writing to the physical blocks to this whole thing is handled by efs it's wonderful it's it's connected it's basically an nfs mount it's actually through a bpc it's it scales as you grow as you want i think i don't want to lie here but i think this the limit is like in petabytes so i think you will not run out of display out of space on efs and it was great you can actually just spread it around with multiple websites let's say you have this wordpress wordpress website and uh you wanna uh you wanna attach uh let's say common file system across multiple wordpress wordpress websites this is where you use efs for so very simple very good but it only works on linux if only there was a windows option and there is there's fsx for windows it's basically the same thing it's not nfs it's not network file system it's smb so it's samba the same thing as i said before but in this case it just it has a up to 64 terabytes on a file system it's again fully managed and this is this is what you would use when it comes to windows and and and like your windows light sale instances and you wish to share files share a file system between multiple windows systems it's just wonderful okay let's move on to the to number three to object storage what is object storage now and this is this is not something super new but it's something that um is newer than the last two things data is not stored as a file even though you may see it as a file in a folder um it is not a file it's an object basically identified with a key in a flat namespace so there's no directory hierarchy even though you may see it as a directory hierarchy it's basically a namespace it's a bunch of prefixes and your object um the way you access objects is not through a file system call it's through an api call it's usually https you access the object and you write the object and you read the object through an http call this is just wonderful especially for things like when you write once and you want to read it many times because you can just get this excellent performance from uh from a light from a object storage and uh what is an object storage what's an example here amazon s3 amazon s3 is an excellent example of light sale object storage so one of the ways you can do it is basically attach a bucket to an ec2 instance and access the files there now again you're not accessing those files is a file system you are writing and reading those files through https think of it your wordpress website you want to go and store all of your images from wordpress instead of the heart on the hard disk uh on the on the physical disk on on the on the server you want to store it as an object in s3 that's how you do it it is great because it gives you this object this neat secure fast and reliable way of storing files enormous amount of data um and it's also possible to distribute those files to a cdn so if you need a content delivery network if you need to make those files accessible and closer to your audience through the means of global caching you can actually do that it's much more difficult to do those things when they're sitting on a hard disk somewhere were there objects like this in s3 it's so much better and it's it's amazon light sales so it wouldn't be the same without being super simple to understand when it comes to pricing so there are flat rates as low as one dollar a month for this so yeah so this is the light sale storage trifecta you have your block storage on the on the instance itself you have your efs is a file system spread across multiple different instances and you can also have light cell object storage um available to you as the means of storing your objects somewhere out there okay uh let's do something let's go i'm gonna i'm gonna go ahead right now and i'm gonna create a wordpress website just like you would and i'm going to create some storage and we're going to be connecting it all right so the goal today is to create a wordpress website on lightsail and instead of using local storage on that wordpress website i'm going to be using amazon s3 or light sale object storage to store any uploaded file to my blog so create instance click number one uh i'm going to be choosing linux unit linux unix and i'm going to be leaving it at wordpress okay and i'm going to be doing the second i'm going to do five dollars a month right so i'm choosing the five dollars a month option here we're choosing that we're going to be using the blueprint with wordpress uh and i'm gonna be calling it what are we gonna call it here uh wordpress uh storage there you go that's how many clicks that's four clicks in four clicks i have launched the wordpress website which is just wonderful um so it takes a little bit for it to kind of spin up and do all of those things while that is happening let's go create ourselves some bucket so click on the storage side here i'm going to zoom in here a bit so you can see click on the storage side uh you will see a bunch of options here to create disks i'm going to go create a bucket so there's a big old orange button here it says create bucket click on that i'm going to keep the default region and there's a storage plan i'm gonna keep it as this and the smallest one you want well in my case i won't have more than five gigs of data and no more than 25 gigs of storage that's fine i'm gonna leave this default main i don't really care for the name of the bucket it needs to be unique anyway um it's free for the first 12 months that's pretty good and click the create bucket this will now create an s3 bucket i call it an s3 bucket it's a light sale object storage bucket but it's an s3 bucket in essence um and that's it the bucket is created let's go back to to this thing uh and let's see this one it's running okay let's try to copy paste this thing and see if our wordpress it's still not up so we need to give it a moment for this thing to basically set itself up it takes a moment or so for it to connect um what we're going to be doing here is we're going to be connecting this bucket to wordpress and the way we're going to be doing it is through the means of a third-party plugin there's a plug-in called media lite media lite is a again a plugin that's not built by aws it's a it's a plug-in that basically enables your wordpress website to store files outside of the wordpress server itself so um once again let's try this it's still loading but maybe maybe we can connect to the install yeah um just had a question about the um asking if um public access to the bucket can be blocked um oh yes excellent so absolutely so let me actually show this i i i wanted to show that a little bit later on so this is the bucket by default the permissions are all objects are private right so in this case basically no access to the bucket whatsoever um i'm going to be changing this permission for all objects are public and read only depending on your use case you may want to change this but there's a wonderful document that explains all of these permissions to you and one thing i like about lightsail more than its user interface is its documentation so um by default all objects are private you can go and like defining which objects you can have to be public or not or you can go the big old route and have everything public now use this with care this means that everybody will have read access to your objects if they can access them so some buckets just need to have that right for some of them it makes sense for example let's say you have a bucket where you store all of your images you may want to keep it all publicly available if that's what you want but uh sometimes you want to make sure that the individual oblique objects need to be made readable so thanks thank you thank you stuart let's actually save this so i'm going to make this yes i understand that if it warns you be careful with your buckets yes save um and also i'm going to give my instance access to this so what i'm going to be doing here is i'm going to attach an instance so wordpress storage i'm attaching this instance to this bucket in essence it gives this this server it gives this wordpress server the ability to write to this bucket so click attach and in a moment we should be fine okay let's go back to this thing and see if this has actually woken up still unable to connect okay it takes a moment or so for it to spin up let's see if the instance can be connected here's the thing i've been i've i've been i've been okay client client authorized so uh do i need to refresh i don't should be fine um once more connecting to your instance okay okay good we are connected to our instance as you can see here i am connected to this linux server there's this wonderful uh browser-based command line of ssh access which is just great and you're going to be needing this for your wordpress because you need to get your application password now i'm not going to show you the application password i'm going to i'm going to go i'm going to move this here i'm going to open up this thing once again it should okay we have a blog we're going to do wp admin all right all right it's going to be user and the password is going to be something else so cat bitnami application password it's all in the in the instructions in the instructions from uh from from light sale but basically what you need to do you need to connect to the server via ssh or why this wonderful web-based ssh and just get the password there from a file on on the in the home directory log in and this should be fine perfect so i got the file i got the password here okay so what we need to do right now is we need to attach uh a bucket to this well actually we need to install a plugin right so for example if i would go and and create i don't know let's say let's let's go ahead and uh and uh create a post right so if i go to hello world and i uh go on edit and yeah thank you and i wish to add a file here for example if i plus and i want to add an image let's upload an image i think there's a there's a picture of me somewhere in my downloads uh darko here here's here's the bald head do this it's going to upload the image on the server itself now this image is now sitting on the disk of this wordpress website which is fine you know that's a mighty fine image but we don't want to do it that way will you actually want to store images store pictures on s3 because we wanted to be resilient we want them to be accessible through a cdn and all the fun things so i'm going to go back and leave this page and i'm going to go back go to plugins i'm going to add a plugin the plugin i'm going to be adding is called media lite so you're going to be seeing here wp offload media lite installing this plugin enables wordpress to offload media files your images your videos your whatnots into a different storage it can be amazon s3 it can be digital ocean it can be even google cloud for us we're going to be using amazon s3 which is a light sale object storage so on the bottom here go to settings and there's a couple of ways to access this you can define your keys here but we didn't talk about keys we don't need to care about keys this server is running on aws so basically if you remember the time i've i've attached the server to a bucket basically that's giving it a programmatic access to that bucket so i didn't don't need to care about keys i'm gonna select this because my server is on amazon web services click on next and i need to give it give it the bucket so go to storage uh this is my bucket here right copy the name of the bucket paste it here save bucket settings and boom we have access um one thing i'm going to be doing here is gonna i'm gonna force https so we enable https access and save changes that's it now let's go back to lightsail if i go to this bucket and go to objects you can see the bucket is empty there are no files there let's go back to to wordpress and add some files so i'm going to add a new post be creative call it lorem ipsum so download it and let's add an image let's add an image upload it here and there's a nice screen here but there we go i'm uploading this image here right let's call it that's a big crt good save if i go to preview and preview this image here if i open up this image in a new tab one of the things you will see here is that this thing is actually sitting on s3 i'm not sure how much you can see it here but the url of this thing is an s3 url it's not from the server it's on s3 if we go back to light sale and go to object and refresh this bucket object list all of a sudden there's a wp content directory on this one uploads 2021 11 something and boom there are different sizes of this image now this has nothing to do with light sail in a sense light sail did not resize your images lightsable did not sort your images this is all the plug-in thing but amazon light sale object storage allows you easily to enable s3 object storage options for your wordpress instances on amazon light sale just wonderful super simple again i didn't have to worry about any config files i didn't have to go and dig into into wordpress configuration it took me four clicks to launch a wordpress instance it took me i think two clicks to create a bucket and that's it right now when you go and write your wonderful blog posts about crt monitors or whatnot all the files will be available directly in amazon s3 or in this case in light sale object storage all right um let's go back to this thing here right so sorry just before you move on docker another quick question um are you able to share these buckets with other aws accounts um no so these these buckets are only accessible in a programmatic means through this account right there's no way that you can because here's the thing like this bucket is not going to be existing in your database account it's a it's a hidden bucket the only way you could only permissions you can set up on this bucket is is just which um which instance has access to it right so uh if you do permissions you have this one and you can also um you can create access keys technically right you can generate access keys so you can oh you can also do cross account access there you go i was wrong so you can generate access keys uh which basically gives you the ability to create specific sets of credentials and in essence anybody can access this bucket also you can add a specific account to this so they can have access um access to this bucket from a different account so yes thank you all right let me go back to this thing here uh the trifecta so how how does this all fit in you've seen an example of me attaching attaching a light cell object storage to a wordpress instance but how do the other things fit in right your system disk your your block storage will be your os this so that's the thing that kind of came with the instance itself right i can attach multiple disks in this case i didn't do that it was just a single disk when it comes to efs you can have multiple wordpress websites all connected to the same elastic file system where you can store your configuration files your utilities what not you need to do to access them from the from from multiple different wordpress servers let's say you're hosting you you are hosting wordpress websites for other people you may want to have a single shared file system where you access specific utilities files configurations scripts you would use amazon efs for that so if you want to store object storage from that wordpress website your pictures your your videos all of the things that your end users will access things that may want to go over the cloud development uh cloud develo development cloud delivery network uh or cdn you will use light cell object storage which is backed by amazon s3 summarize i don't need to summarize blocks block storage the os this the thing that's connected to your server efs which is your file storage which is the thing you can share between multiple servers and light sale object storage amazon s3 a place to store all your all your files videos and um anything your your end users will use so i have talked to you about today about how you can run a wordpress website on light sale but that's not all right you can host multiple different workloads on light sales you have multiple different storage options for any sort of need on amazon light sales so whether you're hosting a web application a line of business application um windows workload uh dotnet application an active directory server as well all of those things can exist but we added a bunch of other options for you to kind of make your life easier when it comes to attaching multiple disks sharing files between multiple servers and also putting objects such as videos images or whatnot big things on a proper object storage and attaching all of that to your light cell instances with that thank you very much uh i really hope you enjoyed this presentation um i don't have my my social media connections here but uh feel free to reach out to me via linkedin twitter uh myspace i don't know all the things all the things and i would like to thank i would like to thank stuart and the people here for uh giving me the opportunity to talk to all of you uh and yeah any questions feel free to point them my way uh thank you very much doctor it's a great presentation um insightful useful and um i love the demonstration too um it was it's nice to see how kind of easy it was to put together with just uh just a few clicks and um obviously i love the old school props as well it's always good to see the old tech in there what was that was that a 40 meg drive was it 44 megabyte drive uh yeah it's a 44 mega drive and uh an intel pentium pro this is a 100 wow 66 megahertz pentium one from 1995 so yeah today as well and for the for the questions that come in really appreciate that that participation interaction um as a reminder uh to everyone yeah you'll receive the recording via email as soon as it's available um and also don't forget to check out our other webinars which you can find um on our website at cloudacademy.com and and also before we finish as well please be aware that starting tomorrow and running through all the way to reinvent and beyond we have our aws certified solutions architect associate and also our developer associate webinar series so if you are studying for any of these certifications there's please come along and register for these so we can help you get prepared for your certifications um do you have any closing comments darko before we go um get certified and that's my whole thing and not because of the certification actually i i got myself my solution as architect associate not because i need a certificate but but because it made me study so uh i actually learned a lot more things while preparing for the certificate and anything else so um if you are thinking whether you should take the certificate you should do it good point great point so yeah once again thank you very much darko and uh to everyone that joined us today thank you and goodbye
Info
Channel: Cloud Academy
Views: 139
Rating: undefined out of 5
Keywords: #cloudacademy, AWS, Amazon Web Services, Amazon Lightsail Object Storage
Id: sXlbGZosmKU
Channel Id: undefined
Length: 37min 55sec (2275 seconds)
Published: Tue Nov 02 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.