Mini Projects on Amazon Web Services (AWS)

Tanvi Gadhiya
7 min readJul 12, 2020

--

Cloud computing is currently thriving tremendously.It is almost impossible to find an organisation which is not relying at any of the cloud services. The industry is booming at a rapid pace . So I decided to explore the field a bit and get into its functionalities and how it is utilized in real life.

In this post I am going to take you through the basic concepts of cloud computing,AWS and the its applications.

Cloud Computing

To put is in simple words, if I were to play a game which requires huge storage,RAM,graphics card and other several computer resources which I may not have,I can simply avail them online via cloud.Cloud computing is an application-based software infrastructure which stores data on remote servers which are called data centers, which can be accessed through the internet.

Cloud service models

IaaS

IaaS gives users access to storage, networking, servers, and other computing resources via the cloud.

PaaS

PaaS provides a framework that makes it easier and more efficient to build, customize, and deploy applications.

SaaS

The software is hosted, packaged, and delivered by a third party through the Internet (typically on a browser-based interface).

Types of cloud computing

  1. Public
  2. Private
  3. Hybrid

To learn more about basics of cloud computing click here.

Amazon Web Services

Amazon Web Services (AWS) is a cloud platform that offers flexible, reliable, scalable, easy-to-use and cost-effective cloud computing. It is equipped with services like servers, storage, networking, remote computing, email, mobile development, and security.

Some of the services provided by aws

  1. Amazon Elastic Cloud Compute (EC2)

An EC2 instance is a virtual server in Amazon’s Elastic Compute Cloud (EC2) for running applications on the Amazon Web Services (AWS) infrastructure.

2. Amazon S3 (Simple Storage Service)

Amazon S3 provides data storage over the Internet services. Primarily, S3 stores data over the cloud in the form of objects. Amazon S3 stores the data with high security because of its improved infrastructure.

3. Amazon Virtual Private Cloud (VPC)-Amazon Virtual Private Cloud is a commercial cloud computing service that provides users a virtual private cloud, by “provision[ing] a logically isolated section of Amazon Web Services Cloud”.

4.Amazon Cloud Front-Amazon CloudFront is a web service that speeds up distribution of your static and dynamic web content, such as . html, . css, . js, and image files, to your users. CloudFront delivers your content through a worldwide network of data centers called edge locations.

5. Amazon Relational Database Services (RDS)-Amazon Relational Database Service is a distributed relational database service by Amazon Web Services. It is a web service running “in the cloud” designed to simplify the setup, operation, and scaling of a relational database for use in applications.

To learn more about these services,click here.

Application of AWS

So I have developed two projects on AWS using its various services.

One of which is a web application which captures image using webcam and stores it into Amazon S3(Simple Storage Service) bucket.

Here are the steps:

  1. I created simple web application which capture images and store it into local machine.

This the the php file for creating a web appplication on php.

This is how the web application would look.On pressing Start Webcam the camera of the device would be started and will capture an image.

Php file for capturing the image :

This is how the web page will look when it captures the image:

Now the web application is ready to capture and store image

2. Then in i went to AWS console and created IAM and S3 bucket

  • I Created IAM user with programmatic access and save ACCESS KEY and SECRET ACCESS KEY.
  • Then I created a S3 bucket
Created a bucket called webcam-tanvi
  • Then I set the bucket policy

I Changed User Arn and Bucket Arn.

3. Then I created a PHP file which will store the image captured in the S3 bucket:

Now when I will capture an image using the web application,the image would be directly stored in the S3 bucket named webcam-tanvi and one can download the image from there if required.

An another project which I developed on AWS using the Amazon Lex service is a ChatBot which helps the user to order a coffee.I have deployed the ChatBot on Facebook messenger.

Here’s how I have implemented it:

A little information about Amazon Lex

Amazon Lex is a service for building conversational interfaces into any application using voice and text. Amazon Lex provides the advanced deep learning functionalities of automatic speech recognition (ASR) for converting speech to text, and natural language understanding (NLU) to recognize the intent of the text, to enable you to build applications with highly engaging user experiences and lifelike conversational interactions.

To know more,click here.

Steps:

  1. Creating the Bot

Here I chose a Custom Bot and named it as RestaurantBot

Then I filled the details regarding the bot like the output voice of bot, session timeout, sentiment analysis etc.

2.Creating Intents

Intents represent an action that the user wants to perform.I have created three intents :

Introduction Intent
Order Intent
Working Hours Intent

3. Creating Slot

An intent can require zero or more slots or parameters. At runtime, Amazon Lex prompts the user for specific slot values. The user must provide values for all required slots before Amazon Lex can fulfill the intent.

Here I have Order Intent which contains slots such as coffeesize, coffeetype and temp. In the intent configuration, I added three slots. For each slot, I have provided a slot type and a prompt for Amazon Lex to send to the client to elicit data from the user. A user can reply with a slot value that includes additional words, such as “large coffee please”. Amazon Lex can still understand the intended slot value.

Order Intent with 3 slot types

4. Setting the confirmation prompt

Confirmation prompt for order verification

5. Responses

6. Editing the error handling settings

7. Testing and Building Bot

Once the testing has been performed successfully, then I published the chatbot. Now the bot is ready for deployment.

8. Deploying the ChatBot on Messenger

· I navigated to channels to integrate the chatbot for deployment

· To get page Access Token and AppSecret key we have to create a new API in Facebook Development account.

· Create a Facebook development account and in that I created an app.

· Now in the app I navigated to messenger platform.In the access token generation section , I selected my RestaurantBot page which will generate a Page access token.

· Now from the setting I obtained the app secret key and now since i have both appsecret and Page access token I will copy that to chatbot channels setting.

· Then I activated the page to get a callback URL to use with facebook.

· Then I navigated back to the developers account and in messenger platform,in the webhooks section I entered the URL and the verify token.Then add the subscriptions.

· Then I went to facebook and searched my page RestaurentBot to test the chatbot

The ChatBot is all ready to take orders .

--

--