https://pulumi.com logo
Title
m

most-father-39313

07/27/2021, 6:12 PM
👋 pulumi looks super slick but I'm hitting a few speed bumps along the way, most critical is the exact code from here: https://www.pulumi.com/docs/guides/crosswalk/aws/lambda/#register-an-event-handler-by-creating-a-lambda-function-resource bombs out with an error:
aws:lambda:Function (docsHandlerFunc):
    error: 1 error occurred:
    	* error creating Lambda Function (1): ValidationException:
    	status code: 400, request id: 27d225ae-0642-4798-af1f-b8b86ae640d5
Some googling around indicates this happens, for example, if you provide an id rather than a proper arm for the role but that's not the case here. Is there reason to believe this documentation is wrong/incorrect?
(rubberducking a bit...) running
TF_LOG=TRACE pulumi up --logtostderr -v=9
gives me a ton of stuff to comb through...
deep in terraform it looks like we have:
{
  "Code": {
    "ZipFile": "UEsFBgAAAAAAAAAAAAAAAAAAAAAAAA=="
  },
  "Description": "",
  "FunctionName": "docsHandlerFunc-dfeb6fb",
  "Handler": "",
  "MemorySize": 128,
  "PackageType": "Zip",
  "Publish": false,
  "Role": "arn:aws:iam::XXXXXXXX:role/docsHandlerRole-87ca993",
  "Runtime": "nodejs12.x",
  "Timeout": 3
}
ok, looks like according to the docs handler is expected to be [^\s]+, so "" is invalid
specifying a dummy handler name gets me to a different error
so yay
ok, this was my problem (I'm running a custom runtime so handler doesn't matter).
will file a bug/patch later today