- Newest
- Most votes
- Most comments
The EGoxXMO value is not an Elastic Beanstalk application artifact name that you need to reproduce. It is the S3 object key for a CodePipeline artifact in that particular pipeline execution. CodePipeline passes artifacts between actions by their logical artifact names.
For a Source -> CodeBuild -> Elastic Beanstalk pipeline, check the action wiring:
- Source output: for example,
SourceArtifact - CodeBuild input:
SourceArtifact - CodeBuild output: for example,
BuildArtifact - Elastic Beanstalk deploy input:
BuildArtifact
The Elastic Beanstalk deploy action accepts exactly one input artifact. It does not search the bucket for an object whose key looks like an application name.
The buildspec shown in the question contains only version: 0.2, so it does not tell CodeBuild which files form the deployment output. If CodeBuild is required, first create a directory containing the completed Elastic Beanstalk source bundle, then export that directory. For example:
version: 0.2 phases: build: commands: - <build the application and prepare eb-bundle> artifacts: base-directory: eb-bundle files: - '**/*' - '.ebextensions/**/*' discard-paths: no
Replace the placeholder command with the actual build. For the Java SE platform, the artifact root should contain the runnable JAR and normally a Procfile; if there is more than one JAR in the bundle root, the Procfile is required. Do not put an extra parent directory around the bundle contents.
If the repository is already a valid Elastic Beanstalk source bundle and no compilation is needed, the simpler option is to remove the CodeBuild stage and configure the Elastic Beanstalk action to consume SourceArtifact directly.
Before rerunning, download the current execution's CodeBuild output artifact and inspect its ZIP. The runnable JAR, Procfile, and any .ebextensions files should be at the paths expected by Elastic Beanstalk. If that ZIP is correct, then inspect the pipeline definition rather than renaming files in S3: the deploy action's input artifact name must exactly match the preceding action's output artifact name.
Official references:
answered a month ago
Relevant content
asked 4 years ago
