12 - AWS API Gateway Input/Output Mapping

  Рет қаралды 22,791

Bryan Witkowski

Bryan Witkowski

Күн бұрын

Пікірлер: 32
@ngneerin
@ngneerin 3 жыл бұрын
AWS documentation sucks
@jeeu4052
@jeeu4052 2 жыл бұрын
Your tutorials are so good , very good explanations. Even a kid can understand your tutorials. Thanks very much.
@JoshuaDixonHolideckVRShowcase
@JoshuaDixonHolideckVRShowcase 3 жыл бұрын
Thank you for explaining this. Amazon documentation is often lacking.
@lagwagon501
@lagwagon501 2 жыл бұрын
yep and also the results in google searchers are horrendous most of the time! The AWS samples are very basic too :/
@tiagodagostini
@tiagodagostini 4 жыл бұрын
I have been struggling with something it shoudl be simple, I need to make ain integration request that maps the header access_token AND the body to the lambda. If I map { "access_token" : "$input.params('access_token')" } the toke is there, but not the body. If I try to follow the manual it says I should add "body" : $input.json('$') . If I do that although I get a problem where what arrives as body in the lambda is said to be a dictionary
@imyashkale
@imyashkale Жыл бұрын
You are great. Your talk is so clear 🎉
@srini580
@srini580 Жыл бұрын
Hello Bryan, Thanks for a lot this video!
@vishaldindalkop2952
@vishaldindalkop2952 2 жыл бұрын
I use authorizer with my API gateway method. On Deny, I'm trying to attach the custom response template. Which is not working. How do we make it work with Authorizer
@galzafar2943
@galzafar2943 Жыл бұрын
Hey Bryan, great video, I like your content, and way of delivery, I subbed. I wish you would put more informative names on your other videos, since sifting through videos won't really help you, or me. thank you for the content!
@vincentkang1013
@vincentkang1013 3 жыл бұрын
Very well-explained. Thank you so much.
@yingwu9401
@yingwu9401 3 жыл бұрын
This is something that I am interested in
@ousseynoungom9937
@ousseynoungom9937 7 ай бұрын
great video
@rutvikpatel7640
@rutvikpatel7640 2 жыл бұрын
Best mapping tutorial. Thank you for uploading. I hope you have more tutorials to share.
@christophermartinez1769
@christophermartinez1769 2 жыл бұрын
it would be usefull if you add the times and topics in the description
@debasishmohapatra5327
@debasishmohapatra5327 4 жыл бұрын
It's a class room recording so bit slow in comparison to other tutorial videos but content is great and we'll explained.
@smartcoding2932
@smartcoding2932 2 жыл бұрын
Good tutorial
@matthewbennett4926
@matthewbennett4926 2 жыл бұрын
I'm using Api Gateway V2 HTTP API and I'm trying to modify the response sent back to the client. Do you know if this is possible on Api Gateway V2? Having so much trouble with this, and it seems like it might only be possible on V1.
@bwitkowski
@bwitkowski 2 жыл бұрын
Within the "integrations" section, you should see a "request parameter mapping" and "response parameter mapping". You can click on the "manage integration" button to modify the input/output mappings
@matthewbennett4926
@matthewbennett4926 2 жыл бұрын
@@bwitkowski Ok, I've found that section, and I probably should have been more specific. I'm trying to modify the response body. My particular issue is that when an uncaught 500 occurs inside my lambda integration, the response sent back to the client includes the stack trace. I want to catch 500s within api gateway and make sure to remove the stack trace attribute from the response body before completing the response to the client. Hope that makes sense. I'm having a difficult time doing this in V2 and not sure if it's possible. Thanks so much for your quick response. I see that I can modify the headers and statuscode, but don't see body as an option.
@bwitkowski
@bwitkowski 2 жыл бұрын
I think you can do this, but I haven't personally. The best I can find is a reference to the AWS CLI where the mapping is setting the response.body to an empty string and change the status code to 403 when the initial status code is 500. You would have to plugin your params for the api and integration details aws apigatewayv2 create-integration \ --api-id abcdef123 \ --integration-type HTTP_PROXY \ --payload-format-version 1.0 \ --integration-uri 'api.example.com' \ --integration-method ANY \ --response-parameters '{"500" : {"integration.response.body": "", "overwrite:statuscode" : "403"} }
@matthewbennett4926
@matthewbennett4926 2 жыл бұрын
@@bwitkowski Thank you so much for your assistance. The only thing I notice about that cli command is that the payload is specified as version 1.0, where I'm using version 2.0. Not sure if that can simply be changed, but I'll look into it. Rest assured, my simple desire to modify the response body is confirmed to still be a complete pain in the butt lol.
@jonan2199
@jonan2199 2 жыл бұрын
joe's been eating too much
@aishwaryawalkar5950
@aishwaryawalkar5950 2 жыл бұрын
When I try to hit api url on web browser I get missing authentication token error It only works when I do it on Postman by proving access key and secret key.
@aishwaryawalkar5950
@aishwaryawalkar5950 2 жыл бұрын
Plz help!
@bwitkowski
@bwitkowski 2 жыл бұрын
@@aishwaryawalkar5950 You will not be able to access your api directly from the browser. The api is secured with your keys making it only accessible via a client that supplies those credentials. A typical approach would have your client application (as Postman is doing) pass those credentials to the api.
@aishwaryawalkar5950
@aishwaryawalkar5950 2 жыл бұрын
@@bwitkowski yes! On postman under AWS signature it asks for access key and signature key...so for security purpose I can't provide this details to user..then what's the best alternative for security reasons....kindly answer..waiting for reply
@bwitkowski
@bwitkowski 2 жыл бұрын
@@aishwaryawalkar5950 Assuming your want to secure the api, API Keys and API Gateway usage plans are the way to provide access to your api. The end user is still going to have to provide the api key, but there will not be security related issues. You can also limit the amount of access from a particular api key
@aishwaryawalkar5950
@aishwaryawalkar5950 2 жыл бұрын
@@bwitkowski when I put api key on postman I get message : null...why?
@WPBoheme
@WPBoheme 2 жыл бұрын
Excellent
P2 Overview
26:58
Bryan Witkowski
Рет қаралды 322
РОДИТЕЛИ НА ШКОЛЬНОМ ПРАЗДНИКЕ
01:00
SIDELNIKOVVV
Рет қаралды 2,5 МЛН
Players vs Corner Flags 🤯
00:28
LE FOOT EN VIDÉO
Рет қаралды 77 МЛН
когда не обедаешь в школе // EVA mash
00:57
EVA mash
Рет қаралды 3,7 МЛН
Use JWT Authorizers with Amazon Cognito and API Gateway
13:48
Focus Otter
Рет қаралды 52 М.
API Gateway Lambda Mapping (Template Mapping)
29:51
LoveToCode
Рет қаралды 2,8 М.
13 - API Gateway CORS
25:28
Bryan Witkowski
Рет қаралды 7 М.
AWS API Gateway Websocket Tutorial With Lambda | COMPLETELY SERVERLESS!
19:07
Secure API Gateway using Cognito Authorizer (NEW)
29:51
LoveToCode
Рет қаралды 41 М.