AppSync functionality - amazon-web-services

i'm fairly new to AWS and all its services.
I'm looking for a low code solution to get data from an external HTTP api (RapidAPI) and store the JSON data (overwrite, update etc) into a corresponding AWS DB (probably Dynamo for my sins)
Is this doable using AWS AppSync? If so has anyone done this and know of any good tutorial material.
If anyone has done this with AppSync I would know where to start with my leaning.

Related

Using amplify to integrate app into existing AWS database

I'm developing an Android app that needs to work with an existing Amazon Web Service RDS database as well as an S3 bucket server also on AWS. My issue is that I'm struggling to find much in the way on guidance on the best approach to do so.
Currently the best thing I've found is Amazon's Amplify, the alternatives so far being SQLiteOpenHelper (seemingly unideal given that it looks to work almost exclusively with local databases, but an interesting caching option) and using Apache, which seems bad as it is extremely manual and largely deprecated.
Am I correct in then concluding Amplify is the best direction to take, or am I missing something big (it feels this way), in which case advice on how better to research this task would be immensely appreciated.
Amplify allows you to connect your app with any kind of datasource using AppSync, which is a GraphQL service managed, via resolvers that connects to anything that you want.
AppSync provides a GraphQL API including features like request and response mapping, authentication, cache and other useful things. Here you can have an overview about how it works https://aws.amazon.com/blogs/mobile/appsync-microservices/.
About how to use S3, Amplify can help with it, using amplify/cli is easy to add that resource, just running amplify add storage, as explained here https://docs.amplify.aws/lib/storage/getting-started/q/platform/android/.

How do I get elements out of a AWS DynamoDB for a simple web app?

I am part of a student group that is trying out AWS and trying to build a VERY small basic severless application. We did one of the AWS
tutorials ( https://aws.amazon.com/getting-started/hands-on/build-web-app-s3-lambda-api-gateway-dynamodb/?nc1=h_ls ).
So now we have this web app where we can save names in a DynamoDB. But how can we access the DynamoDB with Lamda/ Frontend (JS) to get elements out of it and display the information? All these services with API Gateway, DynamoDB and Lamda and how they work together is quite confusing. We can't figure out how to use a simple REST API to get elements out of the Database.
Can anyone help us out? Thanks in advance!!
Try using one of the strongly typed AWS APIs to build an application that uses Amazon DynamoDB. There is a Spring based example that builds an application that performs CRUD operations on data located in an Amazon DynamoDB table. This example uses the Enhanced Client that perform data mapping between Java classes and a table.
Map items in DynamoDB tables
Link to the AWS tutorial that uses the Java API V2 is:
Creating the DynamoDB web application item tracker
Likewise, here is a JavaScript example that uses Amazon DynamoDB:
Build an app to submit data to DynamoDB
If you are using the boto3 libraries, they are fairly well documented.
In this case, you probably want to look into the get_item method of the dynamo client.

How do I link a DynamoDB, Lambda Function, or Gateway API to an external API with a POST function?

I want to preface this with the fact that I'm not knowledgable with AWS really at all. I mostly do front end development and some very (very, very) basic MySQL.
Recently a new manager has joined my company and despite telling him, he seems to think I'm a backend developer. Because of that I've been tasked with hooking up an AWS flow that was in place (A DynamoDB table, an Gateway API and Lambda Function that connects them and also creates gists with tokens) to an external API that accepts data with a POST function.
Ideally I'd like to not have to touch anything to do with the Lambda function as I'm not 100% of how it works and the files are too big to do inline editing within the AWS dashboard.
Is there anyway I can set this up easily? Any help would be incredibly appreciated
p.s. Don't feel bad about talking down to me or anything. The easier and more clearly explained the better
The answer is not something I can just spit out here. You will have to do some learning and homework. That said here are some resources where you can learn quickly what you are trying to find out.
AWS Serverless home page
Serverless.com lambda information
AWS Serverless blog
AWS Serverless tutorials
AWS Serverless hands on building apps
AWS Serverless youtube channel
AWS Amplify
Free Amazon DynamoDB online training from Linux Academy

Creating AWS AppSync using AWS Lambda (NodeJS)

In my project, we create tables in AWS dynamodb based on the user id using AWS lambda (NodeJS).
Once the table is created the lambda function will create a graphql endpoint for that particular table so that the user can get real-time data for that specific table.
Can we create graphql endpoints which will also be seen in AWS appsync from AWS lambda (NodeJs)?
I searched the web but didn't find any tutorial from AWS nor any articles regarding it.
Well to be frank its will be very hard to achieve such functionality but if you still required then yes you can do that using AWS AppSync SDK
https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/AppSync.html
From you tags assuming that you are using javascript.
Just my suggestion :- Dont try to do such things as it wont be easy to manage multiple app async and cost will increased x10

AWS API Gateway POST Request for daily data load

I am someone who is totally new to REST APIs, pardon the newbie-ish mistakes.
My requirement is:
The source Database people wants to send JSON data on an hourly basis to an API endpoint which I publish. I am not sure of what all do I need to build to make sure it happens seamlessly. My target is to receive the data and create CSV files and save in it AWS S3 for further downstream processing.
My plan is, creating an AWS API Gateway endpoint which will accept POST requests and whenever anyone sends data through POST, the API Gateway will trigger AWS Lambda Function which will run Python to parse the JSON data to CSV and store in AWS S3. Is this thought valid? What all am I missing out? Are there best practices which needs to be implemented?
This architecture seems to be what you wanna do.
You wanna make sure that your API is secured with a key or via Cognito (more complex) and that your Lambda have the IAM permissions needed in order to access your bucket.
This post will help you understand the Lambda blueprint that is triggered when an object is upload to s3. Just change the Lambda trigger and a little bit the Python code and you're done.
Yes,this is a simple, typical serverless stack and it works perfectly fine.
Additionally, you may also focus on the authentication on the API Gateway end point to make it secure.