ConnectionGroup
Learn how to create, update, and manage AWS CloudFront ConnectionGroups using Alchemy Cloud Control.
The ConnectionGroup resource allows you to manage AWS CloudFront ConnectionGroups for enhanced routing control across multiple origins and improved network performance.
Minimal Example
Section titled “Minimal Example”Create a basic ConnectionGroup with essential properties:
import AWS from "alchemy/aws/control";
const basicConnectionGroup = await AWS.CloudFront.ConnectionGroup("basic-connection-group", { name: "BasicConnectionGroup", enabled: true, ipv6Enabled: true});
Advanced Configuration
Section titled “Advanced Configuration”Configure a ConnectionGroup with additional settings, including tags and an Anycast IP List ID:
const advancedConnectionGroup = await AWS.CloudFront.ConnectionGroup("advanced-connection-group", { name: "AdvancedConnectionGroup", enabled: true, ipv6Enabled: true, anycastIpListId: "example-ip-list-id", tags: [ { Key: "Environment", Value: "Production" }, { Key: "Team", Value: "CloudOps" } ]});
Adoption of Existing Resource
Section titled “Adoption of Existing Resource”Create a ConnectionGroup that adopts an existing resource instead of failing:
const existingConnectionGroup = await AWS.CloudFront.ConnectionGroup("existing-connection-group", { name: "ExistingConnectionGroup", adopt: true, enabled: true});
Enable ConnectionGroup with Specific Tags
Section titled “Enable ConnectionGroup with Specific Tags”Set up a ConnectionGroup with specific tags for better resource management:
const taggedConnectionGroup = await AWS.CloudFront.ConnectionGroup("tagged-connection-group", { name: "TaggedConnectionGroup", enabled: true, tags: [ { Key: "Project", Value: "Migration" }, { Key: "Owner", Value: "DevTeam" } ]});