Your web application consists on a Lambda function behind an Application Load Balancer deployed in a single AWS Region. In this lab, you’ll use a CloudFormation template to launch the web application. All the resources created during this workshop will be deleted in the cleanup lab.
This workshop contains self-guided labs, you can take it by yourself without an instructor. If the workshop is part of an AWS hosted event (such as re:Invent, Kubecon, Immersion Day, etc.) the instructor can follow the notes here to create 4 clients (EC2 instances) in different regions that will be used by the workshop participants to test their accelerator settings.
Launch the CloudFormation stack in an AWS Region of your choice, note down the region - I choose US-WEST-2 (Oregon) region. The template will create the following resources:
The link will automatically bring you to the CloudFormation dashboard and start the stack creation process in the specified region. The default stack name AGAWorkshop, proceed through the wizard to launch the stack. Leave all options at their default values, but make sure to check the box to allow CloudFormation to create IAM roles on your behalf:
After you click on Create stack, you will have the following window, it takes about 3 minutes for the stack to be created.
The best way to get started with AWS CloudFormation is to work through the Getting Started Guide, which is included in our technical documentation. Within a few minutes, you will be able to deploy one of the sample templates and start creating your own infrastructure configurations.
There are different ways to get the Application Load Balancer URL/DNS:
$ aws cloudformation describe-stacks --stack-name AGAWorkshop --query "Stacks.Outputs[?OutputKey=='URL'].OutputValue" --output text --region us-west-2 http://AGAWo-Appli-9CXFU1XOCSJ6-977194569.us-west-2.elb.amazonaws.com
$ curl http://AGAWo-Appli-9CXFU1XOCSJ6-977194569.us-west-2.elb.amazonaws.com Processed in US-WEST-2 by AGAWorkshop-Function-P5UKYRRL0N05
Via a browser
If you are at an AWS Event, use the web page the instructor shared with you
CHECKPOINT: You have a working web application deployed in a single AWS Region: a Lambda function behind an Application Load Balancer.
CHALLENGE 1: You would like to improve the web application performance; you received complains from some users, quick TCP Traceroutes show multiple hops and packet drops between their locations and the ALB endpoint. Luckily, you recently attended an event where AWS Global Accelerator was presented, you decide to implement it to improve your web application performance and availability. Ready? Move to the next lab!