f

    full-receptionist-30203

    3 months ago
    Hi all, I’m running into an issue on aws with SSO enabled where pulumi cannot find the logs for the current stack, but the log group exist. Is this a known issue and is there a solution ?
    b

    billowy-army-68599

    3 months ago
    Can you elaborate a bit more here? How would we repro this?
    f

    full-receptionist-30203

    3 months ago
    Let me try and make a small stack that (hopefully) reproduces it
    Here is a sample that show the issue (at least for me)
    I included a debug print of the pulumi logs command:
    I0616 11:52:05.979792   51862 operations_aws.go:194] [getLogs] Error getting logs: /aws/lambda/test_lambda-dev-lambda ResourceNotFoundException: The specified log group does not exist.
    But using awslogs it return correctly:
    awslogs get /aws/lambda/test_lambda-dev-lambda --profile pace:thomas
    /aws/lambda/test_lambda-dev-lambda 2022/06/16/[$LATEST]8c9656284fa34e669eaf3d41a3c131b2 START RequestId: 49515921-849a-4de7-accd-323aa0c06e1a Version: $LATEST
    /aws/lambda/test_lambda-dev-lambda 2022/06/16/[$LATEST]8c9656284fa34e669eaf3d41a3c131b2 END RequestId: 49515921-849a-4de7-accd-323aa0c06e1a
    (...)
    🤷
    b

    billowy-army-68599

    3 months ago
    what is
    awslogs
    ?
    f

    full-receptionist-30203

    3 months ago
    It’s a utility to access aws logs without the complexity of the AWS cli
    b

    billowy-army-68599

    3 months ago
    can you run
    aws logs describe-log-groups
    ? I think this is because the log group is autonamed and you're not specifying the suffix
    f

    full-receptionist-30203

    3 months ago
    Hm weird
    {
                "logGroupName": "/aws/lambda/test_lambda-dev-lambda",
                "creationTime": 1655394675393,
                "metricFilterCount": 0,
                "arn": "arn:aws:logs:us-east-1:<account>:log-group:/aws/lambda/test_lambda-dev-lambda:*",
                "storedBytes": 0
            },
            {
                "logGroupName": "/aws/lambda/test_lambda-dev-lambda-0c9c4ad",
                "creationTime": 1655394658950,
                "retentionInDays": 7,
                "metricFilterCount": 0,
                "arn": "arn:aws:logs:us-east-1:<account>:log-group:/aws/lambda/test_lambda-dev-lambda-0c9c4ad:*",
                "storedBytes": 0
            },
    2 things: • A second, postfixed version exist • storedBytes is 0, even if there are actual logs (not many though, but > 1 byte)
    any idea, @billowy-army-68599?
    b

    billowy-army-68599

    3 months ago
    not totally sure I'm afraid, I'd start by making sure your app is shipping logs correctly
    f

    full-receptionist-30203

    3 months ago
    Yes they do, I can tail the logs shown as missing by pulumi using aws logs. Not a bit issue though, I was just curious