Skip to content

Latest commit

 

History

History
97 lines (75 loc) · 2.63 KB

README.md

File metadata and controls

97 lines (75 loc) · 2.63 KB

AWS WordPress Highly Available Demo Architecture

Overview

Demo CDK app that deploys a HA WordPress architecture on AWS.

Architecture

architecture

Prerequisites

Instructions

Setting up AWS local profile and credentials

Create a new profile in your AWS CLI configuration file:

aws sso login --profile WordPressSandbox
# or
aws configure sso --profile WordPressSandbox

# Get the AWS account ID and the region
aws sts get-caller-identity --profile WordPressSandbox

# Set local environment variables
export AWS_PROFILE=WordPressSandbox
export AWS_ACCOUNT_ID=<AWS_ACCOUNT_ID>
export AWS_REGION=<AWS_REGION>

export CDK_DEFAULT_ACCOUNT=$AWS_ACCOUNT_ID
export CDK_DEFAULT_REGION=$AWS_REGION

Clone this repository to your local machine

Clone this repository on local machine:

git clone https://github.com/Grigore147/aws-wordpress-demo.git

Install the required dependencies:

cd aws-wordpress-demo/infrastructure/aws/cdk
npm ci

Bootstrap the CDK environment on AWS account

npx cdk bootstrap

Synthesizing the CloudFormation template

npx cdk synth

Deploying the application

npx cdk deploy

Cleaning up

npx cdk destroy

Out of scope

This demo doesn't cover all the best practices for deploying a WordPress architecture on AWS.

Here are some improvements that could be made:

  • DNS hosted zone
  • Static content serving from S3 and CloudFront
  • Caching with ElastiCache
  • Enhanced monitoring and logging
  • Enhanced security with WAF, Shield and other security services
  • CI/CD pipeline
  • Automated backups and DR setup