I’m learning JavaScript and using AWS SDK from JavaScript. Reading an IAM example from the documentation, i saw the following pattern: Create a file name iamClient.js where you instantiate an object and export it. Create another file where you import the client created above to use it. What is the main benefit of doing this instead of just create and
Tag: amazon-web-services
App worked on VSCode but didn’t after deployed to Lambda, no error in CloudWatch
I have this piece of code that runs perfectly fine locally. But after I deployed it to AWS Lambda, it didn’t execute as expected, plus, it did not print any errors to CloudWatch for me to see what had happened. I assume that it was because of the async/await that caused it but it seems to be correct. Did anyone
Multipart/form-data request to AWS Elastic Beanstalk returns status 500
I have an API in my web application that makes it possible for users to upload files (audio and images), and everything works perfectly fine when I use an npm module like multer or multiparty for the parsing of the files. However, when I run this application on AWS Elastic Beanstalk, any multipart/form-data request to the server fails. (Note: I
Why the following code takes more time locally?
I wrote the following lambda to move messages from queueA to queueB With lambda config of 256 MB it takes 19691ms and with 512 MB it takes 10171ms to move 1000 messages from queueA to queueB. However, on my local system when I run reprocess_messages(qA, qB) it takes around 2 mins to move messages from queueA to queueB. Does this
React doesn’t refresh state in LocalStorage
how are you? Im doing a proof of concept using React and Cognito Hosted UI. I have this code here using react router dom: Im using S3 as a static website hosting, thats why i point to S3 cloudfront distribution apex. Then, in my App function (residex inside App.js file), i make this validation every times the user access, to
Return URL from file uploaded to AWS S3
I have a function that makes an API request containing the URL of a new file I just uploaded to AWS S3. And I have one function that only upload the file to S3. I am having issues with returning this URL of the uploaded file. Here is my code: Here is the SDK doc with the upload example: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#upload-property
session.isvalid() is always valid amazon cognito
The problem is that even after expiration time that is 5 min for ID token and access token, the session is still validated for some reason I cannot understand. Can someone help me what should I Do? I tried waiting for 5 min or more to check if token has expired or not but it still says that it is
Empty image when uploading to presigned AWS S3 url in React Native
I’m trying to upload image to AWS S3 in my React Native(expo managed workflow), but in result the file is empty. I don’t get any errors through the process. I’ve also tried to upload it using Uppy AWS plugin, but result is the same. Here is my code: I am using expo image picker to get the file. I’ve also
Getting error when executing a lambda function – Parameter “userId” has value with no field set
I guess I am making a silly coding mistake, but have been trying for more than a day. I am trying to insert records onto aurora table with the parameters received as a stream from dynamodb table. I cant seem to set the parameters on the params object correctly. I want the sql statement and the parameters on the params
How to integrate Azure Voice API in node.js
Now I am integrating Azure Voice API in my MERN stack project. I tested it in console with debugging but it doesn’t work on React Website. I am not sure what’s the problem. Answer To use Azure Voice Api, You need to get the authorize from the Azure Support team. If you didn’t get it, you can’t call it in