Exports an async function that deploys our pre queue Lambda, which is the Lambda triggered by the API Gateway resource "/beekeeper", i.e. first time visitors.
- Source:
Methods
(async, inner) addLambdaPermission(lambda, lambdaName)
- Source:
Adds a permission so that the API Gateway can trigger the Lambda.
Parameters:
Name | Type | Description |
---|---|---|
lambda |
LambdaClient | Looks like |
lambdaName |
String | A constant |
(async, inner) createPreLambda(lambda, lambdaName, sqsUrl, code, roleArn, region, s3ObjectRootDomain, protectUrl) → {String}
- Source:
Function that creates the pre-queue Lambda. This deployment sets several environment variables so that the preLambda code in its index.js has access to these environment variables. This pre Lambda will generate a token, put that token in the SQS queue, and set custom response headers dependent on the status of the environment variables.
Parameters:
Name | Type | Description |
---|---|---|
lambda |
LambdaClient | Looks like |
lambdaName |
String | A constant |
sqsUrl |
String | URL of the sqs queue returned by |
code |
String | This is the path of the index.js.zip file holding the code for this Lambda. |
roleArn |
String | Amazon resource number for the kitchen sink role returned by |
region |
String | A constant destructured from the CLI user's answers in |
s3ObjectRootDomain |
String | Constant |
protectUrl |
String | A constant destructured from the CLI user's answers in |
Returns:
Returns the ARN of this pre queue Lambda
- Type
- String