incalculable-sundown-82514
09/20/2018, 5:42 PMRole
argument should be Role.ARN()
?aloof-tailor-93191
09/20/2018, 5:42 PMaloof-tailor-93191
09/20/2018, 5:42 PMincalculable-sundown-82514
09/20/2018, 5:42 PMincalculable-sundown-82514
09/20/2018, 5:43 PMRole
object in and we grab the ARN from it)aloof-tailor-93191
09/20/2018, 5:43 PMaloof-tailor-93191
09/20/2018, 5:43 PMasset.NewFileArchive("./function")
and asset.NewFileArchive("./function.zip")
aloof-tailor-93191
09/20/2018, 5:44 PM$ tree function
function
└── function.py
0 directories, 1 file
$ unzip -l function.zip
Archive: function.zip
Length Date Time Name
--------- ---------- ----- ----
2844 2018-09-20 08:56 function.py
--------- -------
2844 1 file
incalculable-sundown-82514
09/20/2018, 5:44 PMincalculable-sundown-82514
09/20/2018, 5:47 PMincalculable-sundown-82514
09/20/2018, 5:47 PMaloof-tailor-93191
09/20/2018, 5:51 PMaloof-tailor-93191
09/20/2018, 5:52 PMmarshaling properties: awaiting input property endpoint: rpc error: code = Unknown desc = failed to compute archive hash: open ./fun.zip: no such file or directory
incalculable-sundown-82514
09/20/2018, 5:52 PMincalculable-sundown-82514
09/20/2018, 5:52 PMaloof-tailor-93191
09/20/2018, 6:26 PMaloof-tailor-93191
09/20/2018, 6:56 PMaloof-tailor-93191
09/20/2018, 6:56 PMaloof-tailor-93191
09/20/2018, 6:56 PMaloof-tailor-93191
09/20/2018, 6:56 PMaloof-tailor-93191
09/20/2018, 6:57 PMaloof-tailor-93191
09/20/2018, 8:42 PMincalculable-sundown-82514
09/20/2018, 8:43 PMaloof-tailor-93191
09/20/2018, 8:43 PMlambdaFunction, err := lambda.NewFunction(ctx, "slacker", &lambda.FunctionArgs{
Runtime: "python3.6",
S3Bucket: "code-123123123",
S3Key: "function.zip",
Timeout: 300,
Handler: "function.lambda_handler",
Role: lambdaRole.Arn(),
}, pulumi.ResourceOpt{
DependsOn: []pulumi.Resource{policyAttachment},
})
aloof-tailor-93191
09/20/2018, 8:43 PM./main.go:107:32: cannot use policyAttachment (type *iam.RolePolicyAttachment) as type pulumi.Resource in array or slice literal:
*iam.RolePolicyAttachment does not implement pulumi.Resource (wrong type for URN method)
have URN() *pulumi.URNOutput
want URN() pulumi.URN
aloof-tailor-93191
09/20/2018, 8:43 PMincalculable-sundown-82514
09/20/2018, 8:46 PMincalculable-sundown-82514
09/20/2018, 8:46 PMaloof-tailor-93191
09/20/2018, 8:46 PMincalculable-sundown-82514
09/20/2018, 8:47 PMiam.RolePolicyAttachment
should definitely implement pulumi.Resource