by

Bare-bones Swagger Example for API Gateway Simplified Proxy Features

Amazon API Gateway just made it a LOT easier to build an API to front an existing HTTP backend or Lambda functions.

Recent additions of a few simple but powerful new features reduce the amount of configuration needed to build an API Gateway proxy by several times. No more mapping templates, parameter mapping, response mappings, etc. (unless you need them).

Here’s a super simple example demonstrating the 3 new features (greedy path parameter, “ANY” method, and proxy integration types).

This API will accept requests using any HTTP method to any subpath of any depth under either /http or /lambda. Any request under /http will proxy all headers, path parameters, and query string parameters to the HTTP integration (httpbin.org). Any request under /lambda will invoke a Lambda function with complete API request data in accordance with the proxy convention defined here.

---
swagger: "2.0"
info:
  version: "2016-09-23T22:23:23Z"
  title: "Simple Proxy Example - Ryan Green"
host: "zte3bswjjb.execute-api.us-east-1.amazonaws.com"
basePath: "/demo"
schemes:
- "https"
paths:
  /http/{proxy+}:
    x-amazon-apigateway-any-method:
      parameters:
      - name: "proxy"
        in: "path"
      x-amazon-apigateway-integration:
        type: "http_proxy"
        uri: "http://httpbin.org/{proxy}"
        httpMethod: "ANY"
        passthroughBehavior: "when_no_match"
        requestParameters:
          integration.request.path.proxy: "method.request.path.proxy"
  /lambda/{proxy+}:
    x-amazon-apigateway-any-method:
      parameters:
      - name: "proxy"
        in: "path"
      responses: {}
      x-amazon-apigateway-integration:
        type: "aws_proxy"
        uri: "arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-1:[MY_ACCOUNT_ID]]:function:[MY_FUNCTION_NAME]]/invocations"
        passthroughBehavior: "when_no_match"
        httpMethod: "POST"

Write a Comment

Comment

Webmentions

  • republican gay dating ap

    single gay dating site https://speedgaydate.com/

  • oc gay chat rooms

    gay chat randome https://gay-buddies.com/

  • free chat network gay

    gay page chat roulette https://gaytgpost.com/

  • gay dating denver, co

    gay dating sites defiance ohio https://gaypridee.com/

  • free chat now gay

    free gay chat rooms by zip code https://bjsgaychatroom.info/

  • dating a gay porn star

    russia gay dating profiles https://gaysugardaddydatingsites.com

  • gay fetish dating app

    gay teen dating sites https://gayfade.com

  • gay dating argentina

    college gay dating site https://speedgaydate.com

  • free dating gay site

    gay punk dating https://gayprideusa.com

  • gay christian dating app

    the gay dating shows https://gay-buddies.com

  • the best gay dating sites

    palm springs ca mature gay bisexual dating https://gaypridee.com

  • 3scorching

    3sponsored

  • 3miocene

    2consistence

  • essay writing services legit

    enduring issues essay examples https://windowsvpns.com/

  • what is a good sat essay score

    analysis essay outline https://vpn4torrents.com/

  • tuskegee experiment essay

    should college be free essay https://vpnsrank.com/

  • what's an essay

    an argumentative essay https://vpnshroud.com/

  • best essay writing services

    essay maker https://vpn4home.com/

  • another word for however in an essay

    beowulf essay https://thebestvpnpro.com/

  • college essay guy

    conclusion of an essay https://tjvpn.net/

  • problem solution essay topics

    400 word essay https://topvpndeals.net/

  • transition words for essay

    how to quote someone in an essay https://choosevpn.net/

  • palm beach state critical thinking in nursing

    critical thinking in college https://uncriticalthinking.com/

  • critical-thinking

    synonym for critical thinking https://criticalthinking2020.net/

  • what is the definition of critical thinking

    critical thinking jobs https://criticalthinkinginstitute.com/

  • characteristics of critical thinking

    critical thinking assignment https://criticalthinkingbasics.com/

  • nyc free online gay dating

    gay international dating sites https://gaysugardaddydatingsites.com/

  • free gay dating in duluth mn

    dating websites gay https://gayfade.com/

  • gay dating reddit

    free gay latino dating https://gayprideusa.com/

  • writing a good college essay

    write a good essay https://howtowriteessaytips.com/

  • high school essay writing

    writing compare and contrast essays https://yoursuperessay.com/

  • writing descriptive essays

    writing a descriptive essay https://topessayswriter.com/

  • writing an essay intro

    writing essays in college https://anenglishessay.com/

  • mgm online casino nj

    online casino ideal https://conline-casinos-hub.com/

  • online casino live roulette

    888 online casino https://casinogamesmachines.com/

  • pc sex fuck games

    gravity falls sex games https://cybersexgames.net/

  • jav tv sex games ixnn

    multiplayer online sex games https://sexgameszone.com/

  • best casino reviews

    online casino best bonus https://casinoonlinet.com/

  • no deposit casino games

    online casinos for us players https://casinoonlinek.com/

  • essay writing company

    writing a essay https://onlinecasinos4me.com/

  • pay essay writing

    best online essay writing service https://essaytag.com/

  • pay to write essay

    writing expository essays https://essaypoints.com/

  • writing an essay for college admission

    writing college admission essays https://essayghostwriter.com/

  • writing essay online

    what to write for college essay https://essaywritercentral.com/

  • gay dating sierra vista

    young gay dating sites https://gayedating.com/

  • site for gay chubby dating

    buzzfeed lesbian gay dating https://gay-singles-dating.com/

  • dating gay blind men

    dating subreddit for gay guys https://datinggayservices.com/

  • men's gay dating websites

    a4a gay dating https://dating-gaym.com/

  • gay men dating trans men

    gay online dating https://gaydatingcanada.com/

  • michael brandes gay dating

    bluie gay dating https://gaydatinglosangeles.com/

  • omar mateen gay dating profile

    asian gay dating site dragons https://gaychatgay.com/

  • gay lesbian dating

    adam 4 adam gay dating https://freegaychatnew.com/

  • asian men dating site gay men

    silverman dating gay https://gaychatrooms.org/

  • keto blueberry muffins

    low cholesterol keto diet https://ketodietplanus.com/