Deploying on AWS
Overview
Deploying a responsive, reliable, and scalable online store is essential in today’s rapidly evolving e-commerce landscape. The SCAYLE Storefront Application is built on a robust platform, making it an ideal starting point for any enterprise brand. This guide provides a comprehensive overview of deploying the SCAYLE Storefront on AWS ECS. This ensures your online store is optimized to handle growing traffic efficiently and provide a seamless user experience.
SCAYLE Storefront Architecture on AWS
The SCAYLE Storefront Application's architecture is designed for scalability and reliability when deployed on AWS. Here's how the system is typically structured:
- AWS ECS Fargate: The Storefront Application runs on AWS ECS Fargate. This enables a serverless operational model that eliminates the need to manage underlying servers or clusters, simplifying operations.
- AWS Application Load Balancer (ALB): All incoming requests to the storefront are intelligently routed through an ALB. This ensures high availability, distributes traffic efficiently (e.g., using a "round-robin" algorithm), and provides fault tolerance across your services.
- AWS ElastiCache for Redis: Sessions and cached requests are stored in ElastiCache. This reduces latency by providing fast data retrieval and improves the overall responsiveness of the storefront.

Architectural Overview
Implementing the SCAYLE Storefront Stack
Setting up your SCAYLE Storefront stack on AWS is designed to be straightforward. Follow these steps to get your storefront off the ground.
Prerequisites
Before deploying the storefront, you need to have:
- An existing SCAYLE instance.
- The SCAYLE instance must be configured to have a
Shop Country
with the ID1001
if you are launching the Storefront Application using our prebuilt demo storefront image.
5 Steps to Deploy SCAYLE’s Storefront
- Set Up an AWS Application Load Balancer (ALB):
Configure an ALB to distribute incoming traffic across your services, typically using a "round-robin" algorithm. This enhances load handling capabilities and ensures continuous uptime. - Host Your Services with AWS Fargate:
Choose AWS Fargate for hosting your services. This simplifies deployment by eliminating the need for server management. You simply deploy your Docker image through a container registry, such as DockerHub or AWS Elastic Container Registry (ECR). - Configure Your Fargate Services:
- Redundancy: Aim for at least two AWS Fargate tasks for redundancy, placing each in a different Availability Zone to ensure continuous availability.
- Resource Allocation: To handle requests efficiently, allocate at least one CPU and two gigabytes of memory to each task.
- Auto Scaling: Implement Auto Scaling to avoid manual intervention during traffic peaks. We recommend using CPU-based Auto Scaling with a target CPU utilization set to 40% for typical production loads.
- Logging: The Storefront Application logs to Standard Out (stdout). Configure these logs to be automatically forwarded to AWS CloudWatch for centralized monitoring.
- Tracing (Optional): To enable structured tracing with your chosen monitoring solution, integrate with OpenTelemetry.
- Store and Cache Data with AWS ElastiCache:
Utilize AWS ElastiCache for Redis to store and cache session data efficiently. It integrates seamlessly with the AWS environment.
Important Note: Your infrastructure setup needs to take care of in-transit encryption (TLS) for AWS ElastiCache, as this is not handled as part of the Storefront Application or related SDK packages. More details can be found here: AWS ElastiCache In-Transit Encryption Documentation. - Manage Configurations with AWS Secrets Manager:
Use AWS Secrets Manager to securely store and manage sensitive configurations (such as API tokens or URLs). These secrets can then be automatically injected into the application container during runtime.
Integrating with Your SCAYLE Instance
The Storefront Application interfaces with the SCAYLE platform through key APIs:
- The Storefront API: Handles fetching product, category, wishlist, and basket data.
- The Checkout API / The Embedded Checkout Component: Used for the checkout process.
- The Auth API: Used for user registration, login, and third-party authentication.
Launching the Stack
To deploy your SCAYLE Storefront Application using our provided CloudFormation templates, follow these steps:
1. Clone the Deployment Repository
https://github.com/scayle/storefront-boilerplate-aws-deployment\
2. Prepare Deployment Parameters
The deployment script requires specific parameters to configure your SCAYLE Storefront instance. These values should be provided as parameter overrides during the CloudFormation deployment command.
Parameter Name | Description |
---|---|
Tenant Space | Your unique SCAYLE tenant space identifier, provided by your SCAYLE Account Manager. |
Storyblok Access Token | The access token for Storyblok CMS. Currently, the storefront requires this token; we are working on removing this restriction. If you’re not using Storyblok, your SCAYLE Account Manager can provide you with a placeholder access token. |
Storefront API Token | This token is required for authenticating requests to the Storefront API. You can create this token in the SCAYLE Panel. Please see our Storefront API documentation for more information on how to create client credentials. |
Auth Client ID | The Client ID for the credential pair of the SCAYLE Authentication API. You can create this ID in the SCAYLE Panel. Please see our Authentication API documentation for more information on how to create client credentials. |
Auth Client Secret | The corresponding secret for the SCAYLE Authentication API Client ID. |
Checkout Secret | A secret required to access the Checkout APIs from SCAYLE. Your SCAYLE Account Manager will provide this. |
Checkout Token | A token required to access the Checkout APIs from SCAYLE. Your SCAYLE Account Manager will provide this. |
3. Deploy the Stack
Execute the aws cloudformation deploy
command, providing your chosen STACK_NAME
and overriding the parameters with your specific values.
Upon successful deployment, your storefront will be accessible via the public ALB URL provided in the CloudFormation stack outputs.
Some features such as login might not work as they require a valid SSL Certificate.