search
LoginSignup
0
Help us understand the problem. What are the problem?

posted at

updated at

AWS Synthetics Canaryで実際に動くlambdaのArnを調べる

コンソールからだと見つけられないのでAWS CLIからjqで調べる。
フィルターは(それほど長いわけではないが) 別ファイルにして実行

$ aws synthetics describe-canaries | jq -f canary-lambda.txt`
[
  {
    "Name": "example-canary",
    "Function": "arn:aws:lambda:ap-northeast-1:xxxx:function:example-canary-xxxxx:1",
    "Role": "arn:aws:iam::xxxx:role/example-canary-ExecutionRole",
    "Code": {
      "SourceLocationArn": "arn:aws:lambda:ap-northeast-1:xxxx:layer:example-canary-xxxx:1",
      "Handler": "index.handler"
    },
    "RuntimeVersion": "syn-nodejs-puppeteer-3.4"
  }
]
canary-lambda.txt
[
  .Canaries[] 
  |
  { 
    Name: .Name,
    RuntimeVersion: .RuntimeVersion,
    Function: .EngineArn,
    Role: .ExecutionRoleArn,
    Code: .Code
  }
]

Register as a new user and use Qiita more conveniently

  1. You can follow users and tags
  2. you can stock useful information
  3. You can make editorial suggestions for articles
What you can do with signing up
0
Help us understand the problem. What are the problem?