Serverless Framework

Automatic ScalingPay-Per-ExecutionServerless Framework

Please feel free to contact us

Go
img

About

Serverless computing allows you to build and run applications and services without thinking about servers. Serverless applications don’t require you to provision, scale, and manage any servers. You can build them for virtually any type of application or backend service, and everything required to run and scale your application with high availability is handled for you.

Building serverless applications means that your developers can focus on their core product instead of worrying about managing and operating servers or runtimes, either in the cloud or on-premises. This reduced overhead lets developers reclaim time and energy that can be spent on developing great products which scale and that are reliable.

MIRI InfoTech is configuring and publishing Serverless Framework embedded pre-configured framework with Lambda and ready-to-launch AMI on Amazon EC2 that contains Serverless.

Features

  • No server management: There is no need to provision or maintain any servers. There is no software or runtime to install, maintain, or administer.
  • Flexible scaling: Your application can be scaled automatically or by adjusting its capacity through toggling the units of consumption (e.g. throughput, memory) rather than units of individual servers.
  • High availability: Serverless applications have built-in availability and fault tolerance. You don’t need to architect for these capabilities since the services running the application provide them by default.
  • No idle capacity:You don’t have to pay for idle capacity. There is no need to pre- or over-provision capacity for things like compute and storage. For example, there is no charge when your code is not running.

You can subscribe Serverless Framework to an AWS Marketplace product and launch an instance from the Serverless Framework product’s AMI using the Amazon EC2 launch wizard.

To launch an instance from the AWS Marketplace using the launch wizard

  • Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/
  • From the Amazon EC2 dashboard, choose Launch Instance. On the Choose an Amazon Machine Image (AMI) page, choose the AWS Marketplace category on the left. Find a suitable AMI by browsing the categories, or using the search functionality. Choose Select to choose your product.
  • A dialog displays an overview of the product you’ve selected. You can view the pricing information, as well as any other information that the vendor has provided. When you’re ready, choose Continue.
  • On the Choose an Instance Type page, select the hardware configuration and size of the instance to launch. When you’re done, choose Next: Configure Instance Details.
  • On the next pages of the wizard, you can configure your instance, add storage, and add tags. For more information about the different options you can configure, see Launching an Instance. Choose Next until you reach the Configure Security Group page.
  • The wizard creates a new security group according to the vendor’s specifications for the product. The security group may include rules that allow all IP addresses (0.0.0.0/0) access on SSH (port 22) on Linux or RDP (port 3389) on Windows. We recommend that you adjust these rules to allow only a specific address or range of addresses to access your instance over those ports
  • When you are ready, choose Review and Launch.
  • On the Review Instance Launch page, check the details of the AMI from which you’re about to launch the instance, as well as the other configuration details you set up in the wizard. When you’re ready, choose Launch to select or create a key pair, and launch your instance.
  • Depending on the product you’ve subscribed to, the instance may take a few minutes or more to launch. You are first subscribed to the product before your instance can launch. If there are any problems with your credit card details, you will be asked to update your account details. When the launch confirmation page displays.

Usage/Deployment Instructions

Step 1: Create a new key pair while creating machine from AMI as below.


Step 2: Download the key pair and save it on disk.


Step 3: Run puttygen from Start button of the system. (If it is not available, you can download from here and get it installed on your system http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html )


Step 4: Upload keypair to the putty key generator. Save the private key by clicking the Save private key button (.ppk file).


Step 5: Now run putty configuration.


Step 6: Put IP Address and select the .ppk file as shown below.


Step 7: Type ec2-user in the putty command box.


Create Function on AMI

  • Create project folder and go inside it
    • mkdir <Name of directory>
    • cd <Name of directory>
  • Type the following command to create serverless using python3 template:
    • sls create --template aws-python3

You will get three file

  • .gitignore : source control management file
  • handle.js : contain a source code for a simple
  • serverless.yml : project configuration file

You can customize as much as you want to serverless.yml, but for me I’ll change only service, stage, region, and resources. 

  • Deploying and Invoking

To deploy serverless service, you can type the following command:

sls deploy

  • To invoke your function you can type:

sls invoke –function hello

Note: You can edit the handle.js command to edit the function.

CREATE API

Open the link to create API of your function.

https://console.aws.amazon.com/console/home

Under Compute, go to Lambda


Here all the functions created are listed.

Click on a function to create an API for the same. Here you get 3 tabs (Configuration, Triggers, and Monitoring)

Click on Triggers.

Click on + Add Triggers.


Click on the box to select trigger type.


Click on API Gateway.

Select Security option as OPEN.

Click on Submit button.

Under Application Services, go to API Gateway.

Under LambdaMicroServices, go to Stages.

Here you will get method type and Invoke URL.


You can test the URL in browser. Run the URL in browser, it will display output of the function.

All your queries are important to us. Please feel free to connect.

24X7 support provided for all the customers.

We are happy to help you.

Submit your Queryhttps://miritech.com/contact-us/

Contact Numbers:

Contact E-mail:

Submit Your Request





    Input this code: captcha

    Amazon EC2 allows you to set up and configure everything about your instances from your operating system up to your applications. An Amazon Machine Image (AMI) is simply a packaged-up environment that includes all the necessary bits to set up and boot your instance. Your AMIs are your unit of deployment. You might have just one AMI or you might compose your system out of several building block AMIs (e.g., webservers, appservers, and databases). Amazon EC2 provides a number of tools to make creating an AMI easy. Once you create a custom AMI, you will need to bundle it. If you are bundling an image with a root device backed by Amazon EBS, you can simply use the bundle command in the AWS Management Console. If you are bundling an image with a boot partition on the instance store, then you will need to use the AMI Tools to upload it to Amazon S3. Amazon EC2 uses Amazon EBS and Amazon S3 to provide reliable, scalable storage of your AMIs so that we can boot them when you ask us to do so.

    Or, if you want, you don’t have to set up your own AMI from scratch. You can choose from a number of globally available AMIs that provide useful instances. For example, if you just want a simple Linux server, you can choose one of the standard Linux distribution AMIs.

    You may connect your VPC to:

    • The Internet (via an Internet gateway)
    • Your corporate data center using a Hardware VPN connection (via the virtual private gateway)
    • Both the Internet and your corporate data center (utilizing both an Internet gateway and a virtual private gateway)
    • Other AWS services (via Internet gateway, NAT, virtual private gateway, or VPC endpoints)
    • Other VPCs (via VPC peering connections)

    You have complete control over the visibility of your systems. The Amazon EC2 security systems allow you to place your running instances into arbitrary groups of your choice. Using the web services interface, you can then specify which groups may communicate with which other groups, and also which IP subnets on the Internet may talk to which groups. This allows you to control access to your instances in our highly dynamic environment. Of course, you should also secure your instance as you would any other server.

    By default, Amazon RDS chooses the optimal configuration parameters for your DB Instance taking into account the instance class and storage capacity. However, if you want to change them, you can do so using the AWS Management Console, the Amazon RDS APIs, or the AWS Command Line Interface. Please note that changing configuration parameters from recommended values can have unintended effects, ranging from degraded performance to system crashes, and should only be attempted by advanced users who wish to assume these risks.

    DB instances are simple to create, using either the AWS Management Console, Amazon RDS APIs, or AWS Command Line Interface. To launch a DB instance using the AWS Management Console, click “RDS,” then the Launch DB Instance button on the Instances tab. From there, you can specify the parameters for your DB instance including DB engine and version, license model, instance type, storage type and amount, and master user credentials.

    You also have the ability to change your DB instance’s backup retention policy, preferred backup window, and scheduled maintenance window. Alternatively, you can create your DB instance using the CreateDBInstance API or create-db-instance command.

    Versioning allows you to preserve, retrieve, and restore every version of every object stored in an Amazon S3 bucket. Once you enable Versioning for a bucket, Amazon S3 preserves existing objects anytime you perform a PUT, POST, COPY, or DELETE operation on them. By default, GET requests will retrieve the most recently written version. Older versions of an overwritten or deleted object can be retrieved by specifying a version in the request.

    Highlights

    • icon

      No server management: There is no need to provision or maintain any servers. There is no software or runtime to install, maintain, or administer.

    • icon

      Flexible scaling: Your application can be scaled automatically or by adjusting its capacity through toggling the units of consumption (e.g. throughput, memory) rather than units of individual servers.

    • icon

      High availability: Serverless applications have built-in availability and fault tolerance. You don't need to architect for these capabilities since the services running the application provide them by default.

    Application Installed

    • icon Serverless Framework
    • icon php
    • icon apache
    • icon mysql
    • icon linux