srcecde / aws-tutorial-code Goto Github PK
View Code? Open in Web Editor NEWAWS tutorial code.
Home Page: https://www.youtube.com/srcecde
License: MIT License
AWS tutorial code.
Home Page: https://www.youtube.com/srcecde
License: MIT License
After print(event) , I noticed that it should be 'content-type' not 'Content-Type'.
Great tutorial on API Gateway on Youtube. Love it.
Hi,
please let me know how to resolve this issue.I followed your youtube tutorial "How to upload file with metadata - Amazon API Gateway p13" but while running API through postman it is getting error --->{
"message": "Could not parse request body into json: Could not parse payload into json: Unrecognized token 'LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLTg5NTE2NzMyNDY5NzM4ODUwNDgxNzA1NA0KQ29udGVudC1EaXNwb3NpdGlvbjogZm9ybS1kYXRhOyBuYW1lPSJmaWxlIjsgZmlsZW5hbWU9IldvcmtzcGFjZSAtIEF6dXJlIE1GQSBTZXR1cC5wZGYiDQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL3BkZg0KDQolUERGLTEuNAol4uPP0woz...': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')\n at [Source: (byte[])"LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLTg5NTE2NzMyNDY5NzM4ODUwNDgxNzA1NA0KQ29udGVudC1EaXNwb3NpdGlvbjogZm9ybS1kYXRhOyBuYW1lPSJmaWxlIjsgZmlsZW5hbWU9IldvcmtzcGFjZSAtIEF6dXJlIE1GQSBTZXR1cC5wZGYiDQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL3BkZg0KDQolUERGLTEuNAol4uPP0wozIDAgb2JqCjw8L0NvbG9yU3BhY2UvRGV2aWNlUkdCL1N1YnR5cGUvSW1hZ2UvSGVpZ2h0IDcyMC9GaWx0ZXIvRmxhdGVEZWNvZGUvVHlwZS9YT2JqZWN0L1dpZHRoIDU0MC9MZW5ndGggODA0NzAvQml0c1BlckNvbXBvbmVudCA4Pj5zdHJlYW0KeJzsXQd4FdXW9f0KpAPie88GBFJIpYUOISG990YIIYUkgg2xgZWiIqCCCFKk"[truncated 475584 bytes]; line: 1, column: 257]"
}
The pdf that is uploaded to the S3 bucket is blank i.e. the pdf is formed of the same name as given in metadata and also the no of pages is also preserved but every page is blank without any content.
This file has the below code which attempts to put the text into a .txt file and sends to the same bucketName which will cause another object to be placed into the same bucket which in turn invokes Lambda again.
This bucket name should be changed to a separate bucket to avoid recursion if you want to view the text in .txt file in S3.
s3.put_object(
Bucket=bucketname,
Key=f"output/{filename.split('/')[-1]}_{uuid.uuid4().hex}.txt",
Body=str("\n".join(raw_text)),
)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.