![](/img/trans.png)
[英]Trying to launch AWS Elastic beanstalk instance with Ubuntu AMI
[英]How to pass userdata to AWS Elastic beanstalk instance launched with custom AMI
我需要使用我的自定義 AMI 啟動的彈性 beanstalk 實例來運行一些用戶數據,即:bash 腳本。
我想復制一些文件並在用戶數據中執行我的應用程序 .jar,它捆綁在我使用打包程序創建的自定義 AMI 中。
有沒有辦法用 AWS 彈性 beantalk 做到這一點?
使用 .ebexentions 你只需要在 script_name.config YAML 文件中編寫你的 bash 腳本,beanstalk 會處理它。 AWS 文檔- http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/ebextensions.html
參考鈎子: https : //github.com/equivalent/scrapbook2/blob/master/archive/blogs/2016-08-22-aws-elasticbeanstalk-hooks.md
您可以將配置文件添加到 .ebextensions 目錄。
對於 AWS Linux 2 平台,查看 Buildfile、Procfile 和 Platform hooks。
所有這些選項都在這里討論: https : //docs.aws.amazon.com/elasticbeanstalk/latest/dg/platforms-linux-extend.html
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.