Monthly Archive: May 2018

HOST API on AWS Lambda 0

Host API using AWS Lambda & API Gateway | Serverless

In this blog, we will discuss how to set up an email sending service in AWS without running any server (EC2 Instance). Many a time its required to run a small script, but just to achieve that, developers often spin up an entire server and load it with Apache using the only fraction of the resources available on the box, this is a big wastage of CPU & RAM. This not only leaves the server vulnerable because of security issues, it also adds up to the cost. AWS Lambda | Serverless Computing AWS Lambda lets you run code without provisioning or managing servers. You pay only for the compute time you consume – there is no charge when your code is not running. With Lambda, you can run code for virtually any type of application or backend service – all with zero administration. Just upload your code and Lambda takes care of everything required to run and scale your code with high availability. You can set up your code to automatically trigger from other AWS services or call it directly from any web or mobile app.   API Gateway Amazon API Gateway is a fully managed service that makes it easy for developers to create, publish, maintain, monitor, and secure APIs at any scale. With a few clicks in the AWS Management Console, you can create an API that acts as a “front door” for applications to access data, business logic, or functionality from your back-end services, such as workloads running on Amazon Elastic Compute Cloud (Amazon EC2), code running on AWS Lambda, or any web application. Amazon API Gateway handles all the tasks involved in accepting and processing up to hundreds of thousands of concurrent API calls, including traffic management, authorization and access control, monitoring, and API version management. Amazon API Gateway has no minimum fees or startup costs. You pay only for the API calls you receive and the amount of data transferred out.   SES Amazon Simple Email Service (Amazon SES) is a cloud-based email sending service designed to help digital marketers and application developers send marketing, notification, and transactional emails. It is a reliable, cost-effective service for businesses of all sizes that use email to keep in contact with their customers. You can use our SMTP interface or one of the AWS SDKs to integrate Amazon SES directly into your existing applications. You can also integrate the email sending capabilities of Amazon SES into… Read More

0

Setting up MLKIT Firebase on Android

  Google launched MLKIT in it Google I/O 2018, this is one big step for any of the tech giant to make the trained model available for developers. Google went one step ahead and made it available on a mobile device that run locally and most f the without an internet connection. Although Amazon Web Services ( AWS ) also provide similar services through it Machine Leaning, Rekognition and other service but all of them require an internet connection and setting it up to work in real-time is a big pain.   There are few important points that Google’s ML took care of: Offline Real-time Accurate Platform Independent ( Android / IOS ) The above points will give MLKIT  worldwide acceptance. For a developer its a nightmare to train model, collect data sample and then make those trained available for use. After Tensors flow, this is the next big step of the company toward contributing to the community.   So what all MLKIT offers: For starting there are few ready-made models available for beginners:   Text recognition Face detection Barcode scanning Image labeling Landmark recognition However, you can also use your own Tensor Flows Lite models for taking care of custom scenarios.   In this blog, we will set up a sample app and configure it to use MLKIT and setup Face tracking. The Facetracking Model can detect the following things: Happiness  ( Range 0 – 1 ) Left & Right Eye closing ( Range 0 – 1 ) So in order to start, clone the following Repo:   https://github.com/ankitjamuar/android-firebase-mlkit.git , everything is working on it, you might have to setup google-services.json file.   Now open the project in Android studio, and connect your mobile and install the APK . The first screen will have a start button, press the start button and it will open an activity with camera preview. if you put a human face in front of camera you will be able to see MLKIT in action., it will show a bounding box around the face and values of Happiness, left & right eye open status. How to download google-services.json file. Go to Firebase console, create a project and select Android Project on the next page, next page will ask for package name and other optional detail. fill those detail and in next step, it will ask to download the google-services.json file. Put the file in “app” directory and sync it.