How to upload binary files using API Gateway - Amazon API Gateway p6

preview_player
Показать описание
Welcome to part 6 of the tutorial series on Amazon API Gateway. In this tutorial, I have demonstrated how to upload binary files using API gateway, lambda function to S3 bucket. Also, I have covered how to decode the binary data with the code snippet within the lambda function.

---
Support my work:
---
Paytm | Gpay: 9023197426

---
---

---
Series Tutorial
---

---
Another channel:
---

---
Connect with me
---
Рекомендации по теме
Комментарии
Автор

hello, ive tried this and in postman t says success but the file is not stored in s3 bucket why so?

spurthimadhukar
Автор

Bhai Bahut-bahut Dhanyabad, you are a life saver!

mtechthesis
Автор

Hello again man, is there a way that you can upload files other than pdf format like jpg and png to S3? I tried adding more Media types and Mapping template (ex. image/png).. but still wont work to me. Im also trying to retain the file name when uploaded to S3 (not renaming to content.pdf) and everything I do wont work. Do you have a way to these?

didin
Автор

In case of images, will the content type and binary media type by "image/*" ??

GAURAVKUMAR-bcvd
Автор

Hi, thanks fro wonderful tutorial.
But in my case, I want to pass images, and it is not working.
"Unsupported media type", is shown.
Kindly help me with this.

Thanks

MuhammadAli-migg
Автор

These are some really good videos on API gateway and your explanations are very good

geogyzachariah
Автор

How to give filename dynamically from tar file which we are uploading

ArjunKumar-dfpr
Автор

how can I get the actual file name from the event['content'] so that each upload has a unique name from the sender instead of having a static name "content.pdf?"

thabombulawa
Автор

i can not find the p1 you said in this lesson in that you had create a lambda-api-gateway-role, can you give me the URL here ?

ハオ光明
Автор

how can i store multiple files in s3 at a time using apigateway and lambda?

suryanarayana
Автор

Hey bro, I followed all the steps and i was able to upload the pdf file to S3 but when i saw the object on s3, it has 0 byte? Do you know whats the reason? or fix

didin
Автор

Hey man, thanks for the video, it was really helpful and it works as expected on postman though when I tried to upload it from my react native expo application, I get an error. Can you share an example on how I could address this?

richardsonlyon
Автор

I was able to upload the pdf. However the pdf file was named as file.pdf in s3 and also, when I try to upload multiple files, it gives a success message but the number of files in the bucket remains the same.

saliltare
Автор

hi Srce, I followed the steps but I used Nodejs in lambda function. I can upload the pdf file to S3, but the file in S3 is blank and also when I downloaded that file to my pc, I cannot open it. my lambda function code as follows:

const AWS = require('aws-sdk')
const s3 = new AWS.S3()

exports.handler = async (event, context) => {


let fileContent = event["content"];

// let decode_content = Base64.decode(fileContent);
let decodeContent = Buffer.from(fileContent, 'base64').toString('ascii');

let params = {
Body: decodeContent,
Bucket: "mybukkk",
Key: "content.pdf"
};

let result = await
return result;
};

actually the response I receive in the postman is the Etags number. I don't know why I got a blank pdf file, maybe the decode method is not right. pls help me.

danieljing
Автор

Say I want to pass the S3 bucket name and file name in Path parameter and QueryString parameter in GET/POST request and along with in the body want to attach a pdf file. Is it possible to implement in API Gateway? in that case what should be Content-Type to set in Method Integration request and how we can write the required body mapping template?

satyajitnath
Автор

Can you make how to use aws lambda function in flutter app.
If not you have any suggestion where i found this types of video

GloryOfWedding
Автор

Hi! could you do a video but with gzip compress to send the data to a Lambda Function?

victorsanchezgarcia
Автор

great work.

I have question, how can we pass more parameter to this function & access it in python lambda function?

Lets say I want to session id along with file.

can this be achievable?

iammulani
Автор

Great video. Upto the point.
can we upload two or more files using one api gateway? And if so then how to do it? can you explain please.

mike
Автор

What if I wish to upload different type of files ? Let say jpg and pdf. So while writing to s3 bucket using lambda expression how do I take care of this?

ssquare
welcome to shbcf.ru