proud-tiger-5743
02/20/2019, 8:49 PMconst input = new aws.s3.Bucket('inputbucket')
input.onObjectCreated('testing',(event,context)=> {
console.log(event)
},{keyPrefix: ".csv"},)
Is there a way to alter the IAM execution role?helpful-ice-5738
02/20/2019, 8:56 PMproud-tiger-5743
02/20/2019, 8:58 PMhelpful-ice-5738
02/20/2019, 8:59 PMaws.lambda.Function
?proud-tiger-5743
02/20/2019, 8:59 PMhelpful-ice-5738
02/20/2019, 9:00 PMproud-tiger-5743
02/20/2019, 9:01 PMbucket.onObjectCreated
and passing in the function codehelpful-ice-5738
02/20/2019, 9:01 PMaws.lambda.Function
but if you look to the source code you’ll see you can’t pass all the args you might need through those wrappers 😕proud-tiger-5743
02/20/2019, 9:02 PMhelpful-ice-5738
02/20/2019, 9:03 PMproud-tiger-5743
02/20/2019, 9:04 PMconst testLambda = new aws.lambda.Function("test_lambda", {
environment: {
variables: {
foo: "bar",
},
},
code: new pulumi.asset.FileArchive("lambda_function_payload.zip"),
name: "lambda_function_name",
handler: "exports.test",
role: iamForLambda.arn,
runtime: "nodejs8.10",
});
helpful-ice-5738
02/20/2019, 9:06 PMconst testLambda = new aws.lambda.Function("test_lambda", {
environment: {
variables: {
foo: "bar",
},
},
code: ` your code goes here \
some more code`,
name: "lambda_function_name",
handler: "exports.test",
role: iamForLambda.arn,
runtime: "nodejs8.10",
});
proud-tiger-5743
02/20/2019, 9:07 PM