Skip to content

UpdateResolverRule

Source: src/AWS/Route53Resolver/UpdateResolverRule.ts

Runtime binding for route53resolver:UpdateResolverRule — update the bound ResolverRule’s mutable configuration (name, target IPs, outbound endpoint); the rule ID is injected automatically.

The canonical runtime use: DNS failover automation — a Lambda health-checks the on-premises resolvers a FORWARD rule targets and swaps TargetIps to the healthy set when one goes dark.

Provide Route53Resolver.UpdateResolverRuleHttp on the hosting Lambda Function to satisfy the requirement.

// init — grants route53resolver:UpdateResolverRule on the rule
const updateRule = yield* AWS.Route53Resolver.UpdateResolverRule(rule);
// runtime
yield* updateRule({
Config: { TargetIps: [{ Ip: "192.168.2.10", Port: 53 }] },
});