To get the most out of this book
To follow along and experiment with the templates provided with this book, you will need to configure your development environment according to the following steps:
- Install Node Version Manager (https://github.com/nvm-sh/nvm) or (https://github.com/coreybutler/nvm-windows)
- Install the latest version of Node.js with
nvm install node
- Create an AWS account (https://aws.amazon.com/free) and configure your credentials for the Serverless Framework (https://www.serverless.com/framework/docs/providers/aws/guide/credentials)
- Download the templates: (https://github.com/jgilbert01/templates) and (https://github.com/jgilbert01/micro-frontend-template)
- Run the project scripts, such as:
$ npm ci $ npm test $ npm run test:int $ npm run dp:np:w
Download the example code files
The code bundle for the book is hosted on GitHub at https://github.com/jgilbert01/templates and https://github.com/jgilbert01/micro-frontend-template. We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!
Download the color images
We also provide a PDF file that has color images of the screenshots and diagrams used in this book. You can download it here: https://packt.link/gbp/9781803235448
Conventions used
There are a number of text conventions used throughout this book.
Code in text
: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: “We can implement the same role-based assertions in GraphQL by decorating the model with directives, such as @hasRole
e.”
A block of code is set as follows:
export const forRole = (role) => (req, res, next) => {
const groups = getUserGroups(req);
if (groups.includes(role)) return next();
else res.error(401, 'Unauthorized');
}
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
toUpdateRequest: (uow) => ({
Key: {
pk: uow.event.thing.id,
sk: 'Thing',
},
...updateExpression({
name: uow.event.thing.name,
ttl: uow.event.timestamp + (60*60*24*33) // 33 days
}),
}),
Bold: Indicates a new term, an important word, or words that you see on the screen. For instance, words in menus or dialog boxes appear in the text like this. For example: “Software as a Service (SaaS) products typically provide a well-documented open API for invoking their functionality.”
Warnings or important notes appear like this.
Tips and tricks appear like this.
There is a concise diagramming convention used throughout this book. Serverless services have multiple resources, which can clutter diagrams with a lot of connecting arrows. The following sample diagram demonstrates how we minimize the number of arrows by placing related resources adjacent to each other so that they appear to touch. The nearest arrow implies the flow of execution or data. In this sample diagram, the arrow on the left indicates that the flow moves through the API gateway to a function and into the database, while the arrow on the right indicates the flow of data out of the database stream to a function and into the event bus. These diagrams are created using Cloudcraft (https://cloudcraft.co).
Figure: Demonstration of flow
The following table provides a legend of the most common icons used in the diagrams throughout the book.
Figure: Resource icon legend
The software architecture patterns in this book are cloud provider agnostic. However, I use AWS to implement the examples and AWS-specific icons in the diagrams. The preceding table enumerates various cloud provider resources that you could use to implement these patterns on the major cloud providers.
Get in touch
Feedback from our readers is always welcome.
General feedback: If you have questions about any aspect of this book, email us at customercare@packtpub.com
and mention the book title in the subject of your message.
Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packtpub.com/support/errata and fill in the form.
Piracy: If you come across any illegal copies of our works in any form on the internet, we would be grateful if you would provide us with the location address or website name. Please contact us at copyright@packt.com
with a link to the material.
If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.
Share your thoughts
Once you’ve read Software Architecture Patterns for Serverless Systems, Second Edition, we’d love to hear your thoughts! Please click here to go straight to the Amazon review page for this book and share your feedback.
Your review is important to us and the tech community and will help us make sure we’re delivering excellent quality content.
Download a free PDF copy of this book
Thanks for purchasing this book!
Do you like to read on the go but are unable to carry your print books everywhere?
Is your eBook purchase not compatible with the device of your choice?
Don’t worry, now with every Packt book you get a DRM-free PDF version of that book at no cost.
Read anywhere, any place, on any device. Search, copy, and paste code from your favorite technical books directly into your application.
The perks don’t stop there, you can get exclusive access to discounts, newsletters, and great free content in your inbox daily
Follow these simple steps to get the benefits:
- Scan the QR code or visit the link below
https://packt.link/free-ebook/9781803235448
- Submit your proof of purchase
- That’s it! We’ll send your free PDF and other benefits to your email directly