# Class LambdaServiceInstance

#### Hierarchy (view full)

- RWSService
  - LambdaServiceInstance

- Defined in src/services/LambdaService.ts:45

#####
Index

### Constructors

constructor

### Properties

_RELOADABLE
region
_instances

### Methods

archiveLambda
deleteLambda
deployLambda
deployModules
determineLambdaPackagePaths
findPayload
functionExists
getLambdaFunction
getNPMPackage
getReloadable
integrateGatewayResource
invokeLambda
reloadService
setRegion
setupGatewayForWebLambda
waitForLambda
getSingleton

## Constructors

### constructor

- new LambdaServiceInstance(): LambdaServiceInstance

- #### Returns LambdaServiceInstance

  Overrides RWSService.constructor

  - Defined in src/services/LambdaService.ts:49

## Properties

### _RELOADABLE

_RELOADABLE: boolean = false

Inherited from RWSService._RELOADABLE

- Defined in src/services/_service.ts:2

### `Private` region

region: string

- Defined in src/services/LambdaService.ts:47

### `Static` `Protected` _instances

_instances: {
[key: string]: RWSService;
} = {}

#### Type declaration

- ##### [key: string]: RWSService

Inherited from RWSService._instances

- Defined in src/services/_service.ts:7

## Methods

### archiveLambda

- archiveLambda(lambdaDirPath, moduleCfgDir, fullZip?): Promise<string>

- #### Parameters

  - ##### lambdaDirPath: string

  - ##### moduleCfgDir: string

  - ##### fullZip: boolean = false

  #### Returns Promise<string>

  - Defined in src/services/LambdaService.ts:53

### deleteLambda

- deleteLambda(lambdaFunctionName): Promise<void>

- #### Parameters

  - ##### lambdaFunctionName: string

  #### Returns Promise<void>

  - Defined in src/services/LambdaService.ts:340

### deployLambda

- deployLambda(functionDirName, zipPath, vpcId, subnetId?, noEFS?): Promise<any>

- #### Parameters

  - ##### functionDirName: string

  - ##### zipPath: string

  - ##### vpcId: string

  - ##### `Optional` subnetId: string

  - ##### noEFS: boolean = false

  #### Returns Promise<any>

  - Defined in src/services/LambdaService.ts:101

### deployModules

- deployModules(functionName, efsId, vpcId, subnetId, force?): Promise<void>

- #### Parameters

  - ##### functionName: string

  - ##### efsId: string

  - ##### vpcId: string

  - ##### subnetId: string

  - ##### force: boolean = false

  #### Returns Promise<void>

  - Defined in src/services/LambdaService.ts:239

### determineLambdaPackagePaths

- determineLambdaPackagePaths(lambdaDirName, moduleCfgDir): [string, string]

- #### Parameters

  - ##### lambdaDirName: string

  - ##### moduleCfgDir: string

  #### Returns [string, string]

  - Defined in src/services/LambdaService.ts:90

### findPayload

- findPayload(lambdaArg): string

- #### Parameters

  - ##### lambdaArg: string

  #### Returns string

  - Defined in src/services/LambdaService.ts:396

### functionExists

- functionExists(lambdaFunctionName): Promise<boolean>

- #### Parameters

  - ##### lambdaFunctionName: string

  #### Returns Promise<boolean>

  - Defined in src/services/LambdaService.ts:311

### getLambdaFunction

- getLambdaFunction(lambdaFunctionName): Promise<GetFunctionResponse>

- #### Parameters

  - ##### lambdaFunctionName: string

  #### Returns Promise<GetFunctionResponse>

  - Defined in src/services/LambdaService.ts:302

### getNPMPackage

- getNPMPackage(lambdaDirName): INPMPackage

- #### Parameters

  - ##### lambdaDirName: string

  #### Returns INPMPackage

  - Defined in src/services/LambdaService.ts:227

### getReloadable

- getReloadable(): string

- #### Returns string

  Inherited from RWSService.getReloadable

  - Defined in src/services/_service.ts:19

### integrateGatewayResource

- integrateGatewayResource(lambdaFunctionName, restApiId, resource, httpMethod?): Promise<void>

- #### Parameters

  - ##### lambdaFunctionName: string

  - ##### restApiId: string

  - ##### resource: Resource

  - ##### httpMethod: string = 'GET'

  #### Returns Promise<void>

  - Defined in src/services/LambdaService.ts:422

### invokeLambda

- invokeLambda(functionDirName, payload): Promise<{
  CapturedLogs?: string[];
  InvocationType: string;
  Response: InvocationResponse;
  StatusCode: number;
  }>

- #### Parameters

  - ##### functionDirName: string

  - ##### payload: any

  #### Returns Promise<{
  CapturedLogs?: string[];
  InvocationType: string;
  Response: InvocationResponse;
  StatusCode: number;
  }>

  - Defined in src/services/LambdaService.ts:352

### reloadService

- reloadService<T>(this, ...params): InstanceType<T>

- #### Type Parameters

  - #### T extends (new (...args) => RWSService)

  #### Parameters

  - ##### this: T

  - ##### `Rest` ...params: any[]

  #### Returns InstanceType<T>

  Inherited from RWSService.reloadService

  - Defined in src/services/_service.ts:23

### setRegion

- setRegion(region): void

- #### Parameters

  - ##### region: string

  #### Returns void

  - Defined in src/services/LambdaService.ts:96

### setupGatewayForWebLambda

- setupGatewayForWebLambda(lambdaFunctionName, vpcId): Promise<void>

- #### Parameters

  - ##### lambdaFunctionName: string

  - ##### vpcId: string

  #### Returns Promise<void>

  - Defined in src/services/LambdaService.ts:438

### waitForLambda

- waitForLambda(functionName, waitFor?, timeoutMs?, intervalMs?): Promise<void>

- #### Parameters

  - ##### functionName: string

  - ##### waitFor: string = null

  - ##### timeoutMs: number = 300000

  - ##### intervalMs: number = 5000

  #### Returns Promise<void>

  - Defined in src/services/LambdaService.ts:315

### `Static` getSingleton

- getSingleton<T>(this): InstanceType<T>

- #### Type Parameters

  - #### T extends (new (...args) => RWSService)

  #### Parameters

  - ##### this: T

  #### Returns InstanceType<T>

  Inherited from RWSService.getSingleton

  - Defined in src/services/_service.ts:9

Generated using TypeDoc