Create Synthetics Canary from the command line as defined by the AWS console wizard

0

Accordying to https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Create.html , the AWS console wizard creates:

  • An IAM role with the name CloudWatchSyntheticsRole-canary-name-uuid (if you use CloudWatch console to create the canary and specify for a new role to be created for the canary)
  • An IAM policy with the name CloudWatchSyntheticsPolicy-canary-name-uuid.
  • An S3 bucket with the name cw-syn-results-accountID-region.
  • Alarms with the name Synthetics-Alarm-MyCanaryName, if you want alarms to be created for the canary.
  • Lambda functions and layers, if you use a blueprint to create the canary. These resources have the prefix cwsyn-MyCanaryName.
  • CloudWatch Logs log groups with the name /aws/lambda/cwsyn-MyCanaryName-randomId

How can I export the required aws-cli commands the AWS console uses to generate such alerts?, I'm specially interested in the uuid generation and lambda function / layer sections.

質問済み 5ヶ月前447ビュー
1回答
0

There is no direct method to create CLI commands for actions done on the console. You can find all the CLI commands to create such resources yourself on AWS CLI documentation.

  • For example, Lambda functions and layers - You need to follow the create-function command. And for the uuid inside the name field, you will have to generate one using any custom script.
  • For example, CloudWatch Logs log groups, you need to follow put-log-group

Please note that part of this process is managed by AWS internally as well. If you want to get any additional assistance on any specific problem, please do reach out via a case on AWS Support.

profile pictureAWS
サポートエンジニア
回答済み 5ヶ月前

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

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

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

関連するコンテンツ