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.

gefragt vor 5 Monaten448 Aufrufe
1 Antwort
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
SUPPORT-TECHNIKER
beantwortet vor 5 Monaten

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