|
| 1 | +{ |
| 2 | + "title": "Amazon Cloudfront to AWS Lambda URLs with IAM Auth", |
| 3 | + "description": "Configure Amazon CloudFront to point to a AWS Lambda function via a Lambda URL with IAM authentication", |
| 4 | + "language": "TypeScript", |
| 5 | + "level": "200", |
| 6 | + "framework": "CDK", |
| 7 | + "introBox": { |
| 8 | + "headline": "How it works", |
| 9 | + "text": [ |
| 10 | + "An Amazon CloudFront distribution is created that forwards requests to the domain name of the deployed AWS Lambda function URL. Amazon CloudFront also caches responses from the Lambda function.", |
| 11 | + "The Lambda URL is protected by IAM authentication via CloudFront and Lambda@Edge.", |
| 12 | + "Amazon CloudFront also allows for custom domain names, Lambda@Edge to authenticate with Cognito, as well as AWS Web Application Firewall (WAF) and AWS Shield Advanced to protect your endpoint from attacks" |
| 13 | + ] |
| 14 | + }, |
| 15 | + "gitHub": { |
| 16 | + "template": { |
| 17 | + "repoURL": "https://github.com/aws-samples/serverless-patterns/tree/main/cloudfront-lambda-url-iam-cdk-ts", |
| 18 | + "templateURL": "serverless-patterns/cloudfront-lambda-url-cdk-ts", |
| 19 | + "projectFolder": "cloudfront-lambda-url-iam-cdk-ts", |
| 20 | + "templateFile": "cdk/lib/cdk-stack.ts" |
| 21 | + } |
| 22 | + }, |
| 23 | + "resources": { |
| 24 | + "bullets": [ |
| 25 | + { |
| 26 | + "text": "Using Amazon CloudFront with AWS Lambda as origin to accelerate your web applications", |
| 27 | + "link": "https://aws.amazon.com/blogs/networking-and-content-delivery/using-amazon-cloudfront-with-aws-lambda-as-origin-to-accelerate-your-web-applications/" |
| 28 | + }, |
| 29 | + { |
| 30 | + "text": "Securing Lambda Function URLs using Amazon Cognito, Amazon CloudFront and AWS WAF", |
| 31 | + "link": "https://aws.amazon.com/blogs/compute/securing-lambda-function-urls-using-amazon-cognito-amazon-cloudfront-and-aws-waf/" |
| 32 | + } |
| 33 | + ] |
| 34 | + }, |
| 35 | + "deploy": { |
| 36 | + "text": [ |
| 37 | + "cdk deploy" |
| 38 | + ] |
| 39 | + }, |
| 40 | + "testing": { |
| 41 | + "text": [ |
| 42 | + "See the GitHub repo for detailed testing instructions." |
| 43 | + ] |
| 44 | + }, |
| 45 | + "cleanup": { |
| 46 | + "text": [ |
| 47 | + "Delete the stack: <code>cdk destroy</code>." |
| 48 | + ] |
| 49 | + }, |
| 50 | + "authors": [ |
| 51 | + { |
| 52 | + "name": "Samuel Durand", |
| 53 | + "bio": "Senior AWS and JVM developper at PCG", |
| 54 | + "linkedin": "samuel-durand-8300ba4a" |
| 55 | + } |
| 56 | + ], |
| 57 | + "patternArch": { |
| 58 | + "icon1": { |
| 59 | + "x": 20, |
| 60 | + "y": 50, |
| 61 | + "service": "cloudfront", |
| 62 | + "label": "Amazon CloudFront" |
| 63 | + }, |
| 64 | + "icon2": { |
| 65 | + "x": 50, |
| 66 | + "y": 50, |
| 67 | + "service": "lambda", |
| 68 | + "label": "Lambda@Edge" |
| 69 | + }, |
| 70 | + "icon3": { |
| 71 | + "x": 80, |
| 72 | + "y": 50, |
| 73 | + "service": "lambda", |
| 74 | + "label": "AWS Lambda URLs" |
| 75 | + }, |
| 76 | + "line1": { |
| 77 | + "from": "icon1", |
| 78 | + "to": "icon2" |
| 79 | + }, |
| 80 | + "line2": { |
| 81 | + "from": "icon2", |
| 82 | + "to": "icon3", |
| 83 | + "label": "IAM Authorization" |
| 84 | + } |
| 85 | + } |
| 86 | +} |
0 commit comments