File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -400,13 +400,15 @@ def _get_cloudwatch_logs_url(aws_context, start_time):
400
400
str -- AWS Console URL to logs.
401
401
"""
402
402
formatstring = "%Y-%m-%dT%H:%M:%SZ"
403
+ region = environ .get ("AWS_REGION" , "" )
403
404
404
405
url = (
405
- "https://console.aws.amazon.com /cloudwatch/home?region={region}"
406
+ "https://console.{domain} /cloudwatch/home?region={region}"
406
407
"#logEventViewer:group={log_group};stream={log_stream}"
407
408
";start={start_time};end={end_time}"
408
409
).format (
409
- region = environ .get ("AWS_REGION" ),
410
+ domain = "amazonaws.cn" if region .startswith ("cn-" ) else "aws.amazon.com" ,
411
+ region = region ,
410
412
log_group = aws_context .log_group_name ,
411
413
log_stream = aws_context .log_stream_name ,
412
414
start_time = (start_time - timedelta (seconds = 1 )).strftime (formatstring ),
You can’t perform that action at this time.
0 commit comments