Adobe Commerce Cloud alternative - infrastructure as code - terraform configuration

 

Security of the platform can be an issue. Magento is often targeted by hackers and much of the security is the responsibility of the store owner. Adobe Commerce Cloud has no real protection, they use Fastly WAF - it's just an overlay and easy to get around to access any Magento backend which is absolutely unprotected.

The amount of time it takes for some things to update is ridiculous. It can take over an hour after moving a few items around in the Visual Merchandiser.

Support is severely lacking. There is no easy way to contact Magento to get support. No way to get easy support when you run into an issue. There is no way to optimize Adobe Commerce Cloud performance, you can just use it as is and your shop will be slow and you will lose conversion and customers.

Adobe Commerce Cloud alternative:

The question arises - why spend so much money without having control over your business in the cloud. Configuring your own infrastructure these days is the most profitable way to grow your business. You manage the resources yourself, you have a complete overview of what works, how it works and you have complete control over the money invested in your own infrastructure. At any time you can make changes to both infrastructure and store design without thinking about restrictions, platform limitations and unforeseen costs. There are no hidden bills and payments for excess resources, which, as a result, you will not need.

 

[!]  Click here:  Github repository for Magento 2 AWS cluster with Terraform

 

Magento 2 AWS cluster with Terraform | Powered by Graviton2 Processor

AWS CloudShell + Terraform

https://docs.aws.amazon.com/index.html
https://www.terraform.io/docs/
https://aws.amazon.com/cloudshell/

 

Deployment into default VPC

  • Login to AWS Console
  • Start AWS CloudShell
  • Install Terraform:
   sudo yum install -y yum-utils
   sudo yum-config-manager --add-repo https://rpm.releases.hashicorp.com/AmazonLinux/hashicorp.repo
   sudo yum -y install terraform
  • Clone repo:
$ git clone https://github.com/magenx/Magento-2-aws-cluster-terraform.git
  • Create ssl certificate in Certificate Manager
  • For CloudFront to work: The certificate must be also imported in the US East (N. Virginia) Region.
  • Check all details / all files / adjust your settings
  • Run:
   terraform init
   terraform apply

 

Complete setup:

  •  4 autoscaling groups with launch templates base64 converted from user_data.*
  •  5 instances target groups (varnish frontend admin staging developer)
  •  2 load balancers (external/internal) with listeners / rules / security groups
  •  1 rds mysql database
  •  1 build server
  •  1 elk domain
  •  2 redis elasticache cluster
  •  1 rabbitmq broker
  •  2 s3 bucket
  •  1 codecommit repository 4 branches (main build staging developer)
  •  1 cloudfront s3 origin distribution
  •  1 efs file system
  •  1 sns topic and email subscription alerts for asg
  •  Autoscaling policy per group
  •  Systems Manager [https://aws.amazon.com/systems-manager/]
  •  CloudWatch + EventsBridge metrics/logs/alarms/events/triggers
  •  All Magento files managed with git only
  •  Live shop in production mode / read-only
  •  CSF Firewall can be clustered

 

CI/CD scenario:

  • Event driven
  • Changes in 'magento' repository triggers EventsBridge rule.
  • System Manager runs bash script and cleanup on success.
  • Checking environment and do git pull from 'magento' repository and cleanup.
  • Change deployment logic to your needs.

 

Magento 2 development | source code:

  • https://github.com/magenx/Magento-2
  • Files cloned from above repository to admin/frontend instances.
  • Synced to your AWS CodeCommit repository.
  • Magento 2 minimal package pre-installed.

 

Infrastructure DevOps and beyond: