All Questions
Tagged with aws-cloudformation aws-codepipeline
219
questions
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/...
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, ...
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"
...
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 ...
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 ...
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: [...
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
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
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
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
1
answer
2k
views
Least privilege AWS IAM policy for cloudformation
For small CloudFormation and CodePipeline templates we could "try - test" to get least privilege IAM Policy for the roles required.
This usually involves:
Starting with a minimal policy
Creating ...
10
votes
2
answers
9k
views
CodePipeline CloudFormation Template configuration
I'm trying to use the CloudFormation Template configuration field in a CodePipeline. If you edit the CloudFormation in CodePipeline it looks like this:
If my InputArtifactName is MyAppBuild and I ...
8
votes
2
answers
12k
views
AWS CDK Pipeline Error - No stack found matching "xxxxx"
I am having a hard time with the last CDK Pipeline I have deployed. I have followed the steps here:https://docs.aws.amazon.com/cdk/latest/guide/cdk_pipeline.html and the overall experience has been ...
8
votes
1
answer
7k
views
CloudFormation passing parameters from CodePipeline
I have a SAM application and a CodePipeline setup to deploy it. I want to pass parameters down from my Pipeline into the SAM's YAML file. I tried using ParameterOverrides but seem to still get:
...
8
votes
2
answers
1k
views
API Gateway with SAM isn't updated correctly
We use Cloud Formation for define a bunch of Lambda functions:
AWSTemplateFormatVersion: '2010-09-09'
Transform:
- 'AWS::Serverless-2016-10-31'
Resources:
MyLambda:
Type: 'AWS::Serverless::...
7
votes
1
answer
5k
views
Invoke Lambda from CodePipeline with multiple UserParameters
This tutorial shows how to Invoke a Lambda from CodePipeline passing a single parameter:
http://docs.aws.amazon.com/codepipeline/latest/userguide/how-to-lambda-integration.html
I've built a ...
7
votes
2
answers
3k
views
aws CAPABILITY_AUTO_EXPAND console web codepipeline with cloudformation
I am trying to complete a codepipeline with the cloudformation service and this error is generated. It must be said that the separate cloudformation service works well. The complete error is:
...
7
votes
1
answer
2k
views
How to work around Cfn action's character limit in CodePipeline
Using the AWS CDK, I have a CodePipeline that produces build artifacts for 5 different Lambda functions, and then passes those artifacts as parameters to a CloudFormation template. The basic setup is ...
7
votes
2
answers
4k
views
AWS CodePipeline: pass Lambda function output to CloudFormation
i want to run a CloudFormation template with CodePipeline. This template is expecting an input parameter which needs to contain the current Date/Time. Unfortunately CloudFormation isn't able to ...
7
votes
1
answer
6k
views
Why do I get the error "Code uncompressed size is greater than max allowed size of 272629760" only for some deployment targets?
As part of an AWS CodePipeline in an AWS CodeBuild action I deploy resources created with the Serverless Framework to a "UAT" (user acceptance testing) stage.
The pipeline runs in its own ...
7
votes
2
answers
2k
views
How to deploy a CloudFormation stack using CodePipeline when both, the cfn template and the pipeline where created using the AWS CDK?
Using the AWS CDK I created a simple stack with an auto scaling group, and also define launch configuration resource to execute some powershell scripts during the ec2 instance creation. The scripts ...
6
votes
2
answers
8k
views
ActionConfiguration Map value must satisfy constraint: [Member must have length less than or equal to 1000
This is my codepipeline deploy stage:
- Name: Deploy-Dev
Actions:
- Name: Deploy
ActionTypeId:
Category: Build
Owner: AWS
Version: 1
Provider: CodeBuild
...
6
votes
1
answer
6k
views
CloudFormation to setup CodePipeline/CodeBuild to deploy SAM application
I have successfully setup CodePipeline and CodeBuild to deploy my SAM applications. But now I want to convert this to CloudFormation. How do I do this? I followed the steps here http://docs.aws.amazon....
6
votes
3
answers
7k
views
CodePipeline unable to locate SAM template yaml file
I'm attempting to setup AWS Codepipeline with a Cloudformation SAM stack that deploys to a Lambda and am doing this via the Pipeline console. The pipeline passes the clone from Codecommit process and ...
6
votes
2
answers
3k
views
Manage stage and prod environments in AWS SAM/Cloudformation template along with CI/CD support
I'm having an AWS SAM template file with some resources hosted on github, a codepipeline has been setted up to detect changes in the repo then create/update and execute changes on cloudformation stack....
6
votes
1
answer
11k
views
AWS cloudformation - Stack exists but with non-updatable status: ROLLBACK_COMPLETE
I'm following this tutorial: https://github.com/awslabs/codepipeline-nested-cfn
and running into this error after running the following command:
aws cloudformation create-stack --stack-name ...
5
votes
2
answers
11k
views
How Do You Add Environment Variables to CodeBuild buildspec.yml?
I'm trying to use a CloudFormation template to define CodeBuild and CodePipeline to automate the deployment of a static website hosted in an S3 bucket. To give credit where credit's due, I'm largely ...
5
votes
2
answers
5k
views
CodePipeline: How to reference nested CloudFormation Stacks from GitHub as Source
Our CloudFormation templates are stored in GitHub. Inside CodePipeline we're using GitHub as our Source, but we can't reference nested CloudFormation Stacks when they're not stored on S3.
How can we ...
5
votes
2
answers
10k
views
Unknown Cloudformation error / Failure to execute changeset
I'm working on setting up my Java AWS lambda functions to be deployed via Codepipeline -> Cloudformation and am having some difficulty with Cloudformation. I've worked with Terraform before, so I ...
5
votes
2
answers
5k
views
Deploying a python package to AWS Lambda via Cloudformation, CodeBuild and CodePipeline
I want to setup a CI/CD pipeline for my AWS infrastructure and a AWS Lambda function. The idea is to have everything in code, version-controlled and automated. I just want to git push to a repository ...
5
votes
2
answers
5k
views
Deploy previous version in AWS Codepipeline
I am new to AWS and trying to create a pipeline for CICD. Stages involved in my pipeline are:
Source -> Codecommit
Build -> Codebuild project
Deploy using Cloudformation
I am able to complete the ...
5
votes
4
answers
2k
views
Update Existing Lambda Function Using AWS Continuous Integration/Deployment
I have several AWS Lambda Functions created using AWS Console and every function has some dependent APIs.Now I want to integrate the same with AWS CI/CD using CodeBuild, CodePipeline, and ...
5
votes
1
answer
6k
views
AWS Cloudformation stuck in UPDATE_ROLLBACK_FAILED
I deploy my AWS Lambdas via AWS Serverless Application Model (SAM). One of my Lambdas uses Numpy which I reference via a 3rd party layer from Klayers by @keithRozario. I was using Klayers-python38-...
4
votes
2
answers
3k
views
AWS pipeline with cross-account CodeCommit repo as Source
I need to create a pipeline with CDK that will trigger a deploy in CloudFormation based on a branch in a CodeCommit repo. If the CodeCommit repo was in the same account as the pipeline, I would use ...
4
votes
2
answers
3k
views
AWS CodePipeline: How to pass output from CloudFormation action to a CodeBuild action
I have an AWS CodePipeline defined in a CloudFormation template.
One of the steps of the pipeline is a CloudFormation action that builds a test environment for my application. The URL of the app's ...
4
votes
1
answer
4k
views
How do I get Cloud Formation to create a changeset to update my Lambda functions?
I have a Lambda function which I've verified to work correctly. I'm able to update the function by hand on the command line using "update-function-code" but I've been trying to get it working with ...
4
votes
3
answers
1k
views
How to create an ECS task in CloudFormation before the CodePipeline is created
I'm trying to define my ECS stack in Cloudformation, including the CI/CD pipeline and ECR repository. However you run into a bit of a conundrum in that:
To create an ECS task definition (AWS::ECS::...
4
votes
1
answer
2k
views
How can you update a CloudFront distribution Lambda@Edge reference based on a CodePipeline build?
My situation is:
I have a CloudFront distribution managed by CloudFormation that, amongst other things, needs to pass certain requests to an Edge Lambda.
I have a CodePipeline that builds new ...
4
votes
0
answers
220
views
Add Snyk Action to CodePipeline with CloudFormation
I wanted to spin up a CodePipeline on AWS with a Snyk Scan action through CloudFormation. The official documentation on how to do this is a little light on details and seems to be missing key bits of ...
4
votes
0
answers
195
views
accessing github organisation repos in cloudformation
is there a way to access github organisation repos when creating a cloudformation template for Pipelines? I can access my personal repos using a standard personal access token, but when putting in my ...
3
votes
1
answer
3k
views
Can CloudFormation Create a PipeLine Manual Approval Action through Template?
Reading through this https://docs.aws.amazon.com/codepipeline/latest/userguide/approvals-action-add.html
it sounds like you can only create a manual approval step through the UI Console or through ...
3
votes
2
answers
1k
views
Unable to execute AWS Pipeline Error: "An error occurred (AccessDenied) when calling the PutObject operation: Access Denied"
Have been trying to setup an AWS pipeline following the tutorial here: https://docs.aws.amazon.com/lambda/latest/dg/build-pipeline.html
But the pipeline continously fails with below error logs:
Here ...
3
votes
1
answer
3k
views
Create CodePipeline Notification Rule using CloudFormation
I'm building a CodePipeline stack using CloudFormation. Everything works flawlessly. One element I am unable to add is the Notification rule using CloudFormation Template and I cannot find any ...
3
votes
6
answers
3k
views
Is there any way to stop AWS from starting CodePipeline automatically if I deploy it via CloudFormation?
If you create a CodePipeline via CloudFormation. It starts it automatically, that can be a problem because the pipeline can rewrite the same stack...
Is there any way to disable this behaviour?
Thanks....
3
votes
1
answer
2k
views
Deploy Lambda Function using CodePipeline and CDK generated CloudFormation Template
I have a Lambda function that I'm trying to deploy using CodePipeline.
The Lambda function source code is in the same project as the Lambda CDK app. Since they are both in the same repository, the ...
3
votes
4
answers
1k
views
AWS API Gateway: How to achieve continuous delivery?
I'm building an API using AWS API Gateway and AWS Lambda. I would like to achieve continuous delivery for this API. The path I've chosen to do it is to use CloudFormation through AWS CodePipeline. I'...
3
votes
1
answer
1k
views
Pass AWS CodePipeline variable to actions
I'm trying to pass the CodePipeline variable #{codepipeline PipelineExecutionId} to both the codeBuild action and then a deploy action.
I understand this variable is readily available to all actions ...
3
votes
2
answers
2k
views
Timeout configuration for CloudFormation
I am running CloudFormation updates to ECS. Triggered by CodePipeline. I would like to abort the CloudFormation deployment and rollback to the previous version after a timeout.
What is the best way ...