Lambda URL CloudFront GeoRestriction

You can configure CloudFront with GeoRestriction based on GeoLocation.


Jets.deploy.configure do
  config.lambda.url.cloudfront.enable = true
  config.lambda.url.cloudfront.cert.arn = acm_cert_arn(domain: "", region: "us-east-1")

  config.lambda.url.cloudfront.restrictions = {
    GeoRestriction: {
      RestrictionType: "whitelist",
      Locations: ["US", "FR"]

From the AWS Docs:

CloudFront and MaxMind both use ISO 3166 country codes. For the current list of countries and the corresponding codes, see ISO 3166-1-alpha-2 code on the International Organization for Standardization website.