Skip to content

Commit 6ae7d42

Browse files
author
AWS
committed
Synthetics Update: Add support to retry a canary automatically after schedule run failures. Users can enable this feature by configuring the RetryConfig field when calling the CreateCanary or UpdateCanary API. Also includes changes in GetCanary and GetCanaryRuns to support retrieving retry configurations.
1 parent 0dcf58a commit 6ae7d42

File tree

2 files changed

+60
-3
lines changed

2 files changed

+60
-3
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"type": "feature",
3+
"category": "Synthetics",
4+
"contributor": "",
5+
"description": "Add support to retry a canary automatically after schedule run failures. Users can enable this feature by configuring the RetryConfig field when calling the CreateCanary or UpdateCanary API. Also includes changes in GetCanary and GetCanaryRuns to support retrieving retry configurations."
6+
}

services/synthetics/src/main/resources/codegen-resources/service-2.json

Lines changed: 54 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,14 @@
623623
"shape":"UUID",
624624
"documentation":"<p>A unique ID that identifies this canary run.</p>"
625625
},
626+
"ScheduledRunId":{
627+
"shape":"UUID",
628+
"documentation":"<p>The ID of the scheduled canary run.</p>"
629+
},
630+
"RetryAttempt":{
631+
"shape":"RetryAttempt",
632+
"documentation":"<p>The count in number of the retry attempt.</p>"
633+
},
626634
"Name":{
627635
"shape":"CanaryName",
628636
"documentation":"<p>The name of the canary.</p>"
@@ -729,6 +737,10 @@
729737
"Completed":{
730738
"shape":"Timestamp",
731739
"documentation":"<p>The end time of the run.</p>"
740+
},
741+
"MetricTimestampForRunAndRetries":{
742+
"shape":"Timestamp",
743+
"documentation":"<p>The time at which the metrics will be generated for this run or retries.</p>"
732744
}
733745
},
734746
"documentation":"<p>This structure contains the start and end times of a single canary run.</p>"
@@ -748,6 +760,10 @@
748760
"DurationInSeconds":{
749761
"shape":"MaxOneYearInSeconds",
750762
"documentation":"<p>How long, in seconds, for the canary to continue making regular runs according to the schedule in the <code>Expression</code> value. If you specify 0, the canary continues making runs until you stop it. If you omit this field, the default of 0 is used.</p>"
763+
},
764+
"RetryConfig":{
765+
"shape":"RetryConfigInput",
766+
"documentation":"<p>A structure that contains the retry configuration for a canary</p>"
751767
}
752768
},
753769
"documentation":"<p>This structure specifies how often a canary is to make runs and the date and time when it should stop making runs.</p>"
@@ -762,6 +778,10 @@
762778
"DurationInSeconds":{
763779
"shape":"MaxOneYearInSeconds",
764780
"documentation":"<p>How long, in seconds, for the canary to continue making regular runs after it was created. The runs are performed according to the schedule in the <code>Expression</code> value.</p>"
781+
},
782+
"RetryConfig":{
783+
"shape":"RetryConfigOutput",
784+
"documentation":"<p>A structure that contains the retry configuration for a canary</p>"
765785
}
766786
},
767787
"documentation":"<p>How long, in seconds, for the canary to continue making regular runs according to the schedule in the <code>Expression</code> value.</p>"
@@ -806,11 +826,11 @@
806826
},
807827
"StateReason":{
808828
"shape":"String",
809-
"documentation":"<p>If the canary has insufficient permissions to run, this field provides more details.</p>"
829+
"documentation":"<p>If the canary creation or update failed, this field provides details on the failure.</p>"
810830
},
811831
"StateReasonCode":{
812832
"shape":"CanaryStateReasonCode",
813-
"documentation":"<p>If the canary cannot run or has failed, this field displays the reason.</p>"
833+
"documentation":"<p>If the canary creation or update failed, this field displays the reason code.</p>"
814834
}
815835
},
816836
"documentation":"<p>A structure that contains the current state of the canary.</p>"
@@ -1189,7 +1209,7 @@
11891209
},
11901210
"NextToken":{
11911211
"shape":"Token",
1192-
"documentation":"<p>A token that indicates that there is more data available. You can use this token in a subsequent <code>GetCanaryRuns</code> operation to retrieve the next set of results.</p>"
1212+
"documentation":"<p>A token that indicates that there is more data available. You can use this token in a subsequent <code>GetCanaryRuns</code> operation to retrieve the next set of results.</p> <note> <p>When auto retry is enabled for the canary, the first subsequent retry is suffixed with *1 indicating its the first retry and the next subsequent try is suffixed with *2.</p> </note>"
11931213
},
11941214
"MaxResults":{
11951215
"shape":"MaxSize100",
@@ -1464,6 +1484,11 @@
14641484
"max":31622400,
14651485
"min":0
14661486
},
1487+
"MaxRetries":{
1488+
"type":"integer",
1489+
"max":2,
1490+
"min":0
1491+
},
14671492
"MaxSize100":{
14681493
"type":"integer",
14691494
"max":100,
@@ -1536,6 +1561,32 @@
15361561
"type":"string",
15371562
"enum":["lambda-function"]
15381563
},
1564+
"RetryAttempt":{
1565+
"type":"integer",
1566+
"max":2,
1567+
"min":1
1568+
},
1569+
"RetryConfigInput":{
1570+
"type":"structure",
1571+
"required":["MaxRetries"],
1572+
"members":{
1573+
"MaxRetries":{
1574+
"shape":"MaxRetries",
1575+
"documentation":"<p>The maximum number of retries. The value must be less than or equal to 2.</p>"
1576+
}
1577+
},
1578+
"documentation":"<p>This structure contains information about the canary's retry configuration.</p> <note> <p>The default account level concurrent execution limit from Lambda is 1000. When you have more than 1000 canaries, it's possible there are more than 1000 Lambda invocations due to retries and the console might hang. For more information on the Lambda execution limit, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/lambda-concurrency.html#:~:text=As%20your%20functions%20receive%20more,functions%20in%20an%20AWS%20Region\">Understanding Lambda function scaling</a>.</p> </note> <note> <p>For canary with <code>MaxRetries = 2</code>, you need to set the <code>CanaryRunConfigInput.TimeoutInSeconds</code> to less than 600 seconds to avoid validation errors.</p> </note>"
1579+
},
1580+
"RetryConfigOutput":{
1581+
"type":"structure",
1582+
"members":{
1583+
"MaxRetries":{
1584+
"shape":"MaxRetries",
1585+
"documentation":"<p>The maximum number of retries. The value must be less than or equal to 2.</p>"
1586+
}
1587+
},
1588+
"documentation":"<p>This structure contains information about the canary's retry configuration.</p>"
1589+
},
15391590
"RoleArn":{
15401591
"type":"string",
15411592
"max":2048,

0 commit comments

Comments
 (0)