Multi-Factor Authentication (MFA)


Key Management Service (KMS)
What is KMS?
Components of KMS
AWS Web Application Firewall
AWS Shield
Start course
5h 2m

This course looks at the key Security services within AWS relevant to the SysOps Administrator - Associate exam. The core to security is Identity & Access Management, commonly referred to as IAM. This service manages identities and their permissions that are able to access your AWS resources and so understanding how this service works and what you can do with it will help you to maintain a secure AWS environment.  In addition to IAM, this course covers a range of other security services covering encryption and access control

Learning Objectives

  • Learn about identity and access management on AWS including users, groups & roles, IAM policies, MFA, and cross-account access
  • Learn the fundamentals of AWS Web Application Firewall (WAF) including what it is, when to use it, how it works, and why use it
  • Learn how to manage data protection through encryption services such as the Key Management Service (KMS) and CloudHSM
  • Learn how to secure your AWS accounts using AWS Organizations
  • Understand how to configure and monitor AWS WAF, Firewall Manager, and Shield
  • Learn the fundamentals of access control via federation using AWS Cognito and AWS SSO

Hello and welcome to this lecture where I shall be discussing the access control method of MFA, multi-factor authentication. Typically when a user logs into the AWS management console that will authenticate to your AWS account by providing their identification, typically their user name and then verify this identification usually with a password.

These two elements, identification and verification, allow the user to authenticate. For many cases the verification, the password, is sufficient enough to confirm the identity, the user name. However, for users who have a high level of authorization, for example, these users may have full access to a large number of AWS services then you may want to or be required to due to governance controls, implement an additional verification step within the authentication process.

This adds another layer of security attached to the identity and this is where Multi-Factor Authentication comes in, MFA. The name explains itself. It's used to create an additional factor for authentication in addition to your existing methods, such as password, therefore, creating a multi-factor level of authentication.

So what is this additional level of security that MFA brings within AWS? Well MFA uses a random six digit number that is only available for a very short period of time before the number changes again, which is generated by an MFA device. There is no additional charge for this level of authentication, however, you will need your own MFA device, which can be a physical token or a virtual device.

AWS provides a summary of all supported devices found here. Personally I use Google Authenticator on my phone because it is simple and easy to set up and configure. Before a user can authenticate with MFA it must be configured and associated to the user. As we know, as a part of the authentication process we need to ensure that the verification element confirms the identity of the user.

This configuration and association can be done from within the IAM console and I will now show you how quick and easy this is to do via a quick demonstration.

Okay, so I've already logged into my AWS account and the first thing that I need to do is go to IAM, which is under security, identity, and compliance.

So we need to go into IAM to select the user that we want to give Multi-Factor Authentication to. So if we go over to the users and I have a user here, CAuser1, Cloud Academy user one. So if we select that user. If I go across to security credentials we can see down here that the assigned MFA device is no.

So we want to give this user an associated MFA. So if we click on the edit button there. Now I'm going to be using Google Authenticator on my phone as the MFA device, so that's a virtual MFA. So let's select that and click on next step. Now this is a quick splash screen just it's saying that if you do have a virtual MFA you need to install a compatible application on your, either your phone or PC, etc, which I've already done.

Like I've said I'll be using Google Authenticator. So we can just skip past that step. Now as a part of the setup of the MFA with this associated user we can scan that QR code using our Google Authenticator and that will give us two activation codes. The first one which will go in this box here and then after a few seconds it will give us the second code that we enter here.

So this is just to synchronize. So if I go ahead and do that. The first number its given me is 745559 then in just a few seconds that will present me a second number as a part of the synchronization process, and that's 443393. Then we simply click on activate virtual MFA. So that's given us a message saying that the MFA device was successful associated.

So if we finish that and try to login as this user. So the user name was CAuser1. I'll put in the first authentication method, which is the user name and password, and you'll see here that the MFA users need to enter their code on the next screen. So by clicking sign in it should present us with another authentication screen, and here we are, so here we need to enter our MFA code.

If I go back into my Google Authenticator and take a look at the number issued by the user 061695 and click on submit and there we go, we're authenticated into the AWS management console where I can then access any resources that I have permissions to.

There are also times when you can use MFA to increase security when making API calls to other resources.

For example, if you were creating a cross account role between AWS accounts then you have the option during the creation of the trust to enforce MFA authentication to assume the role.

That brings us to the end of this very short lecture. Coming up next I'm going to discuss identity federation.

About the Author
Learning Paths

Stuart has been working within the IT industry for two decades covering a huge range of topic areas and technologies, from data center and network infrastructure design, to cloud architecture and implementation.

To date, Stuart has created 150+ courses relating to Cloud reaching over 180,000 students, mostly within the AWS category and with a heavy focus on security and compliance.

Stuart is a member of the AWS Community Builders Program for his contributions towards AWS.

He is AWS certified and accredited in addition to being a published author covering topics across the AWS landscape.

In January 2016 Stuart was awarded ‘Expert of the Year Award 2015’ from Experts Exchange for his knowledge share within cloud services to the community.

Stuart enjoys writing about cloud technologies and you will find many of his articles within our blog pages.