are there some examples of using aws-sdk inside of...
# aws
e
are there some examples of using aws-sdk inside of an inline lambda code? like
Copy code
const lambda = new aws.lambda.CallbackFunction("mylambda", {
  callback: async e => {
    // aws sdk code here
  }
});
The serialization isn't going right for me and I am getting module not found error when it runs
b
I believe you can use the sdk inline as follows if you
import * as aws _from_ '@pulumi/aws';
. Using DynamoDB as an example.
Copy code
callback: async (event, context, callback) => {
      const client = new aws.sdk.DynamoDB.DocumentClient();
      const { Items } = await client
        .scan({
          TableName: table.name.get(),
        })
        .promise();
      callback(null, {Items});
    },
e
Thanks! that is what I figured out eventually. And I had to use v2 of the api to get it working.