背景
先月、AWS CodeStarを利用して、Webアプリケーションのプロジェクトを作成しました。
プロジェクトのテンプレートは以下を選択しました。
- PHP (Laravel)
- ウェブアプリケーション
- AWS Elastic Beanstalk
生成されたAWS CodeStarプロジェクトの内容は以下の通りです。
- コード (Gitのホスティングサービス): AWS CodeCommit
- デプロイ(Webサーバー): AWS Elastic Beanstalk
- パイプライン(継続的デリバリー): AWS CodePipeline
CodeCommitのmasterブランチを更新すると、CodePipelineが自動でElastic Beanstalkにデプロイするようになりました。
エラーの発端
このElastic Beanstalkの環境にnpmをインストールしたかったため、.ebextensionsフォルダ配下に、以下の内容のconfigファイルを追加しました。
container_commands: 01_install_gcc: command: 'yum install -y gcc-c++ make' 02_download_node: command: "curl -sL https://rpm.nodesource.com/setup_6.x | bash -E" 03_install_node: command: 'yum install -y nodejs' 04_install_node_modules: command: 'npm install' 05_run_production: command: 'npm run dev'
How do I compile Vuejs components using AWS EB extensions?
を参考にさせていただきました。
こちらの内容でデプロイを試みたところ、エラーが出るようになりました。
ちなみに同様のコマンドをローカル環境で実行したところ、特にエラーは発生していません。
症状
AWS CodePipelineでのデプロイが失敗します。エラーメッセージは以下の通りです。
Deployment completed, but with errors: During an aborted deployment, some instances may have deployed the new application version. To ensure all instances are running the same version, re-deploy the appropriate application version. Failed to deploy application. Unsuccessful command execution on instance id(s) '●●●●'. Aborting the operation.
●●●●は、EC2のインスタンスIDです。
ElasticBeanstalkにnpmをインストールしたいだけなのですが、どなたか方法をご存知の方はいらっしゃいますか?
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。