Restricting access to CloudFront by IP

后端 未结 2 1141
情话喂你
情话喂你 2020-12-30 22:11

I want to restrict bucket access to certain IPs. I know how to create a bucket policy from Restricting Access to Specific IP Addresses.

My question: Can this work wi

2条回答
  •  隐瞒了意图╮
    2020-12-30 22:35

    I have created the custom rule to whitelist IPs and restrict the application with CloudFront distribution with following steps.

    Steps:

    1. Go to AWS WAF.
    2. Create following IP match conditions under IP Addresses.

      1. staging-appname-whitelist-ips
    3. Create following rules under Rules.

      1. staging-appname-ui-stack-whitelisted-ips
        • with condition (similar for production one)
    4. Finally create following Web ACLs:
      1. staging-appname-acl
        • Please select the correct CloudFront Distribution, above created Rule and IP Address group. *.

    AWS Resource here.

    Hope it helps!

提交回复
热议问题