AnycastIpList
Learn how to create, update, and manage AWS CloudFront AnycastIpLists using Alchemy Cloud Control.
The AnycastIpList resource allows you to manage AWS CloudFront Anycast IP lists for your distribution, enabling efficient routing and improved performance.
Minimal Example
Section titled “Minimal Example”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" }});
Advanced Configuration
Section titled “Advanced Configuration”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" }});
Using with Existing Resources
Section titled “Using with Existing Resources”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});
Tagging for Cost Management
Section titled “Tagging for Cost Management”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" }});