0
0

More than 3 years have passed since last update.

GreengrassのLocal connection detectionの設定をCloudformationから設定する

Posted at

凄いニッチですが、詰まったので残しておきます。

Greengrass(V2でなくV1)で、 Core connectivity information という設定項目があります。

項目としては以下から選択する形になります。

  • Automatically detect and override connection information
  • Manually manage connection information

image.png

これをどうやってCloudformationやAPIで設定するかを探していたのですが、どこを探しても項目が見つかりません。そんな時に以下のURLを見つけました。

引用すると以下のコマンドでできます。 arn:aws:lambda:::function:GGIPDetector:1 というLambdaを登録するという意味です。

aws greengrass create-function-definition-version --function-definition-id <function-definition-id> --functions '[
    {
        "FunctionArn": "arn:aws:lambda:::function:GGIPDetector:1",
        "Id": "<your-id>",
        "FunctionConfiguration": {
            "Pinned": true,
            "Timeout": 3,
            "MemorySize": 32768
        }
    }
]'

ホントにと思ったのですが、確かに以下のように定義してデプロイすると Automatically detect and override connection information が有効になっていることが確認できました。

Greengrass GroupのLambdaの項目を見ても該当の GGIPDetector というLambdaは見えないので、内部的に利用されるようです。まさか設定にLambdaを登録する形とは思っていませんでした。

#省略
 FunctionDefinitionVersion:
    Type: "AWS::Greengrass::FunctionDefinitionVersion"
    Properties:
      FunctionDefinitionId: !GetAtt
        - FunctionDefinition
        - Id
      DefaultConfig:
        Execution:
          IsolationMode: GreengrassContainer
      Functions:
        - Id: GGIPDetector
          FunctionArn: "arn:aws:lambda:::function:GGIPDetector:1"
          FunctionConfiguration:
            Pinned: "true"
            MemorySize: "32768"
            Timeout: "3"
#省略
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0