Questions tagged [aws-codepipeline]
AWS CodePipeline is a continuous delivery service for fast and reliable application updates. CodePipeline builds, tests, and deploys your code every time there is a code change, based on the release process models you define.
1,547
questions
61
votes
10
answers
46k
views
AWS Pass in variable into buildspec.yml from CodePipeline
I have an AWS CodePipeline that invokes CodeBuild in the Build Stage.
The question is how do I pass in an environment variable from CodePipeline that can be read in the CodeBuild's buildspec.yml?
I ...
59
votes
10
answers
23k
views
Unable to delete cfn stack, role is invalid or cannot be assumed
I'm new to aws cloudformation; I'm wondering if anybody knows of a way to force delete a stack when it just won't delete. It fails with this error:
Failed to delete stack: Role arn:aws:iam::role/...
44
votes
7
answers
32k
views
CodeBuild execution continues after build fails instead of stopping
I'm building a CI/CD pipeline using git, codebuild and elastic beanstalk.
During codebuild execution when build fails due to syntax error of a test case, I see codebuild progress to next stage and ...
39
votes
4
answers
71k
views
How do I update a CloudFormation stack with state UPDATE_ROLLBACK_COMPLETE?
Is it impossible to update a CloudFormation stack once it goes into the UPDATE_ROLLBACK_COMPLETE state? I am using CodePipeline to deploy things. I find that once a stack goes into some invalid state, ...
38
votes
5
answers
22k
views
AWS CodePipeline not able to access Organization's repositories
I am trying to setup Continuous deployments pipelines in AWS Codepipeline.
While creating a pipeline I provide "Source provider" as GitHub and then connect to GitHub.
I am able to see my public ...
34
votes
3
answers
24k
views
Codepipeline: Insufficient permissions Unable to access the artifact with Amazon S3 object key
Hello I created a codepipeline project with the following configuration:
Source Code in S3 pulled from Bitbucket.
Build with CodeBuild, generating an docker image and storing it into a Amazon ECS ...
32
votes
3
answers
38k
views
Terraform, "ignore_changes" and sub-blocks
I have a AWS CodePipeline configured in a terraform file, like this:
resource {
name = "Cool Pipeline"
...
stage {
name = "Source"
...
action {
name =...
31
votes
2
answers
17k
views
How to make a list item conditional in Cloud Formation template?
I have the following cloud formation template that creates a code pipeline. The pipeline has three stages:
Stages:
-
Name: "Source"
Actions:
-
Name: "Source"
...
31
votes
4
answers
29k
views
AWS CodeBuild failed CLIENT_ERROR: authorization failed for primary source and source version
I have already authenticated the GitHub account.
My AWS CodePipeline is failing with this error:
CLIENT_ERROR: authorization failed for primary source and source version
28
votes
4
answers
53k
views
Execute Terraform apply with AWS assume role
I need to execute a Terraform template to provision infrastructure for an AWS account which I can access by assuming a role.
The problem I have now is I do not have an IAM user in that AWS account so ...
27
votes
8
answers
39k
views
AWS CodeBuild + CodePipeline: "No matching artifact paths found"
I am attempting to get CodePipeline to fetch my code from GitHub and build it with CodeBuild. The first (Source) step works fine. But the second (Build) step fails during the "UPLOAD_ARTIFACTS" part. ...
25
votes
1
answer
8k
views
AWS CodePipeline: source action has insufficient permissions for CodeStar connection
I'm setting up a CodePipeline, and I created an action to fetch the source from GitHub.
This requires to set up a connection, which I did, and things look fine also on GitHub's side.
However, if I ...
25
votes
2
answers
22k
views
When do I need to have CAPABILITY_NAMED_IAM
I was editing my CloudFormation templates and suddenly AWS tells me I need CAPABILITY_NAMED_IAM. I am curious as to which change triggers this?
What is a named IAM resource?
Before I already "name"...
24
votes
5
answers
27k
views
Use CAPABILITY_AUTO_EXPAND for nested stacks on CloudFormation
I am trying to use nested stack and when my ChangeSet is being executed, I got this error:
Requires capabilities : [CAPABILITY_AUTO_EXPAND]
I went and create a pipeline with cloudformation.
This ...
23
votes
8
answers
25k
views
I'm trying to integrate Bitbucket into AWS Code Pipeline? What is the best approach?
I want to integrate my code from Bitbucket into AWS Code Pipeline. I unable to find proper examples on the same. My source code is in .Net.
Can someone please guide me.
Thanks.
22
votes
4
answers
28k
views
What are the pros and cons of using AWS CodePipeline vs Jenkins
What are the pros and cons of using AWS CodePipeline vs Jenkins?
I can't see a whole lot of info on the interwebs (apart from https://stackshare.io/stackups/jenkins-vs-aws-codepipeline). As far as I ...
21
votes
2
answers
14k
views
CodePipeline: ECR source + ECS deploy configuration
Basically, I need to configure CI/CD with bitbucket source code to ECS containers. I want to use CodePipline to deploy new ECR image to ECS.
Currently, there is no option in AWS CodePipline to ...
20
votes
6
answers
32k
views
AWS Codebuild fails while downloading source. Message: Access Denied
I created a CodeBuild Project that uses a docker image for node8. The purpose of this CodeBuild project is to do unit testing. It takes an input artifact from CodeCommit. And in the buildspec.yml it ...
19
votes
5
answers
7k
views
Upload to S3 failed with the following error: Access Denied - CodeStarConnections
I am building a CI/CD pipeline using AWS Codepipeline, the repository source is on bitbucket and I used the AWS-Codestarconnections to create a connection between the bitbucket repository and the ...
18
votes
4
answers
28k
views
AWS Cloud Formation Stuck in Review_In_Progress
I was trying to set up AWS Code Pipeline with AWS SAM for Lambda using Java-8 as mentioned in the documentations
http://docs.aws.amazon.com/lambda/latest/dg/automating-deployment.html
(example is in ...
18
votes
5
answers
16k
views
AWS Cloudformation Role is not authorized to perform AssumeRole on Role
I am trying to execute a cloudformation stack which contains the following resources:
Codebuild project
Codepipeline pipeline
Roles needed
While trying to execute the stack, it fails with the ...
16
votes
3
answers
9k
views
Export existing CodePipeline/CodeBuild projects to Cloudformation
Is there a way to export existing CodePipeline/CodeBuild projects to Cloudformation?
I'm in the process of converting our existing CI/CD infrastructure into code so it would be easy to replicate them ...
16
votes
3
answers
5k
views
AWS Codepipeline with a Codecommit targetsource repository from another account
Is it possible to create a codepipeline that has a target source of a CodeCommit Repository in another account?
16
votes
6
answers
16k
views
Cannot have more than 0 builds in queue for the account
I'm newbie in AWS, with my free tier account I'm trying to build my nodeJS project with AWS CodeBuild but I get this error:
Build failed to start The build failed to start. The following error ...
15
votes
1
answer
8k
views
Conditionally create CodePipeline actions based on CloudFormation conditions
Enable / disable sections of a CloudFormation for CodePipeline using Conditionals:
This creates a manual notification action once staging has been built and passed Runscope tests:
- InputArtifacts: [...
15
votes
6
answers
8k
views
SNS notification target rule is "unreachable" when tryin to send a notification from code pipeline
I am trying to set up a notification for the code pipeline using its notification rule which supporters SNS.
As you can see in the picture the status is "unreachable"
If I look at the link ...
15
votes
5
answers
6k
views
Github monorepo as source for AWS CodePipeline
We use the monorepo approach for storing our source in github.
Is it currently possible to have CodePipeline trigger only on a commit to a particular subfolder.
This is something that is currently ...
15
votes
2
answers
5k
views
AWS codeBuild/codePipeline with serverless framework
I am trying to automate Deployment Pipeline for my application. Here is the automation architecture, I came up with:
As you can see, I am using codePipeline and codeBuild to automate my deployment. ...
14
votes
5
answers
16k
views
Getting Commit ID in CodePipeline
I am using CodePipeline with CodeCommit. Builds are triggered automatically with push to master branch. In CodePipeline console it is clearly visible that i am receiving commit id but i need to get it ...
14
votes
3
answers
8k
views
AWS codepipe webhooks
After creating aws codepipeline, am getting error like
Could not register webhook . The webhook was created, and your pipeline was updated, but the webhook could not be registered with GitHub. Wait ...
14
votes
3
answers
22k
views
AWS CodePipeline, build failed & getting error as YAML_FILE_ERROR M
I'm new to AWS CodePipeline and never had past experience with any continuous integration tool like Jenkins, etc. I have created a new AWS CodePipeline as AWS CodeCommit (Code repository) -> CodeBuild ...
14
votes
1
answer
8k
views
Using IAM roles on the AWS CodeBuild worker
Is there a way to grant IAM instance roles to be used by the build process?
In my particular case I need to perform some s3 operations during build (unrelated to archiving artifacts).
So far the ...
14
votes
2
answers
5k
views
Viewing Unit Test and Coverage Reports Generated in AWS CodeBuild
I am using AWS CodeBuild to run unit tests for my python project using pytest. I am using the --junitxml argument and the pytest-cov package to generate test reports and coverage reports that I've ...
13
votes
2
answers
16k
views
Use two sources in an AWS-CodePipeline pipeline
I have a specific case which I'm not sure if it's possible with AWS CodePipeline. I'm not able to find any information about such scenario in the documentation and google.
So I would like to know if I ...
13
votes
2
answers
12k
views
How to handle multiple environments in CodePipeline?
I'm using code pipeline to deploy my infrastructure and I would like to be able to deploy it in different environments (dev, staging, prod,...).
I currently have a buildspec.yml file containing some "...
12
votes
5
answers
12k
views
AWS CodeBuild GetAuthorizationToken failed
I'm trying to build my testing project, but everytime It failed in pre_build. I check the error log and it says:
[Container] 2017/03/26 19:28:21 An error occurred (AccessDeniedException) when ...
12
votes
5
answers
7k
views
AWS CodePipeline build lacks Git history
Context:
I have a CodePipeline set up that uses CodeCommit and CodeBuild as its source and build phases.
My build includes a plugin (com.zoltu.git-versioning) that uses the Git commit history to ...
12
votes
1
answer
2k
views
AWS CloudFormation CodePipeline: Could not fetch the contents of the repository from GitHub
I'm attempting to setup an AWS CloudFormation configuration using CodePipeline and GitHub.
I've failed both at my own example project and the tutorial: Create a GitHub Pipeline with AWS ...
12
votes
5
answers
5k
views
Working with manual approvals for multiple builds in AWS CodePipeline
We have a CodePipeline set up to do a build, deploy to a QA ECS environment, then a manual approval step to deploy to Prod.
What gets confusing though, is when there are several builds running one ...
12
votes
3
answers
2k
views
Custom version label with aws code pipeline
I'm using AWS CodePipeline with CodeBuild to build and deploy my application to ElasticBeanstalk.
CodePipeline generates version names like this:
code-pipeline-1122334455667-MyApp-1ac31f7c-1343-471x-...
12
votes
2
answers
15k
views
How to trigger AWS Codebuild When Creating Pull Request in CodeCommit?
Our ci workflow is this
run eslint in precommit
push to feature branch
open pull request in codecommit
trigger aws code build run tests
if all tests passed, merge
trigger aws code deploy to deploy
...
12
votes
2
answers
19k
views
CannotPullContainerError: Error response from daemon: pull access denied for ECR Repo Image, repository does not exist or may require 'docker login'
I have pushed a docker image in an ECR Repo in SourceAccount.
I have deployed a codepipeline in the SourceAccount.
When that codepipeline is run, it deploys ECS stack in TargetAccount. In that ...
11
votes
3
answers
11k
views
Unable to create pipeline because of service role
Even though I have created just a role specific to codepipeline and code build I am getting this error. Whatever I do I am unable to get rid of it. Anyone know how to resolve this?
Could not update ...
11
votes
1
answer
3k
views
CodePipeline: CodeDeploy reports "BundleType must be either YAML or JSON"
buildspec.yml:
version: 0.2
phases:
build:
commands:
- echo Build started on `date`
- echo Compiling the Python code...
- python HelloWorld_tst.py
post_build:
...
11
votes
3
answers
9k
views
CodeDeploy to S3
I have a site in a S3 bucket, configured for web access, for which I run an aws s3 sync command every time I push on a specific git repository (I'm using Gitlab at the moment).
So if I push to stable ...
11
votes
3
answers
7k
views
How to use output artifact of CodeBuild in CloudFormation?
So I have a fairly simple stack I'm trying to setup consisting of a single Lambda function subscribed to an SNS topic. I'd like to use CodePipeline with three stages: Source (GitHub) -> Build (...
11
votes
1
answer
16k
views
Code Build Access denied while downloading artifact from S3
My CodeBuild is configured with CodePipeline. S3 is my artifact store. I continue to get an Access denied message despite having attached IAM roles with sufficient access.
Screenshot of the error ...
11
votes
2
answers
61k
views
AWS CodePipeline error: Cross-account pass role is not allowed
I am trying to create an AWS CodePipeline that deploys the production code to a separate account. The code consists of a lambda function which is setup using a sam template and cloudformation. I have ...
11
votes
2
answers
3k
views
AWS CodeBuild - EnvironmentVariables specified in action config does not match expected format
I'm trying to add an environment variable to a Pipeline action that uses AWS Codebuild. However, no matter what I add, if I choose a type of Secret Manager, the step fails with the following error:
...
11
votes
3
answers
9k
views
Error in AWS codepipeline when deploying ElasticBeanstalk
I've created a pipeline which does the following:
Git changes trigger next action (code build)
Codebuild initiates & builds a docker image from git source
Set latest docker container up on ...