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.

zeiddev
已提问 1 个月前216 查看次数
2 回答
1

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

profile picture
专家
已回答 1 个月前
0
zeiddev
已回答 1 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则