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

proud-tiger-5743

05/07/2019, 12:31 AM
If I change it to this
Copy code
const ingestFunction = new aws.lambda.CallbackFunction("ingestProcessor", {
  role: lambdaRole,
  callback: async event => {
    const AWS = require("aws-sdk");
    const s3 = new AWS.S3({ apiVersion: "2006-03-01" });
    s3.listBuckets((err, data) => {
      console.log(data.Buckets);
    });
  }
});
It doesn't log anything - I saw this example - https://github.com/pulumi/examples/blob/master/aws-ts-apigateway/index.ts#L24 - and thought you could reference the SDK that way...but maybe I misunderstood that piece
w

white-balloon-205

05/07/2019, 5:11 PM
You can use the AWS SDK like this as well - but the previous issue with mixing async and callback styles is likely the root cause here.