Create deployment group

  1. File structure for deployment:
/tmp/
  |--WordPress/
      |-- appspec.yml  
      |-- scripts/
      |    |-- change_permissions.sh
      |    |-- create_test_db.sh
      |    |-- install_dependencies.sh
      |    |-- start_server.sh
      |    |-- stop_server.sh
      |-- wp-admin/
      |    |-- (various files...)
      |-- wp-content/
      |    |-- (various files...)
      |-- wp-includes/
      |    |-- (various files...)
      |-- index.php
      |-- license.txt
      |-- readme.html
      |-- (various files ending with .php...)
  • Create an application for CodeDeploy:
cd /tmp/WordPress
aws deploy create-application --application-name WordPress_App
  • You must configure the CLI to use the command (by using aws configure created in step 2.1 Create Access Key).

CodeDeploy

  1. Upload the CodeDeploy revision to Amazon S3.
aws deploy push \
  --application-name WordPress_App \
  --s3-location s3://bucketname/WordPressApp.zip \
  --ignore-hidden-files
  • Check the S3 bucket to see the push result.

CodeDeploy

  1. Access the CodeDeploy interface:

    • Select Applications
    • Select WordPress_App

CodeDeploy

  1. In the Application interface:

    • Select Deployment groups
    • Select Create deployment group

CodeDeploy

  1. Enter the deployment group name. Select Service role.

CodeDeploy

  1. In the Deployment type section:
  • Select In-place
  • For Environment configuration, select Amazon EC2 instances
  • Enter key
  • Enter value.

CodeDeploy

  1. Select Deployment as CodeDeployDefault.OneAtATime
  • Uncheck Enable load balancing
  • Select Create deployment group

CodeDeploy

  1. Deployment group created successfully.

CodeDeploy