WAF and CloudFront
Start course
1h 17m

Please note that this course has been removed from our library and replaced with the following courses:


Explore the 3 AWS services, designed to help protect your web applications from external malicious activity, with this course. Once getting started, this course will delve into depth on all three services, comprised of AWS Web Application Firewall Service (WAF), AWS Firewall Manager and AWS Shield. By learning how all three services can be used together for enhanced protection of web applications you enterprise will wholly benefit from all the advantages that these services have to offer.

Study the core principles, understand the importance and discuss how protecting web apps with AWS can elevate your business to the next level with this cohesive course made up of 14 lectures, including demos.

Learning Objectives

  • Gain a core foundation of what AWS WAF is and what it does
  • Knowledge of how to configure and implement a WAF solution
  • Analyze how AWS WAF works closely with AWS CloudFront
  • An understanding of how AWS Firewall Manager can be used to help you control AWS WAF across multiple accounts
  • How AWS Shield is protecting Distributed Denial of Service attacks
  • An awareness of different types of DDoS attacks
  • An awareness of the step involved in configuring AWS Shield Advanced

Intended Audience

  • Security architects
  • Technical engineers
  • Website administrators
  • Anyone requiring a deeper understanding of WAF, Shield, and Firewall Manager


Cloud Academy would recommend having a basic understanding of the following, before starting this course:

  • Amazon CloudFront Distributions
  • AWS Application Load Balancer
  • AWS Organizations
  • The 7 layers of the OSI model

Related Training Content

If you are interested in further training content related to this topic, discover the following learning paths:



Hello and welcome to this lecture on how AWS WAF and AWS CloudFront can work together. As a prerequisite of this lecture, you should have a basic understanding of AWS CloudFront. More information on CloudFront can be found here from our existing course. AWS WAF relies heavily on AWS CloudFront distributions. However, it's worth mentioning that this service dependency relationship is only one way, meaning that AWS CloudFront can operate and exist without AWS WAF being configured. AWS WAF also supports custom origins, allowing you to apply the same level of security to web infrastructure managed outside of AWS. As we saw in the demonstration earlier, the final step of configuring the service is to associate your Web ACL to an AWS CloudFront distribution. When this association between the two services takes place, it can take approximately 15 minutes for the Web ACL and associated rules to be propagated to all relevant Edge locations linked with your CloudFront distribution. This propagation is automatically instigated by CloudFront. 

By propagating this configuration out to the Edge locations, it helps to ensure performance is maintained and latency kept low by not having to perform these WAF checks at another location in an availability zone somewhere else across the world. When a request is blocked by WAF, CloudFront is notified that the request was forbidden and CloudFront will return a 403 error to their browser. This is a standard error code when access to a HTTP resource is forbidden. Now this error doesn't really provide much information to the end user, and offers no reason as to why the error was generated. All in all, it can be a bit frustrating for the end user. And so you can create your own custom 403 errors, and it's far is more professional, and you can guide the user to other useful links and provide a polite reason as to why they may have experienced the error. 

This creates a better user experience despite the user not being able to access the resource they were after. The next time a user is blocked by WAF, CloudFront would then display the custom error code instead. For more information on this customization, please see the following link. Before working on your Web ACLs, look at the CloudFront distribution that you intend on associating the Web ACL to. The reason being is that when you are creating your CloudFront distributions, you can select what HTTP methods that AWS CloudFront will respond to, and which ones it will not. Therefore, it would be inefficient to configure conditions that blocked against HTTP methods that would be dropped by CloudFront anyway. Instead, use a combination of the two, CloudFront configuration and WAF Web ACLs to process incoming requests effectively. When creating your CloudFront distributions, you have an option during step two, Create Distribution, to select an existing AWS WAF Web ACL so you don't have to associate your Web ACLs through AWS WAF. You can also change your Web ACL from within the AWS CloudFront console as well by selecting your distribution and clicking on Edit under the General tab. From there, you can then select a different AWS WAF Web ACL. That brings me to the end of this lecture. Coming up next, I'll be talking about the pricing options for this service.

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.