简体   繁体   中英

Using Post Method in angular app hosted in S3 in AWS

I have uploaded my angular 6 app to S3 in AWS.
I wish to use a post method to take user input and move it using API Gateway.
Later i would want to move the user entered data to DynamoDB.

So my question boils down to this.
How do i move my user submitted data from angular app to dynamodb using post method ?

I am new to AWS so any help you can give me will be most appreciated.

Thanks in advance.

You need to setup an endpoint in API Gateway that accepts a POST request. Then from the Angular side this would be a simple HTTP POST request just like any other, there would be nothing AWS specific about it in your Angular code unless you want to enable some sort of authentication on the endpoint.

On the backend the API Gateway endpoint can either act as a DynamoDB proxy to insert the data directly into DynamoDB, or it can call an AWS Lambda function which would then insert the data into DynamoDB using the AWS SDK.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM