【发布时间】:2021-09-17 22:24:01
【问题描述】:
是否可以通过 AWSCLI(用户数据)运行 python 脚本。我试过了,但它没有运行,我的日志中有以下内容
boot.log:2015-08-07 10:08:30,660 - __init__.py[WARNING]: Unhandled non-multipart (text/x-not-multipart) userdata: './step-1
cloud-init.log:2015-08-07 10:08:30,660 - __init__.py[WARNING]: Unhandled non-multipart (text/x-not-multipart) userdata: './step-1'
cloud-init-output.log:2015-08-07 10:08:30,660 - __init__.py[WARNING]: Unhandled non-multipart (text/x-not-multipart) userdata: './step-1'
注意第 1 步是我试图作为 user-data 传递的脚本。我的脚本也存在于我运行命令的同一目录中,因此它应该选择
【问题讨论】:
-
能贴出实际的命令和参数吗?
-
您的脚本似乎没有指定它应该在其中运行的 shell。我的意思是,#!/bin/bash e.t.c.
标签: python amazon-web-services amazon-ec2