Skip to content

Connect

Source: src/AWS/ElastiCache/Connect.ts

Runtime binding that resolves connection settings for an ElastiCache serverless cache.

This is an environment-only binding: ElastiCache has no IAM-gated data plane for classic (non-RBAC) access, so the binding injects the cache’s endpoint host/port as environment variables on the host Function and returns a typed CacheConnectionInfo at runtime. Network access is governed by VPC security groups, NOT IAM — the host Function must:

  1. be attached to the cache’s VPC (vpc: { subnetIds, securityGroupIds }), and
  2. have a security group allowed ingress on the cache’s port by one of the cache’s securityGroupIds.
const connect = yield* ElastiCache.Connect(cache);
// inside a handler:
const { host, port, tls } = yield* connect;