Let's Find Solutions
Let's Find Solutions
  • 4
  • 59 376
Tutorial: How to upload files into a S3 Bucket using a REST API via API Gateway
A quick tutorial on how to use API Gateway to create a REST API to upload files into a S3 Bucket
Topics Covered:
1) S3 Bucket Creation
2) IAM Role Creation
3) IAM Policy Creation
4) API Gateway Creation
5) REST API Creation
มุมมอง: 32 258

วีดีโอ

Tutorial:How to host a static web site on AWS with a custom domain|S3,Route 53,CloudFront,Cert Mgr
มุมมอง 487ปีที่แล้ว
A quick tutorial on how to host a static web site on AWS with a custom domain (S3, Route 53, CloudFront, Certificate Manager) Topics covered: 1) Domain Creation using Route 53 2) S3 Bucket creation for a hosted web site 3) SSL Certificate creation using Certificate Manager 4) CloudFront configuration to create a web distribution. Link CloudFront domain to SSL Certificate 5) Domain route creatio...
Tutorial: How to add security to a REST API using JWT Authorizers and Amazon Cognito | JWT Token
มุมมอง 20Kปีที่แล้ว
A quick tutorial on how to secure your AWS REST APIs using AWS Cognito, JWT Tokens, and JWT Authorizers. We will have the API Gateway setup with JWT Authorizers that will verify each api request has a valid JWT Token. These tokens will be generated from AWS Cognito for an authenticated user. Topics covered: 1) Simple Lambda Creation using Nodejs 2) Cognito User Pool Creation 3) API Gateway Auth...
Tutorial: How to build a CRUD Serverless API with API Gateway, AWS Lambda and DynamoDB
มุมมอง 7Kปีที่แล้ว
A quick tutorial on how to create a CRUD REST API in AWS. A step by step video that you can follow along with code samples you can try on your own. (CRUD - Create / Read / Update / Delete) Tutorial Items: 1) Quick review of what Serverless means and its benefits 2) Create a DynamoDB Table 3) Create a Lambda Function 4) Create a REST API Gateway 5) Test our new REST API using Postman Both the in...

ความคิดเห็น

  • @ManishKumar-rz9ub
    @ManishKumar-rz9ub 8 วันที่ผ่านมา

    i am getting "Internal server error"

    • @letsfindsolutions
      @letsfindsolutions 4 วันที่ผ่านมา

      I know the ui looks different, but my guess is that this is most likely configuration related

  • @satheeshbabu
    @satheeshbabu 8 วันที่ผ่านมา

    Exactly what i was looking for.. Thanks a lot

  • @dieselKopter
    @dieselKopter 13 วันที่ผ่านมา

    one of the smoothest tutorials. i'm shaking your hand virtually!

  • @TheRealKosalaHandlersMail
    @TheRealKosalaHandlersMail 22 วันที่ผ่านมา

    Does anyone know how to do the same with Terraform?

    • @letsfindsolutions
      @letsfindsolutions 16 วันที่ผ่านมา

      I sure there are some yaml samples out there. Unfortunately I don't have any.

  • @mandagore4931
    @mandagore4931 29 วันที่ผ่านมา

    Why do you use the path override {bucket}/{filename} for your child resource {filename} if you already gave your endpoint these same structure /{bucket}/{filename}. An action name in your method of your {filename} would have been good enough right?

    • @letsfindsolutions
      @letsfindsolutions 16 วันที่ผ่านมา

      I guess just for demo purposes...but good point.

  • @TPDene
    @TPDene หลายเดือนก่อน

    I don't have the "Create policy" button from 2:37 .. any ideas why?

    • @letsfindsolutions
      @letsfindsolutions หลายเดือนก่อน

      They changed the ui a while back...it might look different now.

  • @TPDene
    @TPDene หลายเดือนก่อน

    Thanks a lot! That's exactly what we need. We want to use Amazon S3 with an existing Keycloak instance and use JWT Token authentification

  • @proan_1992
    @proan_1992 หลายเดือนก่อน

    was there a change in AWS UI, I am having a problem creating api resource as path parameter using {}?

    • @letsfindsolutions
      @letsfindsolutions หลายเดือนก่อน

      Yes they changed the ui a while back

  • @rascode
    @rascode หลายเดือนก่อน

    This was incredible. It would have taken approximately 1 million years to figure this out by reading the docs alone. You're a hero.

  • @amandaramos2919
    @amandaramos2919 2 หลายเดือนก่อน

    Does anyone have this code for Java?

    • @letsfindsolutions
      @letsfindsolutions 2 หลายเดือนก่อน

      I dont, but you can easily copy it into chat gpt and ask it to convert it to java for you.

  • @damarisscott7643
    @damarisscott7643 2 หลายเดือนก่อน

    Hi all, I'm pretty new. I followed all these steps, made sure that my S3 and API endpoint are in the same region and yet, I still keep getting this error: The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint I'm trying to upload a JSON file. Have any of you had this issue?

    • @letsfindsolutions
      @letsfindsolutions 2 หลายเดือนก่อน

      I have never encountered this issue. In readibg your error, this looks to be endpoint uri related or something wrong with the endpoint permissions.

    • @damarisscott7643
      @damarisscott7643 หลายเดือนก่อน

      @@letsfindsolutions Hi, it was something with the permissions :) Thanks for your reply, I was able to resolve it <3

  • @anthonysosa1900
    @anthonysosa1900 2 หลายเดือนก่อน

    genioooooo!!!, gracias loco

  • @user-iy7gp8zk3u
    @user-iy7gp8zk3u 3 หลายเดือนก่อน

    It is uploading the file into but there are some issues m facing: 1) even if am specifying the content type in Binary-media-type (audio/mp3), still m able to upload any file 2) the file gets corrupted when it's uploaded I tried form postman and even tried using flutter

    • @letsfindsolutions
      @letsfindsolutions 3 หลายเดือนก่อน

      Possibly the encoding is messing up somehow...aside from that i. Not really sure what else it could be.

  • @nimishgoray8808
    @nimishgoray8808 3 หลายเดือนก่อน

    The AWS Cognito interface has changed, the setup is very different from what's shown in this video.

    • @letsfindsolutions
      @letsfindsolutions 3 หลายเดือนก่อน

      Agreed, the screens have changed...but the concept is essentially the same. When i have time i will do an updated video.

  • @Visgapn1
    @Visgapn1 3 หลายเดือนก่อน

    I have implemented Cognito authentication for my .net web api / react app. It's in .net 4.8 framework and hosted in iis localhost. Also using IIS Url rewrite to configure IIS that react router handlea the app navigations after authentication is completed. Issue is when we make Cognito logout api endpoint get request, it throws CORs error stating Allow Content Header Origin is not present. I have the proper app domain, client id and redirect uri. So what needs to be done in this situation for logout to work. Cognito login works perfectly

    • @letsfindsolutions
      @letsfindsolutions 3 หลายเดือนก่อน

      Did you try enabling cors on the api gateway?

  • @kirtipahwa
    @kirtipahwa 3 หลายเดือนก่อน

    Keep it up. Informative video👍

  • @Ronaldograxa
    @Ronaldograxa 3 หลายเดือนก่อน

    why implicit grant rather than Authorization code grant? Aws doesn't recommend using Implicit Grant

    • @letsfindsolutions
      @letsfindsolutions 3 หลายเดือนก่อน

      We are using jwt tokens. In not sure on the question.

  • @user-qj1jx6wi4l
    @user-qj1jx6wi4l 3 หลายเดือนก่อน

    i want to do OTA update by giving this the url of the uploaded firmware file. is this method ok for that? what happened if I just upload the binary file?

    • @letsfindsolutions
      @letsfindsolutions 3 หลายเดือนก่อน

      This methid requires a valid jwt token...so as long as you can authenticate and pass along a token this will work.

  • @ManishJindalmanisism
    @ManishJindalmanisism 4 หลายเดือนก่อน

    How can i use this token further in aws lambda to get the email id or username to do some dynamic processing? Are there any cognito sdk or library available to scrap that Information in aws lambda ?

    • @letsfindsolutions
      @letsfindsolutions 4 หลายเดือนก่อน

      I believe you can get the user id or group id of the user from the token. From their you can have a dynamo db table to do mapping and dynamic logic based on your custom lookup.

    • @joshuaokoro9447
      @joshuaokoro9447 4 หลายเดือนก่อน

      Seems like you can get it from event.requestContext.authorizer

  • @govindanpotti5005
    @govindanpotti5005 4 หลายเดือนก่อน

    Thanks a lot for this video. I've a question about authentication. Here, the REST API call from postman worked as we have given the IAM role with putobj policy. How about if I have to restrict the upload to a specific user? Say, the upload happens from a custom web application, the user uploads the file, is there a way to include IAM user authentication here? Could you please give any pointers to this?

    • @letsfindsolutions
      @letsfindsolutions 4 หลายเดือนก่อน

      You could use a lambda authorizer (formerly known as custom authorizer). Here you have full control of the auth logic and can validate your keys against specific groups or users.

    • @govindanpotti5005
      @govindanpotti5005 4 หลายเดือนก่อน

      @@letsfindsolutionsThank you!

  • @AWSFan
    @AWSFan 4 หลายเดือนก่อน

    Absolutely the content am looking for.. I also would like to know how to write custom response body in postman when status code is "200 OK"

    • @letsfindsolutions
      @letsfindsolutions 4 หลายเดือนก่อน

      You would need to write a custom lambda for that.

  • @rishabhraj1772
    @rishabhraj1772 4 หลายเดือนก่อน

    Thank you man Actually i am trying this its works on postman ,but i want to use API gateway endpoint in my JS code can you please suggest me .

    • @letsfindsolutions
      @letsfindsolutions 4 หลายเดือนก่อน

      You could just use a library like axios or just use jquery ajax calls to the api. Keep in mind this expose your keys, so really its best to have it call your own back end layer which then calls your api to keep the keys hidden.

  • @pa7235
    @pa7235 4 หลายเดือนก่อน

    nice, no nonsense, no silly accent, 10/10 thank you sir

    • @letsfindsolutions
      @letsfindsolutions 4 หลายเดือนก่อน

      Thank you kindly

    • @RebornLegacy
      @RebornLegacy 4 หลายเดือนก่อน

      Just curious, what's a silly accent?

    • @zishanchaudhary221
      @zishanchaudhary221 2 หลายเดือนก่อน

      @@RebornLegacy indian accent

    • @RebornLegacy
      @RebornLegacy 2 หลายเดือนก่อน

      @@zishanchaudhary221 Ohhh, so you guys are neanderthals complaining about free instructional material. Got it

  • @kouroshbaghaei382
    @kouroshbaghaei382 4 หลายเดือนก่อน

    Thanks a lot! Very concise and to the point! 👌

  • @user-gr7no2pn3l
    @user-gr7no2pn3l 5 หลายเดือนก่อน

    thanks for the great video, I'm starting a project where I'll need to use S3, why use the API Gateway and not S3's own REST API?

    • @letsfindsolutions
      @letsfindsolutions 4 หลายเดือนก่อน

      I had a use case to use a custom authorizer, so api gateway allows for this type of configuration.

  • @jameswild7558
    @jameswild7558 5 หลายเดือนก่อน

    So insightful! Thank you.

  • @gunyung0089
    @gunyung0089 5 หลายเดือนก่อน

    7:53 When you change the password the second time, it says 'localhost has refused to connect'. How can I solve this? 8:44 I tried it on Postman, but I couldn't get the token's value and it came out the same way

    • @letsfindsolutions
      @letsfindsolutions 5 หลายเดือนก่อน

      Not really sure of the issue...just make sure you are using the id token and not the access token. Postman finally updated the ability to use the id token...so maybe try again.

  • @sachinbaghel6225
    @sachinbaghel6225 5 หลายเดือนก่อน

    When I give a path resource, it does not get it

    • @letsfindsolutions
      @letsfindsolutions 5 หลายเดือนก่อน

      Maybe try recreating it. Sometimes that helps.

    • @sachinbaghel6225
      @sachinbaghel6225 5 หลายเดือนก่อน

      @@letsfindsolutions by the way thak its help

    • @gurpreetkaur-cw8wo
      @gurpreetkaur-cw8wo 2 หลายเดือนก่อน

      i am also facing same problem while creating resource in API gateway can't add brackets with bucket in resource path, same with filename , my resource path is not taking brackets or I can say anything . error invalid mapping expression parameter specified can you help me

    • @sachinbaghel6225
      @sachinbaghel6225 2 หลายเดือนก่อน

      @@gurpreetkaur-cw8woWhen creating a resource, simply write the name within {} brackets, and it will work.

  • @waytobhushan
    @waytobhushan 5 หลายเดือนก่อน

    Hi @letsfindsolutions Your video is like, follow me. Crisp and up to the point. It took hardly 20min to reproduce what you have explained. Wish to see more video from you.

    • @letsfindsolutions
      @letsfindsolutions 5 หลายเดือนก่อน

      Will eventually add more when I get time.

  • @randall.chamberlain
    @randall.chamberlain 6 หลายเดือนก่อน

    Nice and to the point

  • @joshuac9142
    @joshuac9142 6 หลายเดือนก่อน

    Top quality stuff!

  • @saatwikmehta2916
    @saatwikmehta2916 7 หลายเดือนก่อน

    Straightforward and awesome video

    • @letsfindsolutions
      @letsfindsolutions 7 หลายเดือนก่อน

      I am glad you found it helpful. I do plan on making more, just need to find the time.

  • @jumboliah13
    @jumboliah13 8 หลายเดือนก่อน

    Great video. Great content and well executed and straightforward. Well done.

  • @anandbabu01
    @anandbabu01 8 หลายเดือนก่อน

    AWS UI changed now. Cognito UI looks entirely new and unable to get published the user login page.😥

    • @letsfindsolutions
      @letsfindsolutions 8 หลายเดือนก่อน

      See if you see the option for classic mode...if so you xan switch back to that view maybe

  • @Not0rious7
    @Not0rious7 8 หลายเดือนก่อน

    You saved the day! I had t use oauth 2.0 in postman and not the bearer token dropdown

  • @shantanusahu9168
    @shantanusahu9168 8 หลายเดือนก่อน

    i am getting internal server error while calling the api. is it something to do with WAF or ListWebACLs?

    • @letsfindsolutions
      @letsfindsolutions 8 หลายเดือนก่อน

      Internal server error leads me to believe maybe code related...did you modify the sample code?

    • @shantanusahu9168
      @shantanusahu9168 8 หลายเดือนก่อน

      @@letsfindsolutions there's no code..i followed your steps.. m getting a WCL error on the screen tho,,,could it be the issue? or it seems like s3 access isue

    • @letsfindsolutions
      @letsfindsolutions 8 หลายเดือนก่อน

      Ya could be s3 permission issue

  • @sudeepshiv
    @sudeepshiv 8 หลายเดือนก่อน

    great video and thanks for sharing. I would like to upload via browser instead of postman, is there any way to api via browser ?

    • @letsfindsolutions
      @letsfindsolutions 8 หลายเดือนก่อน

      Yes, you would need to build a front end ui...like a react ui web page that can make calls to the api similar to postman.

    • @PreetkanwalSingh
      @PreetkanwalSingh 28 วันที่ผ่านมา

      @@letsfindsolutions can you tell how to do that in Vue.js , i tried a lot, didnt get any solution

  • @ujjwalm29
    @ujjwalm29 8 หลายเดือนก่อน

    In this method, can anybody in the world upload to my bucket? What if i wanted to restrict it to just myself? Using an access token or api key?

    • @letsfindsolutions
      @letsfindsolutions 8 หลายเดือนก่อน

      With api gateway you can enable an Authorizer and have it validate a token i the header. You can setup cognito to work with the authorizer to validate the tokens.

    • @letsfindsolutions
      @letsfindsolutions 8 หลายเดือนก่อน

      Look at my other video about jwt authorizer....you would use the same approach there.

  • @kienvan1006
    @kienvan1006 9 หลายเดือนก่อน

    How can I get the content of the file in the bucket using the api? I mean GET method

    • @letsfindsolutions
      @letsfindsolutions 9 หลายเดือนก่อน

      You would need to write a new get method to read and serve back the content.

  • @user-uj4fo6oo5d
    @user-uj4fo6oo5d 9 หลายเดือนก่อน

    Thanks it works for me, now problem i am facing is, once file upload to s3 bucket i can see file, but when i use to open that file with object url than my file is not opening, its giving me error like access denied so let me know how to give public writes to view that file simultaneously.

    • @letsfindsolutions
      @letsfindsolutions 9 หลายเดือนก่อน

      I believe you will need to update the permissions of the s3 bucket to allow for public read.

    • @user-uj4fo6oo5d
      @user-uj4fo6oo5d 9 หลายเดือนก่อน

      @@letsfindsolutions Thanks i done yesterday only by myself by creating policy

  • @user-pe3bd3sq7s
    @user-pe3bd3sq7s 10 หลายเดือนก่อน

    no it did not work time wasted

    • @letsfindsolutions
      @letsfindsolutions 10 หลายเดือนก่อน

      Sorry to hear it did not work for you.

  • @sayedimran5972
    @sayedimran5972 10 หลายเดือนก่อน

    Hi there, I just switched to the updated console for API Gateway and tried to get the same scenario, but over there, it is not allowing me to give the Path override field as {bucket}/{filename} rather just the {bucket}. Also after deploying the API Gateway, I am getting this error: <?xml version="1.0" encoding="UTF-8"?> <Error> <Code>MaxMessageLengthExceeded</Code> <Message>Your request was too big.</Message> <MaxMessageLengthBytes>10240</MaxMessageLengthBytes> <RequestId>5KN0W9VZX436B9S8</RequestId> <HostId>K1j8PseM9Rxky8woHv6VjSH2zAU1ta7Raqk9nOJF7untXTnoFN/0y7ngSAMp0jBX4BU7xZiuG6Y=</HostId> </Error>

  • @azoz1433alamodi
    @azoz1433alamodi 10 หลายเดือนก่อน

    sir , you are a life saver , thank you

  • @user-ti5zm2wy1l
    @user-ti5zm2wy1l 10 หลายเดือนก่อน

    what are configuration for your stage of dev? And my problem is that file successfully upload but size is 0kb so any solution?

    • @letsfindsolutions
      @letsfindsolutions 10 หลายเดือนก่อน

      What are you using to test the upload? In the video I use postman and i believe all its doing is converting the data to base64 encoded binary data. Similar to what a web browser would do.

    • @user-ti5zm2wy1l
      @user-ti5zm2wy1l 10 หลายเดือนก่อน

      Thanks @@letsfindsolutions

  • @P.Shivakrishna
    @P.Shivakrishna 10 หลายเดือนก่อน

    While Edit integration request to add URL path parameters when click save it showing Network Failure( Anyone help Currently I am Using ap-south-1 Region ) i don't know what is the problem ??

    • @letsfindsolutions
      @letsfindsolutions 10 หลายเดือนก่อน

      Not sure im understanding the iasue...but maybe try switching regions. I usually use us east.

    • @P.Shivakrishna
      @P.Shivakrishna 10 หลายเดือนก่อน

      @@letsfindsolutions I tried us east also but it's not working in api gateway

    • @gurpreetkaur-cw8wo
      @gurpreetkaur-cw8wo 2 หลายเดือนก่อน

      i am also facing same problem while creating resource in API gateway can't add brackets with bucket in resource path, same with filename , my resource path is not taking brackets or I can say anything . error invalid mapping expression parameter specified

    • @gurpreetkaur-cw8wo
      @gurpreetkaur-cw8wo 2 หลายเดือนก่อน

      I resolve my problem put path in single inverted comma '' that will work as i am not getting option to put curly brackets

  • @Vstosky
    @Vstosky 10 หลายเดือนก่อน

    It should return the link for access the file

    • @letsfindsolutions
      @letsfindsolutions 10 หลายเดือนก่อน

      That can be customized if needed

  • @MayankGaurm
    @MayankGaurm 11 หลายเดือนก่อน

    This is really great video. I have few questions 1. Did you pass any token in header for validation. 2. I can give this url to upload file to anyone, whether he is a AWS user or not

    • @letsfindsolutions
      @letsfindsolutions 11 หลายเดือนก่อน

      1. There is no security around it so no token is needed. You can add cognito security with an authorizer to validate a token if needed. 2. Yes the url is public and open. It can be called like any other api publicly. They do not need to be anaws user.

    • @MayankGaurm
      @MayankGaurm 11 หลายเดือนก่อน

      @@letsfindsolutions many thanks.

    • @letsfindsolutions
      @letsfindsolutions 11 หลายเดือนก่อน

      I am glad you found the video helpful...I really do plan to make more...just haven't found the time to lately.

  • @sandipkuila
    @sandipkuila 11 หลายเดือนก่อน

    Thanks for this solution. I have implemented this for MS excel file upload but the size got change every time. Can you please help me out with the solution for that. Facing the issue with format change and file size got increased during upload.

    • @letsfindsolutions
      @letsfindsolutions 11 หลายเดือนก่อน

      Did you follow the video...what media types have you defined?

    • @sandipkuila
      @sandipkuila 11 หลายเดือนก่อน

      @letsfindsolutions I have allowed all media types. But only for Excel, it got format change happens

    • @letsfindsolutions
      @letsfindsolutions 11 หลายเดือนก่อน

      Maybe the encoding ia somehow getting changed on upload...excel would be similar to other binary files.

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

    good one, thank you

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

    How would it be via POST, to send file via base64 string?

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

      I think you can change the method to a POST and just add in additional media types to handle the base64 encoded data being passed.