‫So let me show you how to create access keys.
‫So I'm gonna CLIck on my username, Stephane,
‫and I'm gonna go under Security credentials.
‫I will scroll down and I will create an access key.
‫As you can see, there are some selection you need to do
‫and based on the selection I'm doing, for example,
‫I want access key for the CLI,
‫AWS is going to have an alternative recommended.
‫For example, for the CLI, it's better to use CloudShell,
‫which I will show you in the next lecture.
‫So don't worry about it.
‫Or to use the CLI V2 and an authentication
‫through the IAM Identity Center, which I will not show you
‫because it's a bit more complicated.
‫So based on what you wanna do,
‫if it's local code, application running outside
‫of AWS or in AWS and so on,
‫you will have some recommendation in the bottom.
‫For now, we're going to use the CLI
‫and we'll use these access keys
‫and we'll click here to say
‫I understand the above recommendation
‫and I still want to create an access key
‫because it is important for you to understand how they are,
‫how they work, what they are, and so on.
‫So let's create this access key
‫and now this is the only time you'll be able to have access
‫to the access key and the secret access key.
‫So I will go back now to a previous version
‫of that lecture where you see the old UI, but don't worry,
‫nothing changes from that point on.
‫The first thing I have to do is to configure my AWS CLI.
‫So I'm going to type aws configure,
‫and then I am greeted with entering my access key ID.
‫Very nice. I can just enter this one and press Enter.
‫And then I'm greeted with entering my secret access key,
‫which I will enter right here as well.
‫The default region name.
‫So this is a region that is close to you.
‫I will choose eu-west-1
‫because I will be doing all my tutorials in eu-west-1
‫but you will choose your own region
‫and you can enter your own region name.
‫The region name, by the way,
‫you can get directly from this dropdown right here.
‫It shows you the name of the region,
‫as well as the region code.
‫So for me, I'm going to use my eu-west-1.
‫I'll press Enter and then the default output format.
‫I'll just press Enter as well.
‫So now my AWS CLI is configured
‫and so we can have a look at how it works.
‫We can do aws iam list-users and press Enter.
‫And this will list all the users in my accounts.
‫And as we can see,
‫the user I have right now is called Stephane.
‫Here is the user ID, here is the ARN, when it was created
‫and when the password was last used,
‫which is very similar to what I would get
‫if I were to go into this UI right here.
‫So the management console and the CLI do provide
‫similar kind of information.
‫Next, I want to show you what happens
‫if we remove permissions from our users.
‫So I'm gonna go to admins
‫and I'm going to remove the Stephane user
‫from the group admin.
‫And so again, if I go back to my user Stephane,
‫it doesn't have any permissions.
‫And I did this obviously
‫with my root accounts, not the other accounts.
‫So now if I go into my UI and obviously refresh this page,
‫I'm going to get an error saying that yes,
‫I do not have the permissions to do this
‫but let's try to do the same thing with the CLI.
‫So we're going to do an iam list-users call
‫and we get no response because actually it was being denied.
‫So the CLI permissions are obviously going
‫to be the exact same
‫as the permissions you get from the IAM console.
‫So the takeaway from this lecture
‫is that you can access AWS using the management console
‫or using access key and secret access key
‫that you can configure and then use into the CLI.
‫So hope you liked it and I will see you in the next lecture.
‫And obviously, do not forget to add your user back
‫into the group,
‫otherwise that would be horrible.
‫So I'm gonna go into groups, admins
‫and I'm going to add my Stephane user back into my group.
‫And now I am an administrator again.
‫So that's it. I will see you in the next lecture.