What is CORS?

Cross-Origin Resource Sharing (CORS) is an HTTP-header-based mechanism that allows a server to indicate any other origins (domain, scheme, or port) than its own from which a browser should permit the loading of resources. CORS also relies on a mechanism by which browsers make a “preflight” request to the server hosting the cross-origin resource, in order to check that the server will permit the actual request. In that preflight, the browser sends headers that indicate the HTTP method and headers that will be used in the actual request.

Let us see how we can enable the CORS…

Let us see how we can use the S3 bucket with API Gateway to create a single REST API that will return all types of binary files based on the URI path passed.

We can add support for binary files in Rest API with API Gateway console and using YAML files also.

I have attached the tired and tested YAML code reference at the end which could be used as a reference if you want to develop it through SAM CLI Script.

But here, we will look into how we can achieve it through the AWS console.

Log in to…

Today, we will see how we can leverage AWS API Key and Usage Plan to authenticate and restrict the number of requests to AWS REST API.

You will find the whole code and sam CLI deployment script at the end of this post. To configure directly through AWS console visit https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-create-usage-plans.html

What are usage plans and API keys?

A usage plan specifies who can access one or more deployed API stages and methods — and also how much and how fast they can access them. The plan uses API keys to identify API clients and meters access to the associated API stages for each key. …

Today, we will see how we can make HTTP API calls in node js using Axios client with proxy.

Why do we want to use proxy in API calls?

An API proxy is an interface that sits between your frontend and the actual backend services. Using a proxy in API decouples the frontend from implementation details of the backend, and allows you to create a custom interface that the frontend will interact with instead of the backend itself. …


Full Stack Developer | Programmer | AWS | Enthusiast learner

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store