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.

demandé il y a 5 mois451 vues
1 réponse
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
INGÉNIEUR EN ASSISTANCE TECHNIQUE
répondu il y a 5 mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions