pulumi / pulumi-cloud

A highly productive multi-cloud framework for containers, serverless, and data
Apache License 2.0
130 stars 18 forks source link

No logs on AWS #791

Closed lukehoban closed 3 years ago

lukehoban commented 3 years ago

This program creates a lambda that cannot write logs to CloudWatch.

import * as cloud from "@pulumi/cloud-aws";
let endpoint = new cloud.API("hello-world");
endpoint.get("/", async (req, res) => {
    console.log("hello world")
    res.status(200).json({hello: "world"});
});
exports.endpoint = endpoint.publish().url;

pulumi logs returns no results, and the Lambda console includes:

Screen Shot 2021-05-24 at 10 54 51 AM
leezen commented 3 years ago

This was broken in https://github.com/pulumi/pulumi-cloud/pull/783 -- a workaround will be to explicitly set cloud-aws:computeIAMRolePolicyARNs in config with the appropriate policy ARNs. I'll submit a PR to have this match the set of policies we default to in @pulumi/aws plus the existing ECS policy.