lambda/index.ts
, the file containing our core lambda logic:
QSTASH_CURRENT_SIGNING_KEY
and QSTASH_NEXT_SIGNING_KEY
environment variables together when deploying our Lambda.
verify
function:lib/<your-stack-name>.ts
file the CDK created when bootstrapping the project. For example, if our lambda webhook does video processing, it could look like this:
https://<API-GATEWAY-ID>.execute-api.<API-REGION>.amazonaws.com/prod/
To provide our QSTASH_CURRENT_SIGNING_KEY
and QSTASH_NEXT_SIGNING_KEY
environment variables, navigate to your QStash dashboard:
Node.js 20.x
as runtime, then create the function.Configuration
tab and click Function URL
:NONE
, because we are handling authentication ourselves. Then, click Save
.
You’ll see the function URL on the right side of your function overview:
Configuration
tab, set the QSTASH_CURRENT_SIGNING_KEY
and QSTASH_NEXT_SIGNING_KEY
environment variables:package.json
file to build and zip your code:Upload from
button for your Lambda and
deploy the code to AWS. Select ./dist/index.zip
as the upload file.