Cloudformation (Serverless Application Model - SAM) serverless.template in Visual Studio shows errors but builds and deploys

0

I have been putting together a serverless template in Visual Studio, building and deploying my architecture. Sometimes when I add new features to it they show up with red squiggles i.e. it says that there are errors. However the syntax is correct according to the documentation and the deployment works fine.

I currently have 21 errors in a document of about 1000 lines. My AWS toolkit is on the latest version but it does not seem to help.

For example here is one resource:

"MySQLUserDBCluster": {
       "Type":"AWS::RDS::DBCluster",
       "Properties": {        
       "DBClusterIdentifier": "UserDBCluster",
       "MasterUsername": "atadmin",
       "MasterUserPassword": {
         "Ref": "MasterMySQLPassword"
       },
       "EngineVersion": "8.0",
       "Engine" : "aurora-mysql",
       "EngineMode" : "provisioned",
         "ServerlessV2ScalingConfiguration": {
           "MaxCapacity": 20,
           "MinCapacity": 1
         },         
       "VpcSecurityGroupIds": [
         {
           "Ref": "MySecurityGroup"
         }
       ]
     }
   },

The lines

"ServerlessV2ScalingConfiguration": {
           "MaxCapacity": 20,
           "MinCapacity": 1

are shown to be in error. When I hover over "ServerlessV2ScalingConfiguration" it says "ServerlessV2ScalingConfiguration key is invalid for this object"

The same goes for the reference to MySecurityGroup. Hovering over it, It says "MySecurityGroup is an invalid type for this reference". However, it is not and it works fine.

Any suggestions? It makes it hard to see when there are real errors that need to be fixed.

2 Answers
1

It appears to be a bug. Could you please open an issue in the aws-toolkit-visual-studio GitHub repository?

profile picture
EXPERT
answered 16 days ago
0
zeiddev
answered 14 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions