Create CloudFormation Stack

Create CloudFormation Stack

  1. Use the Argon2 Hash Generator tool to create a hash string for the VSCode Server browser login password.

    • Enter your original password (unhashed). Save the original password to enter when logging into VSCode in later steps.

    • Ensure the following values. Otherwise, your password will not work:

      • Parallelism Factor: 1
      • Memory Cost: 4096
      • Iterations: 3
      • Hash Length: 16
      • Hash Type: Argon2i

CFN Console

  1. Access the CloudFormation console to proceed with creating the stack.

CFN Console

Use this yaml file to deploy your stack.

  • In the first step, configure the template. Select Template is ready
  • For Template source, select Upload a template file
  • Click on Choose file and select the yaml file
  • Click Next

Create Stack CloudFormation

  1. We configure the stack details
  • Stack name, enter the stack name you want to set.

STACK_NAME will be used as the prefix or suffix of the names of the services in this lab. For example: alb-STACK_NAME-XXX

  • In the Parameters section:

    • For IDEHashedPassword, enter the hash string you created in step 1.

    • For IdeAmiId, the default value is the latest Amazon Linux 2023 AMI. You can change it to another AMI as desired.

    • Enter the EC2 instance type at instance type. To reduce costs, you can leave the value as t2.micro (applicable for the free tier) or t3.micro. However, to ensure performance, we recommend using t3.small or a larger instance type.

    • Select false for SkipBucket

    • For VSCodeServerVersion, enter the desired version (remove the preceding ‘v’). You can see the list of versions here.

  • Click Next

Create Stack CloudFormation Create Stack CloudFormation

  1. Continue to the Configure stack options page

    • Tags, enter the key-value (enter as you like)

    Create Stack CloudFormation

    • Stack deployment options - Choose how you want the stack to handle deployment failures.

    Create Stack CloudFormation

    • Check the box at I acknowledge that AWS CloudFormation might create IAM resources, then click Next.

    Create Stack CloudFormation

  2. Review the stack configuration. Once you are satisfied, click Submit.

Create Stack CloudFormation

  1. The stack creation process takes about 10 minutes. Upon completion, the status will change to CREATE_COMPLETE.

This stack initializes an EC2 Instance pre-installed with VSCode IDE, DynamoDB Table, LoadBalancerDNS, ProfileName, S3WebsiteURL, SiteBucket.

Create Stack CloudFormation

  1. In the newly created stack interface
  • Go to the Outputs tab
  • Find the value of VSCodeServerDomainName.

Create Stack CloudFormation

  1. Enter our password to access and use the VSCode Server (created in the stack) as the development environment.

Create Stack CloudFormation

  1. Check the Outputs of the stack

Create Stack CloudFormation

  1. Next, we check DynamoDB
  • Access DynamoDB
  • The new Table has been initialized

Create Stack CloudFormation

  1. Check Load Balancers
  • Access EC2
  • Select Load Balancers
  • Check the results

Create Stack CloudFormation