2 - Preparing the environment

This chapter describes everything that should be installed or prepared to follow this book:

  • AWS Account;
  • Development Environment with IntelliJ IDEA
  • Other tools, such as Postman, which is a REST client.

2.1 - AWS console

Amazon has an administration console to use AWS, create, manage resources, and then run applications.

This console can be accessed at the following address: http://console.aws.amazon.com/

a) Amazon Web Services account types

To access AWS through its console, the reader must create an account first. This way, it will be possible to control the use of resources, expenses (when applicable), monitor utilization alarms, among many other features.

AWS has some types of accounts described below. Any of these accounts can be used to follow this book:

  • Free tier: maybe this is the simplest way to start using AWS for learning purposes. With such an account the reader can have 12 months free to use some of the AWS features within specified limits.

    AWS constantly renews the features and limits of this type of account. For an up-to-date view of this modality, please visit the following link: https://aws.amazon.com/free

    This requires the use of a credit card for the account creation, but it won’t charge it if the resource usage is under the limits set for the AWS free tier criteria.

  • AWS Educate: this is an ideal choice for faculty and students in schools, colleges, and universities, as it offers multiple monthly credit schemes to users without the need to use credit cards.

    To use this modality, the educational institution must have an AWS registration. For more information, please visit the following link: https://aws.amazon.com/education/awseducate/

  • Coupons with credits: while this is not necessarily a different type of account, the reader can get credit coupons for use on AWS. Such coupons are distributed at events promoted by Amazon. With these credits, the reader can use AWS resources until they run out.
  • Paid account: this is the traditional AWS account model, where businesses and users pay for the features they use on AWS monthly.

b) AWS account creation

To fully leverage the content of this book, the reader must create an AWS account using one of the options mentioned in the previous section.

Having this account created, regardless of modality, the reader will be able to follow all the following chapters, creating and using AWS resources.

To proceed with the creation of the account, please visit the following link: http://console.aws.amazon.com/

On this screen, click the Create a new AWS account button and follow the steps that appear.

Once the account is created, the reader will be able to access the AWS Admin Console. Note that it is a web interface rich in detail and user options. As concepts are presented throughout the chapters, the reader will be able to learn a little more about these options.

c) IAM user

The account that was created in the previous section works as an administrator user within the AWS console. With it, one can create and use AWS features, but it is recommended to create users under the domain of this account. This gives the account administrator greater control, through groups and permissions.

Such users can be created using a free AWS feature called Identity and Access Management. Chapter 4 will go into more detail about these users, especially how to create them and assign permissions to them.

d) AWS CLI

One can create and manage AWS resources through a computer-installable application called AWS Command Line Interface.

In principle, anything that can be done on the AWS web console can be done on the CLI, but with commands with a specific syntax.

Chapter 4 will give the steps required to configure AWS CLI after the IAM user is created along with the passkey. These steps are needed to enable AWS CLI to be enabled on the computer that will be used to develop the applications presented in this book.

 

2.2 - Development environment

To follow this book, it is necessary to prepare its development environment, installing some tools and mainly the IDE to be used for the creation of the sample applications.

It is important to note that the following steps outline what should be done, but each operating system has its peculiarities. Therefore, it is necessary to follow the steps defined in the links that will be provided, according to the operating system that will be used.

a) Java Development Kit

First of all, it’s necessary to install the Java Development Kit (JDK), a set of applications and libraries needed to develop Java applications.

This book is based on JDK 8. It can be found through the following link:

https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

To download it, one must accept its license, choose the operating system and its version. Note that some operating systems may have additional steps to setting up JDK 8.

b) IntelliJ IDEA Community Edition

To develop the sample applications that will be created in this book, the reader needs to install an integrated development environment.

The IDE that will be used is the IntelliJ IDEA Community Edition, from the manufacturer JetBrains. This is one of the most modern IDE to develop applications in Java and other programming languages.

It can be found at the following address: https://www.jetbrains.com/idea/download

Download and install the version compatible with the development machine operating system by following the instructions set on the JetBrains website.

If the reader wants to learn more about working with IntelliJ IDEA, there is an excellent set of tutorials on the following documentation page of the JetBrains website: https://www.jetbrains.com/idea/documentation/

c) Source code repository

This is an optional step if the reader wants to store the source code of the sample projects in a repository.

An excellent option for this is to use GitHub, which allows the creation of public and private repositories without the need to pay a monthly fee.

To create a GitHub account, go to the following link and follow the steps to complete the form:

https://github.com/join

For details of which plan to choose, visit the following link:

https://github.com/pricing

The free plan is sufficient to follow up on this book.

d) MySQL client

Since some sample applications will use a MySQL relational database, it will be interesting to have a client to access it, to see its tables and its data.

There are several client applications for this type of work. An excellent option is MySQL Workbench in its free version. It can be downloaded from this address:

https://dev.mysql.com/downloads/workbench/

Select the option appropriate for development machine operating system and follow the installation instructions offered on the manufacturer’s page.

In the chapter where an application uses a database, there will be specific instructions on how to configure MySQL Workbench to connect to that database. So do not worry about taking additional steps here. At this time, the reader only need to install the MySQL Workbench client.

2.3 - Docker

Running container applications is a trend in cloud computing as well as distributed applications in microservices. These are details that will be explained in later chapters.

How Docker works and what it will help, will be covered in a few chapters ahead. The purpose of this section is to present what should be installed or created.

a) Docker account

One of the processes that will be done throughout this book is creating an image of a Docker container for running the application on an AWS ECS. At first, it sounds complicated, but it is quite simple if a few steps are followed correctly.

To use this image, it is interesting to put it in a repository so that AWS can download and use it. At this time, create an account on the Docker hub at the following link:

https://hub.docker.com

This account is free and will adequately serve the purposes of this book.

b) Docker

As with the other applications presented in this chapter, the reader should install Docker according to the development machine operating system version. To download it, see the instructions in the following link:

https://docs.docker.com/install/

If the reader wants to go directly to the links for Mac and Windows, here they are:

  • Mac: https://docs.docker.com/docker-for-mac/install/
  • Windows: https://docs.docker.com/docker-for-windows/install/

It is important to read the preparation and installation instructions. Usually, there are no problems with newer computers, but since Docker works with hardware virtualization, just like VMWare and VirtualBox, there may be certain incompatibilities or additional configurations that need to be made.

c) Docker Hub repositories

Once the account has been created in Docker Hub, the reader will need to create a repository for each created image. This step will be detailed later when the first image is created.

At this point, it is enough for the reader to have only the Docker Hub account.

2.4 - Postman

Postman is a very useful and versatile free application. With it, the reader will be able to make requests to the applications developed in this book, both when they are running on the development machine itself as well as when they are hosted on AWS.

To download it, follow the instructions at this link: https://www.getpostman.com

With Postman, the reader can organize and save requests assembled on it in the form of collections, organized by project or by context.

One can also create a Postman account to store and share the collections of requests created on it. This makes working on a team of developers and testers much more straightforward.

2.5 - Conclusion

This chapter introduced the tools and packages to be installed, as well as the accounts to be created so that the reader can follow this book in its entirety.

Of course, some configurations have yet to be made, either in applications or within the AWS and Docker Hub account. However, it is more interesting from a didactic point of view that the reader does this when the resource has to be used.

The next chapter details what will be developed in this book, in terms of projects and applications, explaining what will be used of AWS resources. It is important for the reader to have a clear sense of what lies ahead, chapter by chapter.