makeporngreatagain.pro
yeahporn.top
hd xxx

Build a Hello World REST API with Lambda proxy integration

475
  1. Create a “Hello, World!” Lambda function
  2. Build a “Hello, World!” API

    1. Sign in to the API Gateway console at https://console.aws.amazon.com/apigateway.
    2. If this is your first time using API Gateway, you see a page that introduces you to the features of the service. Under REST API, choose Build. When the Create Example API popup appears, choose OK.
      If this is not your first time using API Gateway, choose Create API. Under REST API, choose Build.
    3. Create an empty API as follows:
      1. Under Create new API, choose New API.
      2. Under Settings:
        • For API name, enter LambdaSimpleProxy.
        • If desired, enter a description in the Description field; otherwise, leave it empty.
        • Leave Endpoint Type set to Regional.
      3. Choose Create API.
    4. Create the helloworld resource as follows:
      1. Choose the root resource (/) in the Resources tree.
      2. Choose Create Resource from the Actions dropdown menu.
      3. Leave Configure as proxy resource unchecked.
      4. For Resource Name, enter helloworld.
      5. Leave Resource Path set to /helloworld.
      6. Leave Enable API Gateway CORS unchecked.
      7. Choose Create Resource.
    5. In a proxy integration, the entire request is sent to the backend Lambda function as-is, via a catch-all ANY method that represents any HTTP method. The actual HTTP method is specified by the client at run time. The ANY method allows you to use a single API method setup for all of the supported HTTP methods: DELETEGETHEADOPTIONSPATCHPOST, and PUT.To set up the ANY method, do the following:
      1. In the Resources list, choose /helloworld.
      2. In the Actions menu, choose Create method.
      3. Choose ANY from the dropdown menu, and choose the checkmark icon
      4. Leave the Integration type set to Lambda Function.
      5. Choose Use Lambda Proxy integration.
      6. From the Lambda Region dropdown menu, choose the region where you created the GetStartedLambdaProxyIntegration Lambda function.
      7. In the Lambda Function field, type any character and choose GetStartedLambdaProxyIntegration from the dropdown menu.
      8. Leave Use Default Timeout checked.
      9. Choose Save.
      10. Choose OK when prompted with Add Permission to Lambda Function.
  3. Deploy the API in the API Gateway console

    1. Choose Deploy API from the Actions dropdown menu.
    2. For Deployment stage, choose [new stage].
    3. For Stage name, enter test.
    4. If desired, enter a Stage description.
    5. If desired, enter a Deployment description.
    6. Choose Deploy.
    7. Note the API’s Invoke URL.
  4. Use browser and cURL to test an API with Lambda proxy integration
    To test GET requests using only query string parameters, you can type the URL for the API’s helloworld resource into a browser address bar. For example: https://r275xc9bmd.execute-api.us-east-1.amazonaws.com/test/helloworld?name=John&city=Seattle

Comments are closed, but trackbacks and pingbacks are open.

baseofporn.com https://www.opoptube.com
Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.