[英]Cloud9 and CloudFormation - access EC2 instance
I'm creating a cloud9 instance in cloudformation as follows: 我正在以cloudformation形式创建一个cloud9实例,如下所示:
Resources: DevEnv: Type: 'AWS::Cloud9::EnvironmentEC2' Properties: SubnetId: !Ref PublicSubnet Name: MyEnvironment InstanceType: !Ref Cloud9InstanceType
Subsequently, I want to run a bash script on that EC2 instance (within the cloudformation script) to set it up properly. 随后,我想在该EC2实例上(在cloudformation脚本内)运行bash脚本以正确设置它。 How do I do that?
我怎么做?
Unfortunately you can't. 不幸的是你不能。
AWS::Cloud9::EnvironmentEC2
doesn't expose UserData or something like that and you cannot run SSM Documents against Cloud9 instances. AWS::Cloud9::EnvironmentEC2
不会公开UserData或类似的数据,并且您无法针对Cloud9实例运行SSM文档。
The closest you can get is using Repositories
to clone a AWS CodeCommit into the instance, and that repository has a script that you run manually first time you connect... 您可以获得的最接近的结果是使用
Repositories
将AWS CodeCommit克隆到实例中,并且该存储库具有您在首次连接时手动运行的脚本...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.