I tried following this: <https://www.pulumi.com/bl...
# aws
h
I tried following this: https://www.pulumi.com/blog/aws-lambda-provisioned-concurrency-no-cold-starts/ So ended up with this, but after 5 minutes it still needs warming up again
Copy code
const fetchSurveyLambda = new aws.lambda.CallbackFunction(
  `${appName}-fetchSurveyLambda`,
  {
    callback: fetchSurvey,
    publish: true,
  }
)

new aws.lambda.ProvisionedConcurrencyConfig(
  `${appName}-fetchSurveyLambda-warmer`,
  {
    functionName: fetchSurveyLambda.name,
    qualifier: fetchSurveyLambda.version,
    provisionedConcurrentExecutions: 2,
  }
)
Was hoping for some guidance here, so I've created an issue on Github https://github.com/pulumi/pulumi-aws/issues/1474
So it turns out it wasn't the Lambda cold starting that was a problem, it was the function itself initialising the dynamodb client, which for some reason takes ~5s with 128mb. Increasing the ram reduced this massively.