Skip to content

Commit

Permalink
Fix where manual live tailing was specifically set to only one user
Browse files Browse the repository at this point in the history
  • Loading branch information
kerrlabajo committed May 16, 2024
1 parent 4d1c121 commit a8f3df8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Functions/TrainingJobHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,12 @@ private async Task CheckTrainingJobStatus(AmazonSageMakerClient amazonSageMakerC
{
if (trainingDetails.SecondaryStatusTransitions.Any() && trainingDetails.SecondaryStatusTransitions.Last().Status == "Training")
{
string logStreamName = await GetLatestLogStream(cloudWatchLogsClient, "/aws/sagemaker/TrainingJobs", trainingJobName);
string logGroupName = "/aws/sagemaker/TrainingJobs";

string logStreamName = await GetLatestLogStream(cloudWatchLogsClient, logGroupName, trainingJobName);
if (!string.IsNullOrEmpty(logStreamName))
{
await StartLiveTail(cloudWatchLogsClient, "arn:aws:logs:ap-southeast-1:905418164808:log-group:/aws/sagemaker/TrainingJobs:", logStreamName);
await StartLiveTail(cloudWatchLogsClient, $"arn:aws:logs:{UserConnectionInfo.Region}:{UserConnectionInfo.AccountId}:log-group:{logGroupName}:", logStreamName);
}

}
Expand Down

0 comments on commit a8f3df8

Please sign in to comment.