About Slingly
Slingly is an automation platform which allows you to automatically establish your own eCommerce stores with a few simple steps. To be more specific, this application offers a wide variety of features for to track, record and analyse the advertising information and customers data.
Executive summary
Slingly is an e-commerce platform lets you establish your own store, so you can start promoting products and make money online. Slingly has released Slingly Pro, a powerful eCommerce software automation program that enables users to start their print-on-demand (POD) business with ease. With Slingly Pro, users can get access to 1000s of professional designs to sell across 32 products types including t-shirts, hoddies, jewellery, mugs, canvas art and more.
Challenge1
Slingly Pro enables users to do print-on-demand business, in the background it uses Amazon lambda function that triggers based on the user requirement. When Lambda function got trigged, the function gets required data from the concerned S3 bucket where the templates and images are stored. This S3 is very crucial to run these tasks, so the data should be highly available, reliable and fault tolerant.
If downtime occurs in the lambda service, then users can’t access the images in the S3 bucket. This situation will create terrible impact on their business and their data. So Slingly wanted to maintain multiple accounts for disaster recovery.
Challenge2
If the Slingly development team makes updates to the lambda function and introduces bugs, it can cause downtime for the application and negatively impact their business. While making updates to the lambda function, the Slingly development team might deploy code with bugs, which creates downtime and impact the business negatively.
Additionally, the Python code they are using is outdated and requires updating. This process involves testing the environment multiple times, and any issues encountered during the update can also spoil their reputation.
Implemented Solution
To address these challenges, we suggested them to maintain active-passive environments which can also be used as active-active environment if their application scaleup. Solution is implemented by creating two accounts, one account is created as a primary account which is used by the Slingly to do their business operations and the another account is used for disaster recover. The Slingly team can use this account for testing their code and fix bugs. This solution helps them to avoid downtime to their application and keeps the application highly available, highly reliable and fault tolerant.
To keep their data up to date, we have implemented S3 cross account replication. Slingly is using their existing AWS account for a long time and already had data in their existing S3 buckets. We copied that data to the newly created account and used S3 sync to have the same data in both the accounts.
Both the main account and the disaster recovery account have the same lambda functions and the same S3 data. so we can implement active-passive environment and active-active environment. when the Slingly application requires any code update or downtime, then this will not impact the Slingly business and the applications will be alive all the time.
It can also be used as active-active environment when they need to scaleup. Slingly can serve their customers without any interruption as both the accounts are up to date and there will not be any loss of data.
What is S3 Cross Account Replication?
S3 Cross Account Replication refers to copying the contents of the S3 bucket from one account to another S3 bucket in a different account. It’s possible that both the accounts may or may not be owned by the same individual or organization.
Setup Requirements
Two AWS Slingly accounts: For this walkthrough, we need two AWS account entities with their account IDs.
Source and destination buckets: The first, source account, bucket with objects. The second, destination account, will need a bucket that will receive the first account’s objects.
IAM user: This AWS IAM user in the new Slingly account(destination) will be responsible for copying the objects.
Permissions: The IAM user needs permissions to access both buckets in order to get objects from the source bucket and put objects in the destination bucket. These permissions are granted with the use of policies.
Slingly is using their existing AWS account for long time and already had data in their existing S3 buckets and to copy that data to the newly created account we have used S3 sync to have the same data in both the accounts and to keep the live data up to date we have used S3 cross account replication.
S3 sync: The s3 sync command synchronizes the contents of a bucket and a directory, or the contents of two buckets. Typically, s3 sync copies missing or outdated files or objects between the source and target.
Impact
Now Slingly need not to worry about any downtime and data loss. They started to focus more on their application development instead of worrying downtime.
Conclusion
Working With Slingly is a wonderful experience. They are happy and satisfied with the solution we provided. We enjoy working with Slingly and want to continue doing so for many more years to come.