You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**[UPDATE - 12/01/2021]** We have now also created a workshop that you can use as a reference to understand this reference solution in a step-by-step fashion. Workshop is available [here](https://github.com/aws-samples/aws-serverless-saas-workshop).
5
6
6
7
## Introduction
8
+
7
9
The move to a software-as-a-service (SaaS) delivery model is accompanied by a desire to maximize cost and operational efficiency. This can be especially challenging in a multi-tenant environment where the activity of tenants can be difficult to predict. Finding a mix of scaling strategies that align tenant activity with the actual consumption of resources can be elusive. The strategy that works today might not work tomorrow.
8
10
9
11
These attributes make SaaS a compelling fit for a serverless model. By removing the notion of servers from your SaaS architecture, organizations can rely on managed services to scale and deliver the precise number of resources your application consumes. This simplifies the architecture and operational footprint of your application, removing the need to continually chase and manage scaling policies. This also reduces the operational overhead and complexity, pushing more of operational responsibility to managed services.
@@ -12,23 +14,24 @@ The code in this repository is intended to provide a sample implementation of a
12
14
13
15
Note that the instructions below are intended to give you step-by-step, how-to instructions for getting this solution up and running in your own AWS account. For a general description and overview of the solution, please see the developer's documentation [here](DOCUMENTATION.md).
14
16
15
-
## High Level Architecture
17
+
## High Level Architecture
18
+
16
19
Figure 1 provides a high-level representation of the baseline architecture that will get deployed, once you complete the deployment. As mentioned before, please see the [documentation](DOCUMENTATION.md) to understand the architecture in more detail.
NOTE: If you are using Cloud9 to deploy the architecture, then make sure that to select at least t3.large instance size and increase the volume size of the underlying EC2 instance to 50 GB (instead of default 10 GB). This is to make sure that you have enough compute and space to build the solution.
23
-
25
+
NOTE: If you are using Cloud9 to deploy the architecture, then make sure that to select at least t3.large instance size and increase the volume size of the underlying EC2 instance to 50 GB (instead of default 10 GB). This is to make sure that you have enough compute and space to build the solution.
26
+
24
27
You can also use the scripts under "Cloud9Setup" folder to increase disk size and install pre-requisites inside your Cloud9 environment.
25
28
26
-
* This reference architecture uses Python. Make sure you have Python 3.8 Installed.
27
-
* Make sure you have [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-install.html) Installed.
28
-
* Make sure you have the latest version of [AWS SAM](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html) installed. Not having the release version of SAM can cause deployment issues.
29
-
* Make sure you have the latest version of [AWS CDK CLI](https://docs.aws.amazon.com/cdk/latest/guide/cli.html) installed. Not having the release version of CDK can cause deployment issues.
30
-
* Make sure you have the latest version of [git-remote-codecommit](https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-git-remote-codecommit.html) installed.
31
-
* Make sure that you have Node 14 or above.
29
+
- This reference architecture uses Python. Make sure you have Python 3.8 Installed.
30
+
- Make sure you have [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-install.html) Installed.
31
+
- Make sure you have the latest version of [AWS SAM](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html) installed. Not having the release version of SAM can cause deployment issues.
32
+
- Make sure you have the latest version of [AWS CDK CLI](https://docs.aws.amazon.com/cdk/latest/guide/cli.html) installed. Not having the release version of CDK can cause deployment issues.
33
+
- Make sure you have the latest version of [git-remote-codecommit](https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-git-remote-codecommit.html) installed.
34
+
- Make sure that you have Node 14 or above.
32
35
33
36
## Setting up the environment
34
37
@@ -39,13 +42,15 @@ Run the below script to deploy the required component. Replace the "[email protected]
39
42
```
40
43
41
44
This script will take few minutes to complete. Once complete it will deploy the following:
42
-
* Bootstrap CDK in your account
43
-
* Deploy Tenant Pipeline using CDK. This pipeline uses CodePipeline and is responsible for auto updating the stack for all the tenants in an automated fashion.
44
-
* Deploy the bootstrap stack, which initializes the environment by setting up Cognito, DynamoDB tables and Shared services (Tenant registration, tenant management and user management)
45
-
* Deploy the pooled tenant stack, using code pipeline, which deploys the multi-tenant order and product services.
46
-
* Deploy three web applications, namely "SaaS Provider Admin console", "Landing/sign-up application" and "Sample SaaS commerce application", using S3 and CloudFront. The script will output the URL for these three user interfaces, after it finishes.
45
+
46
+
- Bootstrap CDK in your account
47
+
- Deploy Tenant Pipeline using CDK. This pipeline uses CodePipeline and is responsible for auto updating the stack for all the tenants in an automated fashion.
48
+
- Deploy the bootstrap stack, which initializes the environment by setting up Cognito, DynamoDB tables and Shared services (Tenant registration, tenant management and user management)
49
+
- Deploy the pooled tenant stack, using code pipeline, which deploys the multi-tenant order and product services.
50
+
- Deploy three web applications, namely "SaaS Provider Admin console", "Landing/sign-up application" and "Sample SaaS commerce application", using S3 and CloudFront. The script will output the URL for these three user interfaces, after it finishes.
47
51
48
52
Once the above script finishes successfully, go to the CodePipeline page, inside AWS Console, to make sure that the Pipeline has been deployed successfully. You might have to wait for few minutes before the Pipeline finishes.
@@ -62,6 +67,7 @@ NOTE: Below script before deleting each resource, it will prompt for user confir
62
67
```bash
63
68
./cleanup.sh
64
69
```
70
+
65
71
This script will complete the following steps in order:
66
72
67
73
1. Delete the CloudFormation stack named "stack-pooled".
@@ -76,7 +82,9 @@ This script will complete the following steps in order:
76
82
NOTE: If you used Cloud9 to deploy the architecture, then make sure to delete that instance. This will not be done by the script, and will need to be done manually.
77
83
78
84
## License
85
+
79
86
This library is licensed under the MIT-0 License. See the LICENSE file.
80
87
81
88
## Security
89
+
82
90
See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information.
0 commit comments