Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Building and Delivering Microservices on AWS

You're reading from   Building and Delivering Microservices on AWS Master software architecture patterns to develop and deliver microservices to AWS Cloud

Arrow left icon
Product type Paperback
Published in May 2023
Publisher Packt
ISBN-13 9781803238203
Length 602 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Amar Deep Singh Amar Deep Singh
Author Profile Icon Amar Deep Singh
Amar Deep Singh
Arrow right icon
View More author details
Toc

Table of Contents (21) Chapters Close

Preface 1. Part 1: Pre-Plan the Pipeline
2. Chapter 1: Software Architecture Patterns FREE CHAPTER 3. Chapter 2: Microservices Fundamentals and Design Patterns 4. Chapter 3: CI/CD Principles and Microservice Development 5. Chapter 4: Infrastructure as Code 6. Part 2: Build the Pipeline
7. Chapter 5: Creating Repositories with AWS CodeCommit 8. Chapter 6: Automating Code Reviews Using CodeGuru 9. Chapter 7: Managing Artifacts Using CodeArtifact 10. Chapter 8: Building and Testing Using AWS CodeBuild 11. Part 3: Deploying the Pipeline
12. Chapter 9: Deploying to an EC2 Instance Using CodeDeploy 13. Chapter 10: Deploying to ECS Clusters Using CodeDeploy 14. Chapter 11: Setting Up CodePipeline Code 15. Chapter 12: Setting Up an Automated Serverless Deployment 16. Chapter 13: Automated Deployment to an EKS Cluster 17. Chapter 14: Extending CodePipeline Beyond AWS 18. Index 19. Other Books You May Enjoy Appendix

Creating the appspec file

To create an appspec.yml file in our aws-code-pipeline microservice, perform the following steps:

  1. Open the Visual Studio (VS) Code integrated development environment (IDE), click File | New File…, and provide appspec.yml as the name:
Figure 9.10 – VS Code creates a new appspec.yml file

Figure 9.10 – VS Code creates a new appspec.yml file

  1. Add the following code to the appspec.yml file and click File | Save. In this file, we are specifying the version of the CodeDeploy appspec file as 0.0 and os as Linux as we plan to deploy our application on a Linux system-based EC2 instances. In the files section, we wanted to copy everything from our deployment ZIP file to the home folder of ec2-user, and we have specified that ec2-user is the owner of all the files and has the required permissions to execute scripts. In the hooks section, we have specified two deployment lifecycle events that will be used by the CodeDeploy agent to execute the start.sh script on...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime