Cert EspressoLearn. Practise. Find your flow.

A LITTLE FOCUS.
A BIG NEXT STEP.

Your pace. Your space.
AWS · SCS-C03

Network edge protection

SCS-C03 · Lesson 8 of 22 · 1:11:00

YouTube loads only after you press play. This chapter opens at its timestamp in the full course. Watch on YouTube ↗

Learning with these videos? Subscribe for new courses and exam-style questions.

In this lesson

Prepare for the SCS-C03 exam (AWS Certified Security – Specialty). In this lesson: locking down the origin with origin access control and a secret custom header, response headers policies and field-level encryption, AWS WAF managed rule groups for the OWASP Top 10 tested with the Count action, Shield Advanced for critical resources, S3 CORS limited to exact origins, and AWS IoT policies with policy variables. Includes three original practice questions.

Study notes

The text of this lesson, to read at your own pace. Information as of November 2026.

Three entry points

AnyCompany Health exposes three kinds of entry points: a website of medical documents behind CloudFront, an API for the patient app, and thousands of connected blood pressure monitors in the homes of patients. Each one needs its own protection at the edge. This lesson covers CloudFront and its headers, AWS WAF against the OWASP Top 10, S3 CORS, AWS IoT policies, and Shield Advanced.

Locking down the origin

Attackers who reach the origin directly skip every edge control, so lock the origin down. For an S3 origin, use origin access control, which signs the requests of CloudFront and supports buckets encrypted with KMS keys, unlike the older origin access identity. The bucket policy then allows only the CloudFront service, with a condition on the ARN of the distribution, and the bucket stays private. For a custom origin, such as a load balancer, CloudFront can add a secret custom header to its requests, and the origin rejects the requests that do not carry it.

Headers and sensitive fields

CloudFront can also add security headers to every response, with a response headers policy. Strict-Transport-Security tells browsers to use only HTTPS, Content-Security-Policy limits where scripts can load from, and X-Frame-Options stops other sites from framing your pages. Field-level encryption encrypts specific form fields, such as an insurance number, with a public key at the edge, so that only the application that holds the private key can decrypt them. And geographic restrictions, signed URLs, and signed cookies limit who can get the content.

AWS WAF and Shield Advanced

Attach an AWS WAF web ACL to the CloudFront distribution, the API, or the load balancer. Against the OWASP Top 10, such as injection, broken access control, and cross-site scripting, use the core rule set, the SQL database and known bad inputs rule groups, and fix the code too, because no firewall fixes broken access control. The Count action lets you test a new rule on real traffic before it blocks anything. For critical resources, Shield Advanced adds automatic mitigation at the application layer, through rules that it creates in your web ACL, with help from the Shield Response Team.

Cross-origin requests

Browsers stop a web page from calling another domain, unless that domain allows it with CORS, which stands for cross-origin resource sharing. On an S3 bucket, the CORS configuration lists the allowed origins, methods, and headers. Before some requests, the browser sends a preflight request, and S3 answers only if the origin and the method match a rule. Keep the list short, with the exact domain of the patient portal rather than every origin, and remember that CORS only guides browsers: the bucket policy still decides who can get the objects.

AWS IoT policies

Each connected monitor authenticates to AWS IoT Core with its own X.509 certificate. An AWS IoT policy, attached to the certificate, a Cognito identity, or a thing group, lists what the device can do: connect, publish, subscribe, and receive messages on given topics. Write it for least privilege: with policy variables, one policy limits each device to its own client ID and its own topics, so that a stolen device cannot reach the data of other patients. And when a device is lost, deactivate or revoke its certificate.

Recap

Let's recap. Lock the origin: origin access control for S3, and a secret custom header for other origins. Response headers policies add security headers, and field-level encryption protects sensitive fields. AWS WAF covers the OWASP Top 10 with managed rule groups, tested with the Count action, and Shield Advanced protects critical resources. S3 CORS allows only the exact origins that need it. And AWS IoT policies, with policy variables, limit each device to its own topics.

Quick checks for this lesson

The 3 questions of this lesson, as plain text. The button above runs them with shuffled choices and the reason behind every choice.

  1. A bucket of medical documents is the origin of a CloudFront distribution, and its objects are encrypted with a KMS key. Users must not download objects with direct S3 links. What should the security engineer configure?

    • A public bucket with a CloudFront geo restriction
    • An origin access identity on the distribution
    • Origin access control and a bucket policy
    • A CORS rule for the CloudFront domain
    Show the answer

    Origin access control and a bucket policy

    Origin access control signs the requests of CloudFront, supports objects encrypted with KMS keys, and the bucket policy allows only that distribution. “A public bucket with a CloudFront geo restriction” would leave every object open to anyone with a direct link. “An origin access identity on the distribution” is the older method, which does not support KMS encryption without extra workarounds. And “A CORS rule for the CloudFront domain” would only tell browsers which sites may call the bucket, without restricting access.

  2. A new AWS WAF rule against SQL injection could block valid requests from the clinician portal. The team wants to see what the rule would match, on real traffic, before it blocks anything. What should they do?

    • Set the rule to Count and review the logs
    • Turn on Shield Advanced for the portal
    • Add a geo match rule for the home country
    • Deploy the rule with the Block action at once
    Show the answer

    Set the rule to Count and review the logs

    With the Count action, AWS WAF counts and logs the matching requests without blocking them, so the team can tune the rule before it switches to Block. “Turn on Shield Advanced for the portal” would protect against DDoS attacks, without testing the rule. “Add a geo match rule for the home country” would filter countries, which is not the need. And “Deploy the rule with the Block action at once” would risk blocking real clinicians from the very first request.

  3. Every blood pressure monitor uses the same AWS IoT policy, which allows it to publish on any topic. Each device must publish only on its own topic, without one policy per device. What should the engineer change?

    • Give each device its own IAM user
    • Put the devices in a Cognito user pool
    • Add a CORS rule to the IoT endpoint
    • Use the thing name variable in the policy
    Show the answer

    Use the thing name variable in the policy

    A policy variable, such as the thing name, lets one policy limit each device to the topic that carries its own name. “Give each device its own IAM user” would create long-term keys for thousands of devices, which is hard to manage. “Put the devices in a Cognito user pool” is for the users of an app, not for device certificates. And “Add a CORS rule to the IoT endpoint” is for browsers, not for devices.