How to use Services resource scheduler with aws systems manager

0

Hi folks I've followed the documentation provided by AWS on How to easily configure Resource Scheduler across your Organization with Systems Manager

To create ResourceScheduler i've to use a specific account ( AWS_ACCOUNT_test1 ) from there different OU with different user associate to them.

My EC2 instance are running below OU=Infra USERS=Test2 I've added AmazonSSMManagedInstanceCore policies to Test2 user and AWS_ACCOUNT_test1

I've added the tag to my EC2 instance ( key =ResourceScheduled value = true ) unfortunately STOP / START doesn't work.

Do you have an idea of anything I might have forgotten?

  • Could you please do this below steps troubleshoot to ensure that the stop and start actions are working as expected:

    Check IAM Policies: Ensure that the IAM policies attached to the Test2 user and AWS_ACCOUNT_test1 account include the necessary permissions to perform the ssm:StartInstance and ssm:StopInstance actions on EC2 instances. The policies should also include permissions for the necessary Systems Manager actions.

    Review Logging: Check the AWS Systems Manager Run Command logs and CloudWatch Logs for any errors or messages related to the stop and start actions. This can help identify any issues or failures that occur during the execution of the scheduled actions.

    Test Manually: Try manually triggering the stop and start actions using AWS Systems Manager Run Command to see if they work as expected. This can help isolate whether the issue lies with Resource Scheduler configuration or with the underlying permissions or settings.

oliver
질문됨 2달 전143회 조회
2개 답변
1

Hi guys everything is working now

However i've a question my last one :) My colleague created exactly the same resource scheduler although as tag he wrote

  • tag = Nico_WorkingHours value = true

On my side i wrote

  • tag = ResourceScheduled value = true

Only because he change this it's working for him . And i've checked before there is no whitespace after or before the tag name. so my question is :

Are there any tags not to use?

oliver
답변함 2달 전
0

thanks for your help i 've checked https://docs.aws.amazon.com/fr_fr/systems-manager/latest/userguide/running-simple-automations.html

And then i run the following command to check if it's work .

Head
aws ssm start-automation-execution --document-name "AWS-RestartEC2Instance" --mode Interactive --region $AWS_REGION --parameters "InstanceId=i-0fdccec2XXXXXX"

When i go to AWS systems Manager > Documents > AWS-RestartEC2Instance and then i click on details in permissions i 've output

POLICY ACCESS:

  • AWS_ACCOUNT_test1 : Administrator access policy
  • OU=Infra USERS=Test2 : AmazonSSMManagedInstanceCore policy ( i can START/STOP/DELETE ec2 instance from that account )
oliver
답변함 2달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠