Skip to content

GetVpcEndpointServiceName

Source: src/AWS/DSQL/GetVpcEndpointServiceName.ts

Retrieves the VPC endpoint service name of an Aurora DSQL cluster — the com.amazonaws.{region}.dsql-{suffix} PrivateLink service name used to create a VPC interface endpoint that reaches the cluster privately.

Bind a Cluster inside a function runtime to look the name up on demand (e.g. from an operations function that provisions VPC endpoints). Provide DSQL.GetVpcEndpointServiceNameHttp on the Function effect to implement the binding.

// init
const getVpcEndpointServiceName =
yield* DSQL.GetVpcEndpointServiceName(cluster);
return {
fetch: Effect.gen(function* () {
// runtime
const { serviceName } = yield* getVpcEndpointServiceName();
return HttpServerResponse.json({ serviceName });
}),
};