AWS SAMテンプレートでScheduleV2を指定すると”Type key is invalid for this object.”

0

まず、環境は以下の通りです。

  • VisualStudio2022
  • AWS Toolkit for Visual Studio 2022 (1.42.0.0)
  • Amazon.Lambda.Annotations (1.0.0)
  • AWS ServerlessApplication with Tests (.NET Core - C#)

AWS ServerlessApplication with Testsのプロジェクトを作成し、serverless.template(抜粋)で以下のように記載すると、"ScheduleV2"のところで”Type key is invalid for this object.”というエラーが出ます。 何か設定が不足しているのでしょうか?

    "SampleFunctionGenerated": {
      "Type": "AWS::Serverless::Function",
      "Metadata": {
        "Tool": "Amazon.Lambda.Annotations"
      },
      "Properties": {
        "PackageType": "Zip",
        "Handler": "SampleApi::Sample.Functions.SampleFunction_Generated::Add",
        "CodeUri": ".",
        "Events": {
            "ScheduleEvent": {
                "Type": "ScheduleV2",
                "Properties": {
                    "ScheduleExpression": "rate(1 minute)"
                }
            }
        }
      }
    }
Keine Antworten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen