Practical examples
In this final section, we will go through the CI/CD pipeline for the serverless example we used earlier in the API-driven communication for serverless section.
For this case, we will use AWS CodePipeline. Why should we use this tool for the example? AWS CodePipeline is deeply integrated with many AWS services, including a serverless ecosystem. We would also like to bring your attention to one bad practice that is used very often.
CodePipeline has two distinct CI/CD components. It contains AWS CodeBuild for building the artifacts (the CI part), and AWS CodeDeploy for deployments (the CD part). However, we very often see that CodeDeploy is not used and that all steps in the pipeline are built with CodeBuild.
There are a few reasons why:
- Use of CodeDeploy is not possible: In many cases, we cannot use CodeDeploy, as this service does not allow us to prepare the scripts or commands.
- Too much complexity: CodeBuild is simple in its construction. It...