Create a new Pipeline

Create a new Pipeline with CodePipeline

  1. Find and select CodePipeline.

0001

  1. Select Pipelines > Create pipeline.

0002

  1. For Pipeline name, enter fcj-aws-pipeline.
  • Pipeline type select V2.
  • Execution mode select Superseded.

0003

  1. For Service role select New service role, enter Role name then check Allow AWS CodePipeline to create a service role so it can be used with this new pipeline.

0004

  1. In Advanced settings, select Custom location then select Bucket we have prepared.

0005

  1. For Source provider select Github(Version 2).

0006

  1. Select Connection we have created then choose the repository to deploy.

0007

  1. Select the master branch and select Output artifact format as CodePipeline default.

0008

  1. Select Trigger as No filter, then click Next.

0009

  1. Select Build provider as AWS CodeBuild, then click Create project.

0010

  1. Project name enter fcj-aws-proj.

0011

  1. Select New service role then enter Role name.

0012

  1. Select Use a buildspec file.

0013

  1. Check Cloud watch logs checkbox, enter Group name and Stream name prefix. Click Continue to CodePipeline.

0014

  1. Select Build type as Single build. Select Next.

0015

  1. Select Deploy provider as AWS Elastic Beanstalk. Select Application name and Environment name created in the previous steps.

0016

  1. Review your choices and click Create pipeline.

0017

Although we have successfully created a new Pipeline, our Pipeline still can’t run. That because the CodePipeline Service Role doesn’t have permissions to perform actions on the Elastic Beanstalk environment. So that we have to add policy to the Service Role to make it work.