1

So I'm new to AWS, I created a couple lambdas and download the JS SDK so I can make requests and finally render everything I need on my VueJS project. I'm also using Cognito for authentication.

My questions are: Do I REALLY need to have "apigClientjs" inside my project? If there's no other way, how do I make requests?

Yes, I read the whole thing on AWS but I'm still confused.

2 Answers 2

1

You can use the package aws-sdk

https://www.npmjs.com/package/aws-sdk

Sign up to request clarification or add additional context in comments.

Comments

0

API Gateway can optionally generate an SDK from your API. No, you don't have to generate or use this SDK.

A very common practice, possibly the most common practice, is to simply front your Lambda functions with API Gateway and then use standard HTTP client libraries, such as request or axios to make HTTP requests to your Lambda functions.

3 Comments

Thank you! The thing is, my boss told my that I have to use SDK because it's a matter of security. I really wanted to make a simple axios, but he said I just can't use the url for x reasons. :/ If what you're trying to say is that I should use something like a normal endpoint, well, not happening. ):
The generated SDK would itself be making calls to the same API Gateway endpoints under the covers. Both that and an Axios-based client would be SSL. Obviously, how you authenticate your clients and secure your solution is important. I would go talk to your boss more to better understand the constraints that you're being asked to work with.
Exactly. I'll talk to him. I just figured out that I can also use Amplify + API Gateway. Well, thank you so much! :D

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.