I’m experiencing something odd with AWS Lambdas th...
# general
b
I’m experiencing something odd with AWS Lambdas that must somehow be Pulumi related, but has me stumped. I’ve got a simple lambda that does nothing but call the
AWS.S3.copyObject
API. The exact same code runs fine locally, and in a lambda that I create in the traditional way. However, when I deploy using Pulumi’s
aws.lambda.CallbackFunction
, the
copyObject
call never invokes its callback (or delivers its promise, I’ve tried both ways). All the other code in the function seems to run, it’s very strange. Is there any chance that Pulumi is transforming the AWS API itself a bit too aggressively? I notice that my call to
require('aws-sdk')
is replaced by
require("aws-sdk/lib/aws.js")
after Pulumi does its magic.
b
Just throwing a guess here ... What does the CloudWatch log for your lambda say? Any errors? Does your lambda have the right S3 IAM permissions?
b
The cloudwatch log doesn’t return any errors except the lambda timing out. I do see all my logging statements I put in…just the callback/promise from the AWS API never returns. I am pretty sure other configuration (like IAM permissions) are not the issue, since I can run the exact same lambda fine when I upload the code in the traditional way instead of via Pulumi magic.
Oops. My apologies. One of my test cases was misconfigured. My problem was the result of a misconfigured VPC, not Pulumi’s lambda code generation.