How to execute commands on AWS Instance using Boto3

后端 未结 6 1432
一生所求
一生所求 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:32

    No. The boto.manage.cmdshell functionality in boto was not migrated to boto3. The original boto.manage.cmdshell functionality used Paramiko which you could use directly with boto3 if you want to have SSH functionality with boto3.

    Here's a boto3 github issue on this topic.

    As @jarmod points out there is new AWS functionality as of October 2015 that enables you to run commands on Windows systems using AWS EC2 SSM. You can access this in boto3 with the boto3 SSM client as of botocore version 1.3.1.

    Here's a boto3 github issue on supporting "EC2 Run Command"

提交回复
热议问题