AWS Elastic Beanstalk – Provisioning Resources – SOA-C02 Study Guide

AWS Elastic Beanstalk

With AWS Elastic Beanstalk, you can deploy and manage applications within your AWS infrastructure. Although this might sound similar to AWS CloudFormation, remember that CloudFormation provides an IaC solution. In other words, the goal of CloudFormation is to make it easy to manage the infrastructure resources (EC2 instances, database resources, and so on). With Elastic Beanstalk, the focus is on the application, and the infrastructure is automatically provisioned as needed by Elastic Beanstalk.

ExamAlert

If you are asked an exam question that is related to provisioning infrastructure components, think AWS CloudFormation. If the question is related to deploying applications, think AWS Elastic Beanstalk.

The wizard that is used to create an Elastic Beanstalk resource provides a good idea of the purpose of the service. As with most resources, this wizard asks you to provide a name for the application and (optionally) tags. Figure 7.2 shows the next two sections of this wizard.

FIGURE 7.2 AWS Elastic Beanstalk Wizard

Note that you are prompted to provide a platform (side note: AWS Elastic Beanstalk is a PaaS service). At press time, the following platforms are available:

.NET Core on Linux

.NET on Windows Server

Docker

GlassFish

Go

Java

Node.js

PHP

Python

Ruby

Tomcat

The preceding are application platforms. For example, the Python platform would mean that you want to execute Python code in the application.

The Platform branch defines the infrastructure where the application is executed. These are defined by AWS, as you can see in Figure 7.3.

FIGURE 7.3 Python platform branches

The platform version allows you to specify which specific version of the platform you want to run your code. Typically, you have only one option because AWS does not support many versions of a platform.

In the last section of this wizard shown in Figure 7.3, you choose what code you want to execute. You can start with a sample application and build your code from the sample. Alternatively, you can write your code in a separate testing environment and upload your code.

CloudFormation StackSets

One of the features of CloudFormation is StackSets, a tool that allows you to manage stacks that manage resources across multiple accounts and AWS regions. A stack is a group or collection of AWS resources that you want to manage as a single unit. The StackSet is created in a single AWS account within a single region. The StackSet uses the template that you provided to create, update, or delete additional stacks in other AWS accounts or regions using the template defined within the StackSet.

The account in which you create the StackSet is referred to as the Administrator account. The accounts where stacks are created by the StackSet are called Target accounts. See Figure 7.4 for a conceptional view of this concept.

FIGURE 7.4 AWS CloudFormation StackSets

On the exam, you likely won’t be asked questions regarding creating complete StackSet templates, but you should be familiar with the concept and following prerequisites for using StackSets:

StackSets either make use of service-managed or self-managed permissions on the Target account. Complete steps to configuring these permissions are beyond the scope of this book, but for the exam you should be aware of these requirements.

StackSets use a feature of AWS Organizations called trusted access. AWS Organizations is a tool that allows you to manage multiple AWS accounts. The feature of trusted access must be configured before using StackSets.