In a command prompt or terminal, run the get-pipeline command and copy the output to the JSON file. For example, if a pipeline is called PacktPipelineDemo, then you can type the following command:
aws codepipeline get-pipeline --name PacktPipelineDemo >mypackt.json
The output of this command is stored in the mypackt.json file. Open this file in a text editor and change the value to reflect the structure you want. You must change the pipeline name. Apart from that, you should consider using the same Amazon S3 bucket where artifacts are stored, the source location, deployment provider, and other details. Once you have modified the changes, then you must manually create the AWS CloudWatch Event rules to detect the changes. ...