Build Your Own Business Website header image

Create Your First Bucket

Difficulty Level -

Filed Under Topics -

Listed Under Lesson Subjects -

Applies to -

Whoops, you've found some premium content!

Watch the opening clip of this video to preview it,
the full video is available to paid members.

You’ve seen how the Amazon S3 file system is configured so now we’re going to work on John’s new account. Let’s go over to Amazon S3 and you can see there’s absolutely nothing. You’re starting from scratch and the first thing you do is create a bucket and then create a bucket name.

Bucket Naming Conventions

Bucket names are important. I’m going to summarize those naming rules for you and the set of rules you should know.

Bucket Names Must be Unique

The first is that a bucket name has to be unique and that means it has to be unique worldwide. So you just can’t create a bucket name that is free videos because somebody else has undoubtedly already created a bucket name, ‘free videos’.

It’s probably best for you to preface your bucket names with, for example, your main URL or your main domain name because that’s the way in which it can be unique.

Number of Characters in a Bucket Name

Your bucket name must be between 3 characters long and 63 characters long so that’s the maximum length and the minimum length of a bucket name.

Types of Letters and Symbols Allowed in the Name

The bucket name can only include lowercase letters, numbers, dashes, and periods. No uppercase letters, no special characters, only lowercase letters, numbers, dashes, and periods. Now, in addition to that, it cannot begin with either a period or a dash. It cannot end with either a period or a dash and it cannot contain two periods side by side.

For example, if we did Hypnotherapy Partners, that is not a valid bucket name. It’s got uppercase and it’s got spaces. Valid bucket names cannot have that. What we’re going to do is create hypnotherapy partners as the beginning or as the preface to it and then we’re going to put a dot and then we’re going to have a… let’s see, I’m going to say ‘free’ because what we’re doing with this bucket is we are distributing free products.

You could just use your one bucket. You don’t actually have to use a whole bunch of different buckets. You can use one bucket and have lots of folders if you want. But I think it makes sense to store things in a rational way. Since it’s is the name of their URL, I’d use hynotherapypartners as the preface and then dot and then free as the full bucket name.

Choose a Region for Storing the Files

Another thing you can do is choose the region. Because this is going to be stored in that region, this makes it a shorter distance for files to be delivered. And they are in the UK and so they should choose Ireland rather than US Standard or Oregon or Singapore or Tokyo. Obviously, Ireland is closest to the UK so this would make the shortest distance between their primary user and the files themselves.

So you choose a bucket name and you choose a region. We’re not going to set up logging because logging is not important in this context so we’re just going to go ahead and hit ‘create’.

Create a Bucket for Backups

Now, while we’re at it, we’re going to create another bucket and it’s going to be hynotherapy partners and it’s going to be backup. So when John configures his backups to be saved here, he’ll be able to store them separately from the rest of the files he has. Again, we’re going to pick Ireland and we’re going to create.

So John asked, “What if people download it from the US?” Well, it just means that the source of the file is in Ireland rather than in the US. It’s a value judgement that you make. You could actually store the content in more than one place but every place you store it, you pay for it. So it makes sense for you to choose the place that is the closest to your location or closes to the location of your customers and then let that be the case.

It’ll certainly be accessible to people anywhere and we’re going to be downloading files here today and I’m in the US. It’s just… it’s closer to people in the UK and since most of your client base is in the UK, most of them are going to download them from there.

Create Folders

Okay so we’ve created our buckets. Now what we’re going to do is create a folder and we’re not going to do it for the backup. I’m going to create to a folder here in our bucket and we’re going to create one for videos and we’ll create another folder for audios. Then we’ll create another folder for PDFs.

Folder Naming Conventions

This also follows my naming conventions. These should all be lowercase. They should be letters and numbers. They should contain no spaces. They should have dashes, although, they should not have any periods in them. Just imagine this as a URL and you know that the only place URLs have periods is in the beginning of the domain, not in the subsequent folders.

So you don’t want any of them there and you don’t want any spaces and that kind of stuff, in spite of the fact that most of mine work okay when my staff has done this incorrectly. Clearly, it never occurred to me to teach my staff how to do this.

Add Files

We’ve created those things now. Now let’s add some files. So we’re going to start off with a PDF and in my actions, I’m going to upload. Oh, add files. And then Hypnotherapy Partners and we’re doing the PDFs.

Notice how this PDF has spaces in it and everything else like that? So before we do this, we’re going to rename this… 10 Tips for Creating More Ease in Your Life. Okay and then we’re going to upload that, start the upload. It’s doing that upload. Actually, it’s done doing that upload and now you can see that that file is there.

Let’s come back over to the audios and we’re going to do the same thing again. We’re going to upload so we’ll add a file. Then we’ll come over here to the MP3 and again, we’re going to get rid of all the spaces. This is something that new folks often misunderstand or forget about and it does cause lots of problems.

We’re going to open that up now and we’re going to start the upload. Now this one’s quite a bit bigger than the PDF so it’s going to take a little bit more time. But while that’s happening here, we’re going to come on over to videos and we’re going to upload to our video. Get rid of all the spaces in the name. See, you can’t change the name of this file once it’s uploaded. So we want to change those file names now and this is the video… open and start the upload.

The larger the file is, the longer it’s going to take and also, since I’m here in the US uploading to Ireland, that’s also going to increase the time it takes to upload this. So there’s some time associated with making this work, obviously.

Okay so now that that upload process is beginning, now we can start talking about permissions in Amazon S3.

0 Comments… add one
0 comments… add one

Leave a Comment