2

I have the following launch.json config:

  {
            "type": "aws-sam",
            "request": "direct-invoke",
            "name": "getUserB196FDAE",
            "invokeTarget": {
                "target": "template",
                "templatePath": "${workspaceFolder}/server/template.yaml",
                "logicalId": "getUserB196FDAE"
            },
            "lambda": {
                "runtime": "nodejs16.x",
                "payload": {},
                "environmentVariables": {}
            }
        }

a section of my template.yaml generated with cdk synthesize looks something like this:

Resources:
   ...other resources...   
   getUserB196FDAE:
      Type: AWS::Lambda::Function
      Properties:
         ...properties...
   ...other resources...   

when I try to run the launch configuration, I get the following error:

Invalid launch configuration: Template Resource getUserB196FDAE in Template file 'path to my yaml file here' needs to be of type AWS::Serverless::Function or AWS::Lambda::Function

this is very bizarre since the in the .yaml getUserB196FDAE is clearly of type AWS::Lambda::Function

Anyone else run into this or know a potential fix? Thank you in advance

DanielGPR
  • 21
  • 2

0 Answers0