We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
PrefixList.fromLookup()
1 parent 5e053e2 commit 3d07a79Copy full SHA for 3d07a79
packages/aws-cdk-lib/aws-cloudfront-origins/README.md
@@ -678,8 +678,10 @@ You can allow the traffic from the CloudFront managed prefix list named **com.am
678
``` ts
679
declare const alb: elbv2.ApplicationLoadBalancer;
680
681
-const peer = ec2.Peer.prefixList('pl-xxxxxxxx'); // See the management console to find actual PrefixList Id.
682
-alb.connections.allowFrom(peer, ec2.Port.HTTP);
+const cfOriginFacing = ec2.PrefixList.fromLookup(this, 'CloudFrontOriginFacing', {
+ prefixListName: 'com.amazonaws.global.cloudfront.origin-facing',
683
+});
684
+alb.connections.allowFrom(cfOriginFacing, ec2.Port.HTTP);
685
```
686
687
#### The VPC origin service security group
0 commit comments