Skip to content
GitHubXDiscord

AnycastIpList

The AnycastIpList resource allows you to manage AWS CloudFront Anycast IP lists for your distribution, enabling efficient routing and improved performance.

Create a basic Anycast IP list with required properties and one optional property.

import AWS from "alchemy/aws/control";
const anycastIpList = await AWS.CloudFront.AnycastIpList("myAnycastIpList", {
IpCount: 2,
Name: "MyAnycastIPList",
Tags: {
Environment: "Production",
Team: "Networking"
}
});

Configure an Anycast IP list with the option to adopt an existing resource if it already exists.

const advancedAnycastIpList = await AWS.CloudFront.AnycastIpList("advancedAnycastIpList", {
IpCount: 5,
Name: "AdvancedAnycastIPList",
adopt: true,
Tags: {
Environment: "Staging",
Project: "CDN Optimization"
}
});

Demonstrate how to create an Anycast IP list that can be adopted if it already exists.

const existingAnycastIpList = await AWS.CloudFront.AnycastIpList("existingAnycastIpList", {
IpCount: 3,
Name: "ExistingAnycastIPList",
adopt: true
});

Create an Anycast IP list with specific tags for tracking costs associated with different environments.

const taggedAnycastIpList = await AWS.CloudFront.AnycastIpList("taggedAnycastIpList", {
IpCount: 4,
Name: "TaggedAnycastIPList",
Tags: {
Environment: "Development",
CostCenter: "DevOps"
}
});