DEV Community

ChungWei Wei
ChungWei Wei

Posted on • Originally published at kmp.tw on

[AWS] How To Add Basic Auth With Amazon CloudFront

Situation

Want Set Basic Auth With AWS CloudFront

How To

Architecture

Image 000

Conponent

  • Amazon S3
  • AWS CloudFront
  • AWS CloudFront Function

Part Of CloudFront Function

Create New CloudFront Function

Image 001

Enter Function Name , And Choice js-1.0 Runtime

Image 002

Enter The Code

Image 003

Part Of CloudFront

Create New Behavior

Image 004

On Function Associations, Choice Viewer request Setting CloudFront Functions And Select Function Name

Image description

Verify

Image description

Top comments (0)