How to Proxy API requests to your legacy endpoints with Serverless

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 ก.ค. 2024
  • When you are migrating your platform over to serverless, you usually don't do it all at once. Having one URL for your Serverless APIs and one for your legacy API is confusing and annoying.
    In this video you'll learn to:
    - Create an API endpoint that automatically send all requests to another API
    Code available at:
    github.com/SamWSoftware/Serve...
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 11

  • @shadmanmartinpiyal4057
    @shadmanmartinpiyal4057 3 ปีที่แล้ว

    Excellent, this was pretty fun!

    • @CompleteCoding
      @CompleteCoding  3 ปีที่แล้ว

      Hey, thanks! It can be really useful if you're ever migrating from a traditional system (servers) to serverless.

  • @tallitvak5325
    @tallitvak5325 3 ปีที่แล้ว

    you are amazing man!!!

    • @CompleteCoding
      @CompleteCoding  3 ปีที่แล้ว

      Thanks I really appreciate the support

  • @yasirkaram
    @yasirkaram 4 ปีที่แล้ว

    Hi Sam, with this amazing series, would it be possible to get better API keys and plan payments with Stripes then.

    • @CompleteCoding
      @CompleteCoding  4 ปีที่แล้ว

      Yes, you could allow users to sign up to one of three payment plans in stripe. based on which payment plan they chose, you can generate them an API key that has a different level of resources.

  • @ibrohimbahromov1931
    @ibrohimbahromov1931 ปีที่แล้ว

    Awesome video!
    How do I pass Authorization token through serverless to en existing api server?

    • @CompleteCoding
      @CompleteCoding  ปีที่แล้ว +1

      You can use header mappings to pass the correct headers

  • @CompleteCoding
    @CompleteCoding  4 ปีที่แล้ว +3

    I've previously used this method to do a few cool things.
    The first was to join a new service provider's API into my own. I had an existing app and there was a new service provider that we wanted to use. Instead of having to create 20 lambdas to make a request to each of the 20 endpoints, I did exactly what I did in the video to pull the endpoints into my API.
    I've also used this to combine a few external APIs I was using into a single API. This meant I didn't have to remember 4 separate URLs which saves loads of time when I was writing my front end code.
    What projects would you use this in?

  • @fenixw05
    @fenixw05 3 ปีที่แล้ว

    mmm for one reason , sls do not allow me to use the "uri" param :/

    • @CompleteCoding
      @CompleteCoding  3 ปีที่แล้ว

      At which point are you trying to use the uri?