https://pulumi.com logo
#general
Title
# general
b

bitter-island-28909

02/27/2019, 3:34 PM
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

brainy-magician-83981

02/27/2019, 4:27 PM
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

bitter-island-28909

02/27/2019, 4:49 PM
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.