Skip to main content

AWS Example: deploy s3 bucket

In this quick start we will show you how you can use Hyper Cloud Automation to deploy an s3 bucket. The example will walk you through creating a simple environment, adding a module, and deploy it.

Prerequiste

In your aws account create a user with the S3FullAccess policy and upload the access keys to the Hyper Cloud Automation.

  1. Login to your AWS account
  2. Go to IAM
  3. Create a user called xoogify-automation Create User
  4. Assign the user AmazonS3FullAccess Policy attach policy
  5. Review and Create user create user
  6. Go to the new user and create access key. Create access key
  7. Select Third Party Service in the list and ignore the warning (make sure to checkmark I understand the above recommendation and want to proceed to create an access key.)
  8. Press Next
  9. Press Create Access Key. Note down the values for Access Key and Secret Access Key
  10. In the Hyper Cloud Automation click on Organization in the left hand navigation menu.
  11. Scroll to the Cloud Keys section.
  12. Press on +Add button.
    1. For Cloud Key choose AWS_ACCESS_KEY_ID.
    2. Paste the value of the AWS_ACCESS_KEY_ID from step 9
    3. For Environment choose global.
    4. Press Save button
    5. Repeat the above steps for AWS_SECRET_ACCESS_KEY
  13. You should have something like this Access Keys

Create environment

In this example we will create a simple environment which consist of a module that deploys an S3 bucket.

  1. In the left naviation menu select Environments
  2. Click on Add Environment
  3. Name your environment example-s3-environment
  4. Press Add
  5. Select EXAMPLE-S3-ENVIRONMENT in the tabs
  6. Press on the + button in the Root of the Environment
  7. Select AWS Account Data Source
    tip

    Press Expand Environment button to expand/collapse the tree

  8. In the AWS Account node press on the button and fill in the following
    1. Name - name of your AWS Account (required)
    2. Account ID - ID of your AWS Account (required)
    3. Press Save Account Settings
  9. On AWS Account node press and select AWS Region Data Source
  10. Click on button and set the region to us-west-2 and press Save
  11. On AWS Region node press and select AWS S3 Bucket Module
  12. Click on button to enter the settings for the bucket
    1. You only need to set the Bucket Name. (Example: my-xoogify-hyper-cloud-automation-bucket-57)
    2. Scroll all the way down and press Save

Your first simple environment should look something like this: Simple Environment

Deploy

Deployment process consists of running a plan action folowed by approval process and then running apply

  1. In your environment locate AWS S3 Bucket module
  2. Press on the in the module to start the plan. Notice that the Deployment Status will change. Plan Running
  3. Once the Deployment Status is changed to PLAN SUCCESS click on button to pop up the deployment PLAN
  4. In the top right corner press TERRAFORM-APPLY button
  5. Wait for deployment to finish. Apply finished
  6. You can review the state file as in the image above
  7. Go to your AWS Console
  8. Go to S3
  9. You will find the bucket that has been deployed

To review deployments log do:

  1. In the left navigation menu click on Deployment Jobs
  2. Click on the deployment job IDs to see the full logs Deploment Jobs

Destroy the bucket

  1. In the naviagion menu on the left select Environments
  2. In the tabs select EXAMPLE-S3-ENVIRONMENT
  3. Click on Expand Environment
  4. Click on button on the AWS S3 Bucket module.
  5. Confirm the destruction plan
  6. Wait for Destroy to complete destroy bucket
  7. Go to your AWS Console
  8. Go to S3
  9. The bucket should be removed

Cleanup

  1. In the left navigation menu click on Organization
  2. Delete the environment EXAMPLE-S3-ENVIRONMENT. See also delete environment
  3. Delete the AWS user and access key created in prerequisite