AWS.Route53Profiles reference
ListProfileAssociations
Section titled “ListProfileAssociations”Source:
src/AWS/Route53Profiles/ListProfileAssociations.ts
Runtime binding for route53profiles:ListProfileAssociations — enumerate
the VPC associations of the bound Profile (each item carries the
association id, VPC ResourceId, and its Status), so an ops function
can audit which VPCs a shared DNS configuration currently applies to or
wait for an association to reach COMPLETE. The profile’s id is injected
automatically.
Provide AWS.Route53Profiles.ListProfileAssociationsHttp on the hosting
Lambda Function to satisfy the requirement.
ListProfileAssociations: Listing VPC Associations
Section titled “ListProfileAssociations: Listing VPC Associations”// init — grants route53profiles:ListProfileAssociationsconst listProfileAssociations = yield* AWS.Route53Profiles.ListProfileAssociations(profile);
// runtimeconst { ProfileAssociations = [] } = yield* listProfileAssociations();for (const association of ProfileAssociations) { yield* Effect.log(`${association.ResourceId}: ${association.Status}`);}ListProfileResourceAssociations
Section titled “ListProfileResourceAssociations”Source:
src/AWS/Route53Profiles/ListProfileResourceAssociations.ts
Runtime binding for route53profiles:ListProfileResourceAssociations —
enumerate the DNS resources attached to the bound Profile
(private hosted zones, Resolver rules, DNS Firewall rule groups; each item
carries the resource’s ARN, type, properties, and Status), so an ops
function can audit what DNS configuration a shared profile bundles. The
profile’s id is injected automatically.
Provide AWS.Route53Profiles.ListProfileResourceAssociationsHttp on the
hosting Lambda Function to satisfy the requirement.
ListProfileResourceAssociations: Listing Attached DNS Resources
Section titled “ListProfileResourceAssociations: Listing Attached DNS Resources”// init — grants route53profiles:ListProfileResourceAssociationsconst listProfileResourceAssociations = yield* AWS.Route53Profiles.ListProfileResourceAssociations(profile);
// runtimeconst { ProfileResourceAssociations = [] } = yield* listProfileResourceAssociations();for (const association of ProfileResourceAssociations) { yield* Effect.log(`${association.ResourceType}: ${association.ResourceArn}`);}Profile
Section titled “Profile”Source:
src/AWS/Route53Profiles/Profile.ts
An Amazon Route 53 Profile — a reusable container of DNS configuration (private hosted zones, Resolver rules, and DNS Firewall rule groups) that can be associated with many VPCs at once.
Attach DNS resources to the Profile with ProfileResourceAssociation and
apply the whole bundle to a VPC with ProfileAssociation.
Profile: Creating Profiles
Section titled “Profile: Creating Profiles”Basic Profile
import * as Route53Profiles from "alchemy/AWS/Route53Profiles";
const profile = yield* Route53Profiles.Profile("DnsProfile");Profile with Tags
const profile = yield* Route53Profiles.Profile("DnsProfile", { name: "shared-dns-config", tags: { team: "platform" },});Profile: Applying a Profile to VPCs
Section titled “Profile: Applying a Profile to VPCs”const vpc = yield* EC2.Vpc("AppVpc", { cidrBlock: "10.0.0.0/16" });
yield* Route53Profiles.ProfileAssociation("AppVpcDns", { profileId: profile.profileId, resourceId: vpc.vpcId,});ProfileAssociation
Section titled “ProfileAssociation”Source:
src/AWS/Route53Profiles/ProfileAssociation.ts
An association between a Route 53 Profile and a VPC. Once the association completes, every DNS resource attached to the Profile (private hosted zones, Resolver rules, DNS Firewall rule groups) takes effect in the VPC.
A VPC can have only one Profile associated with it; a Profile can be
associated with thousands of VPCs. The association is created immediately
but completes asynchronously — the returned status is typically still
CREATING when the deploy finishes.
ProfileAssociation: Associating a Profile
Section titled “ProfileAssociation: Associating a Profile”import * as Route53Profiles from "alchemy/AWS/Route53Profiles";
const association = yield* Route53Profiles.ProfileAssociation("AppVpcDns", { profileId: profile.profileId, resourceId: vpc.vpcId,});ProfileResourceAssociation
Section titled “ProfileResourceAssociation”Source:
src/AWS/Route53Profiles/ProfileResourceAssociation.ts
An attachment of a DNS resource to a Route 53 Profile. Attach private hosted zones, Resolver rules, or DNS Firewall rule groups; every VPC the Profile is associated with picks up the resource.
ProfileResourceAssociation: Attaching Resources
Section titled “ProfileResourceAssociation: Attaching Resources”Attach a DNS Firewall Rule Group
import * as Route53Profiles from "alchemy/AWS/Route53Profiles";
const attachment = yield* Route53Profiles.ProfileResourceAssociation( "FirewallRules", { profileId: profile.profileId, resourceArn: ruleGroupArn, resourceProperties: JSON.stringify({ priority: 102 }), },);Attach a Resolver Rule
const attachment = yield* Route53Profiles.ProfileResourceAssociation( "CorpForwarding", { profileId: profile.profileId, resourceArn: rule.resolverRuleArn, },);