AWS CodePipeline throwing error "Missing required parameter in pipeline.stages[0]: "name""

0

I am trying to create a CICD of my application that is available on Bitbucket. For this, I have created AWS CodePipeline that will deploy this app to ECS Cluster. I am trying to do this via AWS CLI. Here is my JSON file:

{
    "pipeline": {
        "roleArn": "arn:aws:iam::xxxxxxxxxxxx:role/service-role/AWSCodePipelineServiceRole-us-east-1-HubspotConnector",
        "stages": [{
                "Name": "Source",
                "Actions": [{
                    "InputArtifacts": [],
                    "ActionTypeId": {
                        "Version": "1",
                        "Owner": "AWS",
                        "Category": "Source",
                        "Provider": " "
                    },
                    "OutputArtifacts": [{
                        "Name": "SourceArtifact"
                    }],
                    "RunOrder": 1,
                    "Configuration": {
                        "ConnectionArn": "arn:aws:codestar-connections:us-east-1:7xxxxxxxx3930:connection/5bxxxx2-257f-4xxxxx0-xxx3-edfdsfsdf7d672f",
                        "FullRepositoryId": "rxxxxxh/hubspotcctorpipeline",
                        "BranchName": "main",
                        "OutputArtifactFormat": "CODE_ZIP"
                    },
                    "Name": "ApplicationSource"
                }]
            },
            {
                "name": "Build",
                "actions": [{
                    "inputArtifacts": [{
                        "name": "SourceArtifact"
                    }],
                    "name": "Build",
                    "actionTypeId": {
                        "category": "Build",
                        "owner": "AWS",
                        "version": "1",
                        "provider": "CodeBuild"
                    },
                    "outputArtifacts": [{
                        "name": "default"
                    }],
                    "Configuration": {
                        "ProjectName": "cicdCli"
                    },
                    "runOrder": 1
                }]
            },
            {
                "Name": "DeployECS",
                "ActionTypeId": {
                    "Category": "Deploy",
                    "Owner": "AWS",
                    "Provider": "ECS",
                    "Version": "1"
                },
                "RunOrder": 2,
                "Configuration": {
                    "ClusterName": "my-ecs-cluster",
                    "ServiceName": "sample-app-service",
                    "FileName": "imagedefinitions.json",
                    "DeploymentTimeout": "15"
                },
                "OutputArtifacts": [],
                "InputArtifacts": [{
                    "Name": "my-image"
                }]
            }
        ],
        "artifactStore": {
            "type": "S3",
            "location": "codepipeline-us-east-1-1xxx5xxxx29"
        },
        "name": "newPipelineCicd",
        "version": 1
    }
}

Here is the error I am facing: Error

Can Someone describe me what I am doing wrong? I have searched for these errors but didn't get any help from anywhere. Also no one have written any tutorial or proper guide for this. I have found AWS documentation, one of the complexest documentations. Please guide me here.I would really appreciate that.

1 Antwort
1
Akzeptierte Antwort

The parameter names are case sensitive for the AWS CLI input files.

We recommend that you use the --generate-cli-skeleton option to generate the template with the "correct" parameter names to avoid errors.

aws codepipeline create-pipeline --generate-cli-skeleton

Please refer to the CLI Skeleton Templates documentation.

profile pictureAWS
beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen