Okay so I'm just going to jump into the s3 console now and just give you a quick 2
overview of what we mean by an access control list, what we mean by a bucket 3
policy and how to create one. So I've just got a number of buckets here that I use for 4
for demonstration. So I've just got here I'll just select one of these buckets 5
here and have a look at it. So we can see here we've got a number of objects here 6
in the bucket that I've already uploaded. So I'm just going to look at the 7
properties for this bucket. So here we go. If I look under permissions and I can 8
see I've already got an access control list already created for me by Amazon 9
Web Services, by the s3 service, already created that for me, I didn't have to do 10
anything. So I can add another access control list to that. So I can click on 11
here add more permissions and that in there. I can put more on there if I need 12
to so I can grantee you know everyone access to it or to to view it for 13
example. Now we can also add a bucket policy to this bucket. So bucket policies 14
they apply at the bucket level, they're not applied at the object level, so apply 15
across an entire bucket so if we want to make this entire bucket to have read 16
access to the entire public, that's what we can do or, we can do a whole range of 17
things, quite fine-grained control that we have with a bucket policies. 18
I'll just click on that which then opens up the bucket policy editor so we can 19
put our bucket policy in here which is basically JSON code that we put in 20
there or if we don't understand how to do that we can use the AWS policy 21
generator or we can cut and paste some of the sample bucket policies that are 22
available. So first off looking at the sample bucket policies we can see we've 23
got quite a number there that we can use, all you do is just basically copy those 24
and just change your bucket name, or whatever you need to change, to make that 25
work for you. So I'm going to use the AWS policy generator so that's quite a good 26
service because what it does is it really speeds up the process and really 27
takes away any errors that you're going to have in 28
manually writing up a JSON file for a backup policy. So first thing we do is we 29
select the type of policy which is an s3 bucket policy, the effect is allow or 30
denied. So we're going to just create full public access 31
to make life easier. So the principle, now that's going to be the user or account 32
or whatever that we're going to apply this bucket policy to, so we're just 33
going to apply it to everyone, so the entire public so that'll be a wild-card 34
symbol to do that. Now the action, so we need to select an action and again to 35
make so there are a number of action we can select so it's a very fine-grain 36
control that you wouldn't get with an access control list, so that's what we 37
mean by fine-grained control here, so we're just going to select all actions 38
just to make life easier. Which is probably something that you wouldn't 39
normally do but for the purposes of an example we'll do that. So the ARN, the 40
Amazon Resource Name for an s3 bucket follows the following format which we can 41
see down here. So I'm just going to cut and or copy and paste that across 42
Okay so we've just got our a our ARN there set up in the format that it's 43
supposed to be and we can now, we're not going to add any further conditions so 44
that's an optional step and we can now add that statement to our to our bucket 45
policy. So there we can see the principle is everyone, the action is all actions on 46
s3 and the resource there is our lab.backspace.academy bucket. So we can now 47
generate that policy and so there's our generated policy, so we can now copy and 48
paste that over to our bucket policy editor. Okay so there's our bucket policy 49
that has been created put in our bucket policy editor. We now click on save and 50
that will be uploaded. Okay so there's our bucket policy has been 51
created there. So we just look at the edit bucket policy and you can see it's 52
there and I'll just delete that now. So another thing I want to have a look at 53
now is just to show the differences between the properties of a bucket and 54
an object. So just going to click on a object now and if we go into permissions 55
there we can see that again we've got our access control lists but we don't 56
have the option there to put a bucket policy on. So there's our difference so a 57
bucket policy is applied at the bucket only whereas an access control list will 58
be applied at both the bucket level or at the object level. So that brings us to 59
the end of the core knowledge that you require for Amazon s3 and hopefully 60
we've got to that very quickly and got to it as painless as possible and I 61
look forward to you in the next videos