(cdk/pipelines): CFN InternalFailure when provisioning pipeline from CI/CD tutorial
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### Describe the bug
I am following the tutorial from https://docs.aws.amazon.com/cdk/v2/guide/cdk_pipeline.html#cdk_pipeline_define.
Bootstrap succeeds - it has admin access.
I run `cdk deploy` from the above section and I see the following in cloud formation in the PipelineStack events:
```
pipelinePipeline4163A4B1 | CREATE_FAILED | Internal Failure
```
I checked cloudtrail for more details on this issue - there is not a single cloudtrail event during the deployment that has an `Error Code` value - manual inspection of each resource prior to the rollback shows that there don't appear to be issues.
Any advice on how to investigate and fix the root cause of this failure would be appreciated!
### Expected Behavior
Successful cdk deploy
### Current Behavior
Internal Failure during PipelineStack create
### Reproduction Steps
Steps followed from Tutorial: https://docs.aws.amazon.com/cdk/v2/guide/cdk_pipeline.html#cdk_pipeline_bootstrap
1. `cdk bootstrap aws://ACCOUNT-NUMBER/REGION --cloudformation-execution-policies arn:aws:iam::aws:policy/AdministratorAccess`
2. Created github project
3. `cdk init app --language java`
4. In `src/main/java/com/myorg/MyPipelineStack.java`:
```
package com.myorg;
import java.util.Arrays;
import software.constructs.Construct;
import software.amazon.awscdk.Stack;
import software.amazon.awscdk.StackProps;
import software.amazon.awscdk.pipelines.CodePipeline;
import software.amazon.awscdk.pipelines.CodePipelineSource;
import software.amazon.awscdk.pipelines.ShellStep;
public class MyPipelineStack extends Stack {
public MyPipelineStack(final Construct scope, final String id) {
this(scope, id, null);
}
public MyPipelineStack(final Construct scope, final String id, final StackProps props) {
super(scope, id, props);
CodePipeline pipeline = CodePipeline.Builder.create(this, "pipeline")
.pipelineName("MyPipeline")
.synth(ShellStep.Builder.create("Synth")
.input(CodePipelineSource.gitHub("austinegri/TmpPipeline2", "mainline"))
.commands(Arrays.asList("npm install -g aws-cdk", "cdk synth"))
.build())
.build();
}
}
```
5. In `src/main/java/com/myorg/MyPipelineApp.java`:
```
package com.myorg;
import software.amazon.awscdk.App;
import software.amazon.awscdk.Environment;
import software.amazon.awscdk.StackProps;
public class MyPipelineApp {
public static void main(final String[] args) {
App app = new App();
new MyPipelineStack(app, "PipelineStack", StackProps.builder()
.env(Environment.builder()
.account("111111111111")
.region("us-east-1")
.build())
.build());
app.synth();
}
}
```
6.
```
git add --all
git commit -m "initial commit"
git push
cdk deploy
```
### Possible Solution
Unclear
### Additional Information/Context
_No response_
### CDK CLI Version
2.115.0 (build 58027ee)
### Framework Version
_No response_
### Node.js Version
Welcome to Node.js v20.10.0.
### OS
Ubuntu 22.04.3 LTS
### Language
Java
### Language Version
1.8
### Other information
https://github.com/austinegri/TmpPipeline2
Contributor guide
Research direction
Start with src/main/java/com/myorg/MyPipelineStack.java and MyPipelineApp.java, then reproduce the tutorial flow with cdk deploy. Inspect the PipelineStack CloudFormation events and CloudTrail data described in the issue; done means identifying and resolving the Internal Failure so the stack deploys successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, java
- Domain
- ci-cd, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100