Skip to content

Commit

Permalink
Revert "fix: Allow sagemaker to have the proper IAM permission to aut…
Browse files Browse the repository at this point in the history
…ostop itself (awslabs#515)"

This reverts commit 6d6e0ed.
  • Loading branch information
manikandan-thangavelu-rl authored Jun 14, 2021
1 parent bdfdea4 commit ed201b1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,6 @@ Resources:
Action:
- 'sts:AssumeRole'
Resource: 'arn:aws:iam::*:role/swb-*'
- Effect: Allow
Action:
- sagemaker:DescribeNotebookInstance
- sagemaker:StopNotebookInstance
Resource: '*'
IAMRole:
Type: 'AWS::IAM::Role'
Properties:
Expand Down Expand Up @@ -180,7 +175,7 @@ Resources:
chmod a+x /usr/local/bin/autostop.py
IDLE_TIME=`expr ${AutoStopIdleTimeInMinutes} \* 60`
echo "Starting the SageMaker autostop script in cron"
(crontab -l 2>/dev/null; echo "*/1 * * * * /usr/bin/python /usr/local/bin/autostop.py --time $IDLE_TIME --ignore-connections >> /var/log/autostop.log") | crontab -
(crontab -l 2>/dev/null; echo "5 * * * * /usr/bin/python /usr/local/bin/autostop.py --time $IDLE_TIME --ignore-connections") | crontab -
fi

Outputs:
Expand Down
2 changes: 1 addition & 1 deletion main/solution/backend/config/infra/functions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ envStatusPollHandler:
description: Handles status polling for sc environments
events:
- schedule:
rate: rate(1 minute)
rate: rate(3 minutes)
description: 'Invokes the lambda function that polls and synchronize environment status.'
environment:
APP_CUSTOM_USER_AGENT: ${self:custom.settings.customUserAgent}
Expand Down

0 comments on commit ed201b1

Please sign in to comment.