How to execute commands on AWS Instance using Boto3

后端 未结 6 1431
一生所求
一生所求 2021-01-11 12:01

Can anyone tell me if we can execute Shell Commands using Boto3 on Launched AWS instance.

I read at few places about \"boto.manage.cmdshell\" but it is deprecated in

6条回答
  •  迷失自我
    2021-01-11 12:23

    Documentation says:

    aws_request_id

    AWS request ID associated with the request. This is the ID returned to the client that called the invoke method.

    Change:

    command_id = response['Command']['CommandId']
    

    for:

    command_id = context.aws_request_id
    

提交回复
热议问题