March 2, 2019

Serverless Series - Introduction to Serverless

 Serverless Series Home Evolution of Cloud

The age old practise of self-managed servers had big time trouble and the data centre, where someone will manage your infrastructure, came as saviour to get away from managing hardware all by yourself. Since then evolution of each era with a technological transformation have been phenomenal from IaaS, PaaS, CaaS & FaaS



Launch of EC2 instance in 2006 was a stepping stone for Infrastructure as a service providing compute platform at scale.  And the journey continued swiftly with Platform as a service, Container as a Service and finally Amazon Lambda was launched as Function as a Service in 2015.

IaaS (Infrastructure as a Service)
At a basic level, IaaS public cloud providers offer storage and compute services on a pay-per-use basis. But the full array of services offered by all major public cloud providers is staggering: highly scalable databases, virtual private networks, big data analytics, developer tools, machine learning, application monitoring, and so on. Amazon Web Services was the first IaaS provider and remains the leader, followed by Microsoft Azure, Google Cloud Platform, and IBM Cloud.
PaaS (Platform as a Service)
PaaS provides sets of services and workflows that specifically target developers, who can use shared tools, processes, and APIs to accelerate the development, test, and deployment of applications. Salesforce’s Heroku and Force.com are popular public cloud PaaS offerings; Pivotal’s Cloud Foundry and Red Hat’s OpenShift can be deployed on premises or accessed through the major public clouds. For enterprises, PaaS can ensure that developers have ready access to resources, follow certain processes, and use only a specific array of services, while operators maintain the underlying infrastructure.
Note that a variety of PaaS tailored for developers of mobile applications generally goes by the name of MBaaS (mobile back end as a service), or sometimes just BaaS (back end as a service).

CaaS(Container as a Service)Containers as a service (CaaS) is a cloud service that allows software developers to upload, organize, run, scale, manage and stop containers by using a provider's API calls or a web portal interface.
FaaS (functions as a service)
FaaS, the cloud instantiation of serverless computing, adds another layer of abstraction to PaaS, so that developers are completely insulated from everything in the stack below their code. Instead of futzing with virtual servers, containers, and application runtimes, they upload narrowly functional blocks of code, and set them to be triggered by a certain event (e.g. a form submission or uploaded file). All the major clouds offer FaaS on top of IaaS: AWS Lambda, Azure Functions, Google Cloud Functions, and IBM OpenWhisk. A special benefit of FaaS applications is that they consume no IaaS resources until an event occurs, reducing pay-per-use fees.

Mysteries around Servers

Endless open questions while dealing with servers keep flashing around all the time and Serverless had answers to all those mysteries.



What is Serverless?

Serverless does not mean that no servers! We all know that any action or task to be performed need a server. So what does Serverless mean?

Serverless is the native architecture of the cloud that enables you to shift more of your operational responsibilities to AWS, increasing your agility and innovation.
Serverless allows you to build and run applications and services without thinking about servers, meaning servers are abstracted from the end user who avails the serverless functionality.
It eliminates infrastructure management tasks such as server or cluster provisioning, patching, operating system maintenance, and capacity provisioning.

Advantages of going Serverless



Serverless Series - The AWS Serverless Platform

 Serverless Series HomeAWS provides a set of fully managed services that you can use to build and run serverless applications. Serverless applications don’t require provisioning, maintaining, and administering servers for backend components such as compute, databases, storage, stream processing, message queueing, and more. You also no longer need to worry about ensuring application fault tolerance and availability. Instead, AWS handles all of these capabilities for you. This allows you to focus on product innovation while enjoying faster time-to-market.

Compute

  • 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. 
  • Lambda@Edge allows you to run Lambda functions at AWS Edge locations in response to Amazon CloudFront events.
  • AWS Fargate is a purpose-built serverless compute engine for containers. Fargate scales and manages the infrastructure required to run your containers.

Storage

  • Amazon Simple Storage Service (Amazon S3) provides developers and IT teams with secure, durable, highly-scalable object storage. Amazon S3 is easy to use, with a simple web service interface to store and retrieve any amount of data from anywhere on the web.
  • Amazon Elastic File System(Amazon EFS) provides simple, scalable, elastic file storage. It is built to elastically scale on demand, growing and shrinking automatically as you add and remove files. 

Data Stores

  • Amazon DynamoDB is a fast and flexible NoSQL database service for all applications that need consistent, single-digit millisecond latency at any scale.
  • Amazon Aurora Serverless is an on-demand, auto-scaling configuration for Amazon Aurora (MySQL-compatible edition), where the database will automatically start up, shut down, and scale capacity up or down based on your application's needs.

API Proxy

  • 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. Amazon API Gateway allows you to process hundreds of thousands of concurrent API calls and handles traffic management, authorization and access control, monitoring, and API version management.



Interprocess Messaging

  • Amazon SNS is a fully managed pub/sub messaging service that makes it easy to decouple and scale microservices, distributed systems, and serverless applications.
  • Amazon SQS is a fully managed message queuing service that makes it easy to decouple and scale microservices, distributed systems, and serverless applications.  

Orchestration

  • AWS Step Functions makes it easy to coordinate the components of distributed applications and microservices using visual workflows. Building applications from individual components that each perform a discrete function lets you scale and change applications quickly. Step Functions is a reliable way to coordinate components and step through the functions of your application.

Analytics

  • Amazon Kinesis is a platform for streaming data on AWS, offering powerful services to make it easy to load and analyze streaming data, and also providing the ability for you to build custom streaming data applications for specialized needs.
  • Amazon Athena is an interactive query service that makes it easy to analyze data in Amazon S3 using standard SQL. Athena is serverless, so there is no infrastructure to manage, and you pay only for the queries that you run.

Developer Tooling

  • AWS provides tools and services that aid developers in the serverless application development process. AWS and its partner ecosystem offer tools for continuous integration and delivery, testing, deployments, monitoring and diagnostics, SDKs, frameworks, and integrated development environment (IDE) plugins.


Refer here for more details from AWS on the serverless platform.

Serverless Series - Serverless WebApp - Use Case 1

 Serverless Series HomeThis blog post will be taking you through the step by step instructions to build Serverless WebApp - Use Case 1 which will cover network diagram, output webpage, steps to create & configure lambda function, configure API Gateway & create S3 static website for hosting webpages.

Network Diagram



Output WebPage

Here is the expected output page for you to work with an end goal in mind!


Create & Configure Lambda Function

Create Lambda function




 Create Lambda Execution Role

Configure Lambda Function



Edit Lambda function

Configure Lambda function



Configure Lambda function 


Add API Gateway Triggers to Lambda function


Configure Trigger


If the deployment Stage do not exist, create one as in next image & then adding API Gateway Trigger


 Configure Trigger



Configure API Gateway method


API Gateway - Remove ANY method


API Gateway - Remove ANY method


API Gateway - Add GET method




Copy the API Gateway URL & browse it to view the output from the Lambda function. If you get the error "message": "Missing Authentication Token", error Deploying the API again will help.

Create Static Website on S3

  • Create S3 Bucket – public objects; static website
  • Edit index.html to place API Gateway link
  • Upload error.html & index.html; make public
  • Browse using S3 Static Website end point

Serverless Series - MindMap for Use Case 1 & Use Case 2


 Serverless Series Home
Here is the mindmap for Serverless WebApp - Use Case 1 & Use Case 2






February 8, 2019

Thank you #Infor for #WomenOfInfor honour!

WomenOfInfor means a lot to me and thank you for this awesome blog Women of Infor: Engineering director honored for promoting diversity in tech.
Heartfelt gratitude to team Infor for such a valuable recognition! Many thanks to my boss Vynessa Alexander for her unstinted support and most importantly being a source of inspiration to me & many at Infor GT Nexus Commerce Network. A wonderful write-up to treasure forever.. thanks to Isabella Jacobovitz & Marta Cleaveland. I would like to share my joy with hashtagawsugblr and thanks to Jeevan Dongre Ross Barich Rahul Jain Aleksandar Nenov for standing by through AWS re:Invent 2018 Community Leader Scholarship journey. Linked in - https://www.linkedin.com/feed/update/urn:li:activity:6499305785804288000

Twitter - https://twitter.com/Infor/status/1093539965768818688