PĂ„l Brattberg
03/29/2021, 10:42 PMApi
construct, do we not get automatic `LogGroup`s for our functions/routes? Only the access logs? I can't find logging output from my functions anywhere, but guessing I'm just too tired? đ€ȘFrank
thdxr
03/29/2021, 10:43 PMthdxr
03/29/2021, 10:44 PMPĂ„l Brattberg
03/29/2021, 10:50 PMYour function doesn't have permission to write to Amazon CloudWatch Logs.
I used to create my functions explicitly (with more permissions), but now only let Api
create them for me, that must be why they're missing now, and not earlier.Frank
PĂ„l Brattberg
03/29/2021, 10:58 PMPĂ„l Brattberg
03/29/2021, 10:58 PMtest-peasy-backoffice-api-LambdaGETbackofficeapipi-1HJG7MOENF5TR
)PĂ„l Brattberg
03/29/2021, 10:58 PMPĂ„l Brattberg
03/29/2021, 10:58 PMFrank
Frank
AWSLambdaBasicExecutionRole
policyFrank
.build/cdk.out
and look for the AWS::IAM::Role
resources, they should look something like:
"MySnsLambdaServiceRoleA8A39BC9": {
"Type": "AWS::IAM::Role",
"Properties": {
"AssumeRolePolicyDocument": {
"Statement": [
{
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Principal": {
"Service": "<http://lambda.amazonaws.com|lambda.amazonaws.com>"
}
}
],
"Version": "2012-10-17"
},
"ManagedPolicyArns": [
{
"Fn::Join": [
"",
[
"arn:",
{
"Ref": "AWS::Partition"
},
":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
]
]
}
]
},
...
Frank
AWSLambdaBasicExecutionRole
under ManagedPolicyArns