Alex R
Alex R

Reputation: 11893

CodePipeline failing with "The action failed because either the artifact or the Amazon S3 bucket could not be found."

I have the following pipeline definition:

  Pipeline:
    Type: 'AWS::CodePipeline::Pipeline'
    Properties:
       Name: !Ref AppName
       RoleArn: {"Fn::GetAtt" : ["PipelineServiceRole", "Arn"] }
       ArtifactStore:
          Type: S3
          Location: !Ref ArtifactBucket
       Stages: 
        - 
          Name: Source
          Actions: 
            - 
              Name: SourceAction
              ActionTypeId: 
                Category: Source
                Owner: AWS
                Version: 1
                Provider: S3
              OutputArtifacts: 
                - Name: "PipelineArtifact"
              Configuration: 
                S3Bucket: !Ref ArtifactBucket
                S3ObjectKey: !Ref ArtifactName
                PollForSourceChanges: true
              RunOrder: 1
        - 
          Name: Deploy
          Actions: 
            - 
              Name: DeployAction
              ActionTypeId: 
                Category: Deploy
                Owner: AWS
                Version: 1
                Provider: ElasticBeanstalk
              InputArtifacts: 
                - Name: "PipelineArtifact"
              Configuration:
                ApplicationName: !Ref EbApplication
                EnvironmentName: !Ref EbEnvironment

The source stage completes successfully but then I get this error in the Deploy stage:

Error Message

I already checked that the artifact is at the expected location in S3 and the PipelineServiceRole has full permissions (literally */*).

What could be causing this error?

Upvotes: 0

Views: 1291

Answers (1)

Alex R
Alex R

Reputation: 11893

For Provider: ElasticBeanstalk, the S3ObjectKey MUST point to a .zip file.

(and no, a .jar won't work)

Upvotes: 1

Related Questions