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回答
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ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ