Kind: Interface
Source: src/adapter/aws-lambda/types.ts
Part of: Adapter
LatticeRequestContextV2 represents request metadata added by AWS VPC Lattice in the Lambda adapter. It contains service and target identifiers, the request region and timestamp, plus optional caller identity attributes.
Properties
| Property | Type |
|---|---|
serviceNetworkArn | string |
serviceArn | string |
targetGroupArn | string |
region | string |
timeEpoch | string |
identity | { sourceVpcArn?: string type?: string principal?: string principalOrgID?: string sessionName?: string x509IssuerOu?: string x509SanDns?: string x509SanNameCn?: string x509SanUri?: string x509SubjectCn?: string } |
Diagram
mermaidgraph LR Request[VPC Lattice request] --> Context[LatticeRequestContextV2] Context --> Service[serviceNetworkArn] Context --> ServiceArn[serviceArn] Context --> Target[targetGroupArn] Context --> Metadata[region and timeEpoch] Context --> Identity[identity] Identity --> Caller[optional caller attributes]
Usage
tsimport type { LatticeRequestContextV2 } from './types';
function logLatticeRequest(context: LatticeRequestContextV2): void {
console.log({
serviceNetworkArn: context.serviceNetworkArn,
serviceArn: context.serviceArn,
targetGroupArn: context.targetGroupArn,
region: context.region,
principal: context.identity.principal,
sourceVpcArn: context.identity.sourceVpcArn,
});
}
AI Coding Instructions
- Treat
identityfields as optional and check forundefinedbefore reading or forwarding them. - Keep ARN fields as strings; do not parse them unless the calling code needs a specific ARN component.
- Use
timeEpochas the request timestamp value received from the Lattice event. - Pass this context through adapter boundaries when handlers need Lattice service, target group, or caller identity metadata.
Was this page helpful?