Written Lab
Written Lab 1.1: Create an HTTP API by Using the AWS Management Console
- Open the AWS web management console, and under the services search box, search for and select API Gateway.
- Under Choose API, type HTTP API and then select Build.
- Select Add Integration, and then choose an AWS Lambda function in the region it resides in using the drop-down box or enter a full HTTP endpoint URL with an ANY method.
- For Name, enter a name for your API; this is a marker name and only used for your reference.
- Click Review And Create.
- Click Create.
- Now your API is ready to invoke. You can test your API by entering its invoke URL in a browser or by using Curl.
- Select and copy the URL from the details screen and paste it into your browser to test.
https://l030ogly41.execute-api.us-west-2.amazonaws.com
(for example)
curl
https://l030ogly41.execute-api.us-west-2.amazonaws.com
(for example)
Note: Since there is not a live web server, you will not see any data.
- To complete the lab, delete the API Gateway instance that was created by selecting the gateway by name and, in the Actions drop-down box, selecting Delete.
Review Questions
The following questions are designed to test your understanding of this chapter’s material. For more information on how to obtain additional questions, please see this book’s introduction.
- Content in the Brussels edge location needs to be updated as soon as possible because of an error in a product pricing update. What would be the best way to update the content?
- Manually set the TTL to zero
- Replace the file at the origin, and the edge will see that it’s newer and automatically update its local cache
- Call the invalidation API of the object
- Use the file management utilities in the CloudFront CLI to manually delete the file, which forces the edge to update from the origin
- The index.html file in the Asia CloudFront edge locations has become stale with the TTL reaching zero seconds. Where does the CloudFront edge in Singapore go to fetch an updated index.html file?
- The closest edge peer, which happens to be in Kuala Lumpur
- The origin data stored in the defined region’s availability zone
- The regional edge cache location
- Nowhere; the TTL of the file automatically resets
- Chuck is an AWS networking consultant hired to optimize response times for a company that needs to push a new version of its application to its global base. Because of locality variances in the code such as language support and embedded encryption types, he wants to minimize download times and make sure the correct updates are delivered. What is an approach Chuck could consider?
- Implement Global Accelerator to speed up network response times
- Use CloudFront with the geolocation feature enabled
- Store the updates in all AWS regions worldwide
- Use a multi-RW RDS instance with multiple red replicas
- Global Widgets customers need to download manuals from their Texas FTP server. The download requests originated from Asia-Pacific and Middle East customers, and users are complaining about slow download speeds. What can be done to optimize the download speeds to these remote locations?
- Use a CloudFront content distribution network to cache the FTP files at edge locations near the customers
- Place a network load balancer in the us-west-2 region to balance the FTP request across multiple servers that scale based on workload
- Use the AWS Global Accelerator service to transport traffic over the AWS global network and not the Internet
- Use API Gateway with the HTTP API type to increase response times
- Global Widgets has a requirement to have its global customers access its download servers in the Ohio region with low latency but has a security policy to limit the use of IP addresses allowed in its internal networks. What can be recommended to meet this security policy?
- Use their own public IP addresses on a Global Accelerator instance
- Use AWS-assigned Anycast addresses
- This cannot be done; use a CloudFront distribution instead
- Implement a Web Application Firewall with the BYOIP option enabled
- A customer has specific routing and endpoint connectivity requirements for its global customer base to support its disaster recovery policies. The delays from Australia and South Africa locations are highly noticeable, and users are complaining about long download times for large files. What can be recommended to allow for faster connection speeds to the remote sites and still have the endpoint mappings required?
- Implement a custom Global Accelerator instance
- Use the standard AWS Global Accelerator service
- Use API gateways in AWS regional availability zones closest to the remote users
- Deploy classic load balancers in Australia and South Africa
- You want to optimize what AWS charges and still meet the requirement of hosting multiple web domains on an AWS load balancer with a single listener. What feature set can you enable to meet this requirement and still be able to make secure Internet connections?
- Deploy SNI on the ALB listener
- Use URL mapping on the ALB
- Use a network load balancer with content switching based on HTTP header information
- Terminate the SSL/TLS connections using CloudFront