threadheap / serverless-ide-vscode

Serverless IDE: Enhanced support for AWS SAM and CloudFormation in VS Code
https://serverless-ide.com/
195 stars 45 forks source link

Missing property "service" & "provider" when using lambda with AWS SQS and Fn::GetAtt #82

Closed Marcholio closed 4 years ago

Marcholio commented 4 years ago

And the queue "MySQS" is defined in the same serverless file as the function. The IDE reports two errors:

provider: name: aws runtime: nodejs10.x

functions:

This works

function1: handler: src/handler.handler events:

resources: Resources: MyQueueSQS: Type: AWS::SQS::Queue Properties: QueueName: MyQueue



* **What is the expected behavior?**
There should not be an error.

* **What is the motivation / use case for changing the behavior?**
It's misleading since the Fn::GetAtt reference is working and according to the official [serverless documentation](https://www.serverless.com/framework/docs/providers/aws/events/sqs/).

* **Please tell us about your environment:**

  - Plugin version: 0.5.19
  - VSCode version: 1.44.2
  - Template type: serverless.yml

* **Other information** (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)

Seems like the issue occurs only when using Fn::GetAtt, plain arn reference works fine.
pavelvlasov commented 4 years ago

Thanks for raising @Marcholio 👍 Looks like there was a problem with some references in the schema. The issue should be resolved in the latest version.

Marcholio commented 4 years ago

Thank you! I checked that it's working correctly now, much appreciated 👍