AWS API Gateway | Introduction | Hands-on | Certification tips | AWS Community Builders

AWS API Gateway | Introduction | Hands-on | Certification tips | AWS Community Builders

AWS API Gateway | Introduction | Hands-on | Certification tips | AWS Community Builders

AWS API Gateway | Introduction | Hands-on | Certification tips | AWS Community Builders
 

As a part of AWS Community Builder, from now onwards will share my learnings and experience what I have gained from the AWS community ecosystem.

I also try to provide rich quality content – with a few questions and answers in the end that will help in preparing certification exam.

Please provide your valuable feedback in the comments.

Let’s start exploring AWS API Gateway –

What is API?

API stands for an Application programming interface.

An API is a set of definitions and protocols for building and integrating application software.

Why is API used for?

An API is used as a platform to organize information in such a way that it can be accessed through an HTTP request.

Meaning someone can query an API (through something called an API endpoint) and get useful information.


What is 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.
  • APIs act as the "front door" for applications to access data, business logic, or functionality from your backend services.
  • Using API Gateway, you can create RESTful APIs and WebSocket APIs that enable real-time two-way communication applications.  
  • API Gateway supports containerized and serverless workloads, as well as web applications.

Different types of API Gateway?

  • RESTful APIs (Build RESTful APIs optimized for serverless workloads and HTTP backends using HTTP APIs.)
  • WebSocket APIs (Build real-time two-way communication applications, such as chat apps and streaming dashboards, with WebSocket APIs.)

Benefits of API Gateway

  • Efficient API development
  • Performance at any scale
  • Cost Savings at scale
  • Easy Monitoring
  • Flexible Security Controls
  • RESTful API Options

Random Bytes –

1 million API calls received free per month for 12 months with the AWS Free Tier.

Features of API Gateway  

  • Support for RESTful APIs and WebSocket APIs
  • Private integrations with AWS ELB & AWS Cloud Map
  • Resiliency
  • Easy API Creation and Deployment
  • API Operations Monitoring
  • AWS Authorization
  • API Keys for Third-Party Developers
  • SDK Generation
  • API Lifecycle Management

Pricing

For pricing please refer to AWS official doc - https://aws.amazon.com/api-gateway/pricing/

Product Pricing Glossary

  • HTTP API: A RESTful API that is optimized for serverless workloads. Pay only for the API calls you receive.
  • REST API: A RESTful API that offers API proxy functionality and management features in a single solution. Pay only for the API calls you receive.
  • WebSocket API: Maintains a persistent connection between connected clients to enable real-time message communication. Pay for messages transferred and connection minutes.

How API Gateway works?

AWS API Gateway | Introduction | Hands-on | Certification tips | AWS Community Builders

What are stages in API Gateway? How it is useful for API Gateway deployment? 

Stages referred to as different environments such as “DEV/QA/PROD/TEST”.

In API Gateway has different stages – in which perform deployment of API’s and testing.

Each API is isolated to different stages.

To setup stages, please refer official AWS doc –

https://docs.aws.amazon.com/apigateway/latest/developerguide/stages.html


What is API Caching?

With the help of API Gateway, we can cache endpoint’s responses.

It improves the latency of the request to your API as most of the responses are cache and reduces the number of calls made to the endpoint.

API Gateway cache the responses from your endpoint for a specified time to live period.

AWS API Gateway | Introduction | Hands-on | Certification tips | AWS Community Builders

Simple Steps to create API –

  1. Open the AWS Console
  2. Search API Gateway in Services tab
  3. Select Create API
  4. Under HTTP API, Select Build
  5. Choose Add Integration
  6. Enter Name.
  7. Choose Review and Create
  8. Choose Create
  9. Now your API is ready to invoke. You can test your API by entering it invoke URL in a browser, or by using Curl. 

    API Gateway Use Case –

    If you are receiving on daily basis user creation request on any of the tools which are currently using in your organization.

    To avoid this kind of manual intervention task, we can easily automate such kind of request using API gateway where it is only exchanging information from one tool to another function.

    Suppose in your organization you worked as a Jira admin, and you received so many requests on daily basis. So, what you should to avoid these manual efforts?

    Simple approach – set up a webhook in Jira where it sends post request to API gateway with all the required details of the new user and API Gateway simple calling the lambda function for user creation. 

    Benefits of using API gateway in this scenario – 

    • Cost Saving as no unnecessary calls will take place.
    • Lambda is also saving cost – it will run only that time when new users request access to Jira.
    • Efficient

    AWS API Gateway | Introduction | Hands-on | Certification tips | AWS Community Builders

    Certification QnA -

    Q. You currently have a set of Lambda functions that have business logic embedded in them. You want customers to have the ability to call these functions via HTTPS. How can this be achieved?

    A. Use the API Gateway and provide integration with the AWS Lambda functions.

    B. Enable HTTP access on the AWS Lambda functions.

    C. Add EC2 Instances with an API server installed. Integrate the server with AWSLambda functions.

    D. Use S3 websites to make calls to the Lambda functions

    Q. A company wants to build a brand new application on the AWS Cloud. They want to ensure that this application follows the Microservices architecture. Which of the following services can be used to build this sort of architecture? Choose 3 answers from the options given below.

    A. AWS Lambda

    B. AWS ECS

    C. AWS API Gateway

    D. AWS Config

    Q. A company owns an API which currently gets 1000 requests per second. The company wants to host this in a cost effective manner using AWS. Which one of the following solution is best suited for this?

    A. Use API Gateway with the backend services as it is.

    B. Use the API Gateway along with AWS Lambda

    C. Use CloudFront along with the API backend service as it is.

    D. Use ElastiCache along with the API backend service as it is.


    Conclusion –

    API Gateway is the best use when there is some tool integration required with proper authentication mechanism.

    API Gateway is used for exchanging information between devices – mostly in web development.

    Please leave your valuable feedback in the comment section.

    >> Follow us on instagram.com/randomskool
    >> Join our telegram channel and group :)

             Telegram Group: https://t.me/randomskoolQnA
             Telegram Channel: https://t.me/randomskool


    Till then happy coding. 

      0 Response to "AWS API Gateway | Introduction | Hands-on | Certification tips | AWS Community Builders"

      Post a Comment

      Hey Random,

      Please let me know if you have any query :)

      Adsense

      Adsense

      Adsense

      Adsense