Creating a POST Api | AWS API Gateway Passing Data to AWS Lambda

Поделиться
HTML-код
  • Опубликовано: 22 окт 2024

Комментарии • 34

  • @adamurbas9185
    @adamurbas9185 9 месяцев назад +3

    couldn't figure out what made a lambda handler a post vs get http endpoint until watching this video. absolute legend. thanks man!

    • @KnowledgeAmplifier1
      @KnowledgeAmplifier1  9 месяцев назад

      Glad to hear the video is helpful to you @adamurbas9185! Happy Learning

  • @dev0pstech
    @dev0pstech Год назад +2

    Thank you brother, much appreciated , stuck on post request since two days. Thank you

  • @partheshsoni2427
    @partheshsoni2427 Год назад +1

    Thank you for sharing your expertise and please keep up the fantastic work. This video is really helpful...

  • @worldsofgalaxy
    @worldsofgalaxy Год назад +1

    Superb understood lambda today .. Thanks 🙏🙏

  • @saptanilchowdhury1851
    @saptanilchowdhury1851 2 года назад +1

    nice explaination of this video I done this practically it worked thanks

  • @aparnapodili
    @aparnapodili Год назад +1

    nice explanation sir

  • @fiyatal
    @fiyatal Год назад

    i have lambda api and try to authentication with cognito. i have a login page after i take username and password should i forward data a post method and how can i forward the keys to my main api?

  • @nitaypan1362
    @nitaypan1362 2 года назад +1

    Really very helpful for me so thank you so much 😊❤️

    • @KnowledgeAmplifier1
      @KnowledgeAmplifier1  2 года назад

      Glad to know the video was helpful to you nitay pan! Happy Learning :-)

  • @gregherren9790
    @gregherren9790 Год назад +1

    Very helpful, thanks!

  • @satwipro
    @satwipro 3 года назад

    excellent work and brilliant way of illustrating concepts

  • @shubhammahure3530
    @shubhammahure3530 5 месяцев назад

    The reporting service (git repository) will have to trigger the backup lambda in case of successful execution of storing the data in .
    Trigger the restore lambda in case of unsuccessful execution.
    Acceptance Criteria
    Restore UDM from backup in case of failure
    Backup UDM after successful execution of reporting service batch execution
    can you provide me microservice code implementation.

  • @yogeetadevghare443
    @yogeetadevghare443 Год назад +1

    return is not working for giving output in console... What could be wrong

    • @KnowledgeAmplifier1
      @KnowledgeAmplifier1  Год назад

      Hello YOGEETA DEVGHARE, please check cloudwatch logs , it will give some idea ..

    • @MAHDEO
      @MAHDEO Год назад

      Try code below : It should work !!!
      import json
      def lambda_handler(event, context):
      # Check if 'body' exists in the 'event' dictionary and is a valid JSON string
      if 'body' in event and isinstance(event['body'], str):
      try:
      # Parse the JSON data from the 'body' field
      body_data = json.loads(event['body'])
      # Check if 'country' exists in the parsed JSON
      if 'country' in body_data:
      country = body_data['country']
      message = "I love my {}".format(country)
      return {
      'statusCode': 200,
      'body': json.dumps({'message': message})
      }
      else:
      return {
      'statusCode': 400,
      'body': json.dumps({'error': 'Missing "country" in JSON data'})
      }
      except json.JSONDecodeError:
      return {
      'statusCode': 400,
      'body': json.dumps({'error': 'Invalid JSON data in the request body'})
      }
      else:
      return {
      'statusCode': 400,
      'body': json.dumps({'error': 'Missing or invalid "body" field in the event'})
      }

  • @sagerking8908
    @sagerking8908 2 года назад +1

    thanks bro, it helps

    • @KnowledgeAmplifier1
      @KnowledgeAmplifier1  2 года назад

      Glad to know the video is helpful to you Sager King! Happy Learning :-)

  • @danielotembo2983
    @danielotembo2983 2 года назад +1

    Keep up the great work!

  • @krishnasanagavarapu4858
    @krishnasanagavarapu4858 2 года назад

    Bro , thank you so much for making this concept clear

  • @saivamsi441
    @saivamsi441 2 года назад +1

    great explanation :)

  • @abduallahmustafa1029
    @abduallahmustafa1029 Год назад +1

    what about file?

    • @KnowledgeAmplifier1
      @KnowledgeAmplifier1  Год назад

      Hello Abduallah Mustafa, you can refer these 2 videos , there how to handle files with API Gateway is explained --
      Serverless File Uploader with AWS HTTP Gateway and S3 - Step by Step Tutorial
      ruclips.net/video/13SswprYsHQ/видео.html&feature=shares
      Downloading images form AWS S3 via Lambda and API Gateway
      ruclips.net/video/WK11Glkdqfg/видео.html&feature=shares
      Hope this will be helpful! Happy Learning

  • @abdulrafay1951
    @abdulrafay1951 9 месяцев назад

    It works on postman, but not on frontend such as react. AWS is pathetic af