简体   繁体   English

部署ElasticBeanstalk时AWS代码管道中的错误

[英]Error in AWS codepipeline when deploying ElasticBeanstalk

I've created a pipeline which does the following: 我创建了一个执行以下操作的管道:

  1. Git changes trigger next action (code build) Git更改触发下一步操作(代码构建)
  2. Codebuild initiates & builds a docker image from git source Codebuild从git源启动并构建docker镜像
  3. Set latest docker container up on Elasticbeanstalk 在Elasticbeanstalk上设置最新的Docker容器

The first 2 steps are working fine, git changes initiate a codebuild, the codebuild builds a docker image, and then tries to set it up on Elasticbeanstalk (which fails). 前两个步骤运行良好,git更改启动了一个代码构建,该代码构建构建了一个docker映像,然后尝试在Elasticbeanstalk上进行设置(失败)。 The following error is thrown: 引发以下错误:

Invalid action configuration The action failed because either the artifact or the Amazon S3 bucket could not be found. 无效的操作配置该操作失败,因为找不到工件或Amazon S3存储桶。 Name of artifact bucket: MY_BUCKET_NAME. 工件存储桶的名称:MY_BUCKET_NAME。 Verify that this bucket exists. 验证此存储桶是否存在。 If it exists, check the life cycle policy, then try releasing a change. 如果存在,请检查生命周期策略,然后尝试发布更改。

In my codebuild project, I've set the artifact location to MY_BUCKET_NAME & named it aws-test-artifact. 在我的代码构建项目中,我将工件位置设置为MY_BUCKET_NAME并将其命名为aws-test-artifact。 Is this all I have to do? 这就是我要做的吗?

I've tried looking around and am unable to find anything on this issue. 我已尝试环顾四周,但无法在此问题上找到任何东西。

So I found the fix to this issue! 因此,我找到了解决此问题的方法! What I had to do was goto codebuild => edit project => Show advanced settings => Artifacts packaging 我要做的是转到代码构建 => 编辑项目 => 显示高级设置 => 工件包装

From here I changed Artifacts packaging to Zip ! 从这里我将Artifacts包装改为Zip

高级设置部分

I had the same problem. 我有同样的问题。 Just changed Input artifacts from BuildArtifact to SourceArtifact in the build stage, and everything worked. 刚刚在构建阶段将Input工件从BuildArtifact更改为SourceArtifact,一切正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用Elasticbeanstalk部署Flask时出现AWS mod_wsgi错误 - AWS mod_wsgi error when deploying Flask with elasticbeanstalk AWS CodePipeline ElasticBeanstalk部署失败 - AWS CodePipeline ElasticBeanstalk deploy failure terraform 基础设施在本地运行,在 aws 代码管道上构建和部署它会出错 - terraform infrastructure runs locally , building and deploying it on aws codepipeline gives error 部署 Flask 应用程序时,AWS ElasticBeanstalk 中出现 502 Bad Gateway 错误 - 502 Bad Gateway Error in AWS ElasticBeanstalk while deploying Flask Application 使用AWS Elasticbeanstalk部署Django App时出现WSGIPath错误 - WSGIPath Error while Deploying Django App using AWS Elasticbeanstalk 将Symfony 4应用程序部署到AWS Elasticbeanstalk - Deploying Symfony 4 Application to AWS Elasticbeanstalk 在 typescript 中部署项目时,CodePipeline 中出现错误“无法上传工件” - Error 'Unable to upload artifact' in CodePipeline when deploying a project in typescript (AWS) 中的 CodeBuild 和 CodePipeline 错误 - CodeBuild and CodePipeline error in (AWS) AWS CodePipeline 构建错误 - AWS CodePipeline Build error 如何使用AWS CodePipeline将dotnet核心应用程序部署到ElasticBeanstalk - How to deploy a dotnet core app using AWS CodePipeline to ElasticBeanstalk
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM