How it works...

In steps 1 and 2, we demonstrated how to launch an EC2 instance, which is a virtual server in AWS. In steps 3 and 4, we selected an RStudio server AMI with TensorFlow and Keras support. All of the software configuration details of your instance such as the application server, operating system, and other applications are stored in the AMI template.

In step 5 we selected a GPU-based instance type. AWS offers a choice of a mix of resources for your application. In step 6, we configured our instance as per our requirements. While configuring the instance, it is also possible to launch multiple instances from the same AMI.

Next, we selected the storage options based on the size of the data we were using. You can configure the storage device settings and increase the Elastic Block Store (EBS) volume if required. An EBS is a flexible block-level storage device that can be attached to an EC2 instance and can be used as primary storage for frequently updated data.

AWS provides four types of EBS volumes based on performance and price:

  • General Purpose SSD
  • Provisioned IOPS SSD
  • Throughput Optimized HDD
  • Cold HDD
  • Magnetic

We did not define any tags while setting up our instance. Tags are a way to assign metadata to resources such as the purpose of the resource, owner details, and version details.

In the next step, we configured the security group using the default options. A security group is a set of firewall rules to control the traffic to your instance. In step 10, we reviewed the instance configuration and launched it. We also created a key pair that consists of a public key stored by AWS and a private key stored by us. This key pair allows us to access our instance securely. This way we created and configured our EC2 instance with RStudio AMI.

Once we finished creating and configuring our instance, in step 11, we went back to our EC2 dashboard and clicked on the Running Instances option to see the details of our instance. In our case, we were provided with an IP address, which was 18.188.193.201, and the port used was 8787. The instance ID is used as the password for connecting to the RStudio instance. In the last step, we launched the RStudio interface by AWS on another web page using the credentials provided. We executed a classification model for MNIST handwritten digits.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset