AWS CodePipelineの CodeBuildで何もしていないのにエラー
イシュー
- CodePipeline で なにもしないBuild を実行しているのに、エラーなる
RequestError: send request failed caused by: Get https://codepipeline-ap-northeast-1-770822675322.s3.ap-northeast-1.amazonaws.com/drupal-beanstalk-pip/MyApp/ZRw4L7X: dial tcp 52.219.0.112:443: i/o timeout
- CodeCommit から、S3へファイルを格納できているが、次のステップの CodeBuildで、S3のファイルがGETできていない模様。
参考
- AWS CodeBuild に対する認証とアクセスコントロール - AWS CodeBuild
- https://forums.aws.amazon.com/message.jspa?messageID=855926
- codepipeline がVPC内のS3へアクセスできるかを確認
- 【新機能】S3がVPCのプライベートサブネットからアクセス可能になりました! | Developers.IO
CodePipeline の CodeCommit デフォルトのコミットコマンド
git push codecommit-origin default
Stagingでエラー
The action failed because either the artifact or the Amazon S3 bucket could not be found. Name of artifact bucket: codepipeline-ap-northeast-1-770822675322. Verify that this bucket exists. If it exists, check the life cycle policy, then try releasing a change.
アーティファクトまたはAmazon S3バケットが見つからないため、アクションは失敗しました。 アーティファクトバケットの名前:codepipeline-ap-northeast-1-770822675322。 このバケットが存在することを確認します。 存在する場合は、ライフサイクルポリシーを確認してから、変更をリリースしてください。
アーティファクトができていないらしい。 CodeBuild の アーティファクトをどのように設定すればよいか?
Deployment completed, but with errors: Failed to deploy application. Service:AmazonCloudFormation, Message:Template format error: Unresolved resource dependencies [MountTargetSecurityGroup] in the Resources block of the template
- アーティファクトをつくるようにしたら、メッセージが変わった。
- デプロイメントは完了しましたが、エラーが発生しました。 サービス:AmazonCloudFormation、メッセージ:テンプレート形式のエラー:未解決のリソース依存関係[MountTargetSecurityGroup]テンプレートのResourcesブロック
参考
MountTargetSecurityGroup は、EFSの設定
ElasticBeanstalk でサーバ構築する際のCloudFormationテンプレートで、EFSリソースを取得するRef: MountTargetSecurityGroup が未解決というのはどういうことか?
- MountTargetSecurityGroup は、MountTargetA、MountTargetB、MountTargetCの3つある(サブネット3つ分)
CodePipeline template format error
- CodePipeline CloudFormation Template configuration - Stack Overflow
- CloudFormationで変数の埋め込みはしたいが、IAMポリシ-変数を使いたい場合
- セキュリティグループの作成 - Amazon Elastic File System
原因:.ebextensions がコミットされていなかったため。
- .ebextensions/loadbalancer-sg.config は、リリース後設定されていると、Codepipeline からデプロイする際にエラーになるため削除する。
別のエラー
Service:AmazonCloudFormation, Message:Template format error: Unresolved resource dependencies [AWSEBLoadBalancerSecurityGroup] in the Resources block of the template