Achieving successful SaaS transformations
Tags: aws, agile, engineering, saas
Published: 2023-09-25 14:28:14

**Key Success Factors to keep in mind when developing your SaaS product with AWS**

_Written by Gopal Tayal_

## Introduction

Have you ever wondered why you no longer install software on your computer like you used to in the earlier part of this century? The answer: SaaS. Software as a Service (SaaS) is a modern way of obtaining and using software. It's like renting software online instead of buying physical copies. SaaS has gained popularity since the 2010s because it simplifies IT management and reduces costs when compared to traditional software as it is usually available to customers on a subscription or pay-per-use basis. But, since users can easily switch to other options, it's essential to develop your SaaS offering swiftly and to ensure a good user experience. In this blog, we'll give you some tips on how to successfully transform your SaaS application to gain a competitive edge.

### Ensure frictionless onboarding

Put yourself in your customer's shoes and imagine purchasing a new SaaS product and wanting to use it right away. However, if it takes hours or even days to get started, it can be frustrating. Users prefer a seamless transition from being a new customer to actively using the system without feeling the onboarding process. By designing an architecture that ensures a smooth and repeatable onboarding process, SaaS companies can efficiently introduce new users to their system.

In the AWS environment, [Cognito](https://docs.aws.amazon.com/cognito/latest/developerguide/what-is-amazon-cognito.html#feature-overview "https://docs.aws.amazon.com/cognito/latest/developerguide/what-is-amazon-cognito.html#feature-overview"), with its user pools and identity pools, can assist in onboarding new users and granting access to specific application features based on their subscription tiers while IaC with [AWS CDK](https://aws.amazon.com/de/cdk/ "https://aws.amazon.com/de/cdk/") can be used for automatic resource provisioning for tenants. This not only supports growth, but also accelerates the time it takes for customers to see value.

### Maximize observability

A single outage or application health issue can affect all tenants, potentially causing a service disruption for all customers. SaaS organizations need to prioritize creating an operational experience that allows operations teams to efficiently handle the dynamic workloads of a SaaS environment. While maintaining an overall view of system health is important, it's equally crucial for the operations team to monitor individual tenant health and of their respective tiers.

To achieve this, logs and metrics should include tenant context details, such as tenant identifiers and tiers, to ensure effective monitoring and troubleshooting. The first step would be instrumenting the application (ensuring metrics are collected and sent) and [AWS X-Ray](https://docs.aws.amazon.com/xray/latest/devguide/aws-xray.html "https://docs.aws.amazon.com/xray/latest/devguide/aws-xray.html") is a cloud-native option for this.

Besides pro-actively solving faults, observability in a SaaS environment offers several other advantages as well:

- __Responsive Feature Development:__ Observability enables rapid responses to market and user needs by leveraging metrics and tenant-centric views. This includes tracking user interactions like page load times, clicks, and REST calls. [CloudWatch metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/working_with_metrics.html "https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/working_with_metrics.html") and [dashboards](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Dashboards.html "https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Dashboards.html") can be easily configured to provide these insights. [QuickSight](https://docs.aws.amazon.com/quicksight/latest/user/monitoring-quicksight.html "https://docs.aws.amazon.com/quicksight/latest/user/monitoring-quicksight.html") is also a valuable tool for data analysis on the collected metrics, which can enable organizations to enhances reliability, scalability, cost-effectiveness, and agility.
- __Enhanced User Experience:__ Monitoring resource consumption (such as storage and compute) allows for proactive resource provisioning via [auto scaling groups](https://docs.aws.amazon.com/autoscaling/ec2/userguide/auto-scaling-groups.html "https://docs.aws.amazon.com/autoscaling/ec2/userguide/auto-scaling-groups.html") to prevent issues ([Noisy Neighbours](https://docs.aws.amazon.com/wellarchitected/latest/saas-lens/noisy-neighbor.html "https://docs.aws.amazon.com/wellarchitected/latest/saas-lens/noisy-neighbor.html")) and ensure a smooth user experience. These metrics can also be incorporated as a part of [scaling policies](https://aws.amazon.com/de/blogs/architecture/throttling-a-tiered-multi-tenant-rest-api-at-scale-using-api-gateway-part-1/ "https://aws.amazon.com/de/blogs/architecture/throttling-a-tiered-multi-tenant-rest-api-at-scale-using-api-gateway-part-1/") to help manage resource consumption efficiently.

### Provide accurate bills

Metering and billing rely on per-tenant usage data, which can be efficiently tracked using [tagging](https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html "https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html") practices with [Cost and Usage Report](https://docs.aws.amazon.com/cur/latest/userguide/what-is-cur.html "https://docs.aws.amazon.com/cur/latest/userguide/what-is-cur.html"). Serverless architectures with [AWS Lambda](https://aws.amazon.com/de/lambda/ "https://aws.amazon.com/de/lambda/") ensure costs are directly correlated with tenant consumption. [AWS Fargate](https://aws.amazon.com/de/fargate/ "https://aws.amazon.com/de/fargate/") (with EKS or ECS) provides a container-based option for this serverless approach, ensuring you only bill for the compute resources consumed.

### Limit customisations

In the world of SaaS, customers often seek specific customizations. However, it's important not to get carried away and transform your application into a unique tool for each customer as soon as the money starts flowing in. To maintain control and best practices, it's vital to understand your application's capabilities and use feature flags for new customizations.

Feature flags, a common tool among developers, allow multiple paths of execution within a shared code base. Each flag enables or disables different capabilities at runtime and can be linked to tenant configuration options. The configurations are evaluated at runtime and determine the features enabled for each tenant, with [Parameter Store](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-parameter-store.html "https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-parameter-store.html") serving as a useful storage solution for such configurations.

The key takeaway here is that - even if a single tenant needs a unique feature - that feature should be introduced as a customization to the core platform.

### Test, test and test!

Efficient tests are vital for meeting consumer standards in your SaaS product. In a SaaS environment, consider the following tests:

1. __Cross-Tenant Impact Tests:__ Simulate scenarios where some tenants put an excessive load on your system to assess its resilience and how it impacts the performance for the other tenants.
2. __Tenant Consumption Tests:__ Develop various load profiles (e.g., steady, intermittent, and random) to analyze resource usage. This helps to identify discrepancies between actual and expected consumption, which can also help fine tune resource provisioning.
3. __Tenant Workflow Tests:__ Focus on key workflows within your solution and test them with multiple tenants using the same workflow at the same time to spot bottlenecks or resource allocation issues.
4. __Tenant Isolation Testing:__ Continuously validate the policies and mechanisms that secure each tenant's data and infrastructure.

Integrate these tests into your automatic deployment pipelines using [AWS CodeBuild](https://aws.amazon.com/de/codebuild/ "https://aws.amazon.com/de/codebuild/") and [AWS CodePipeline](https://aws.amazon.com/de/codepipeline/ "https://aws.amazon.com/de/codepipeline/") for streamlined quality assurance.

## Summary
In this post, we have presented the knowledge gained from successful SaaS transformations on AWS to assist you in doing the same. By embracing this, SaaS teams can gain a competitive advantage, and at kreuzwerker, with the help of AWS, we can support you in achieving this goal.

If you found this article useful or If you have more tips and tricks, please let us know; we'd be happy to hear from you. If you want to hear more from us about SaaS, check out some of our other blogs on the topic.

Thanks for reading!