简体   繁体   English

在AWS的S3中托管的角度应用程序中使用发布方法

[英]Using Post Method in angular app hosted in S3 in AWS

I have uploaded my angular 6 app to S3 in AWS. 我已将我的angular 6应用程序上传到AWS中的S3。
I wish to use a post method to take user input and move it using API Gateway. 我希望使用post方法接收用户输入并使用API​​ Gateway移动它。
Later i would want to move the user entered data to DynamoDB. 稍后,我想将用户输入的数据移至DynamoDB。

So my question boils down to this. 所以我的问题可以归结为这一点。
How do i move my user submitted data from angular app to dynamodb using post method ? 如何使用post方法将用户提交的数据从angular应用程序移动到dynamodb?

I am new to AWS so any help you can give me will be most appreciated. 我是AWS的新手,因此,您能给我的任何帮助将不胜感激。

Thanks in advance. 提前致谢。

You need to setup an endpoint in API Gateway that accepts a POST request. 您需要在API网关中设置一个接受POST请求的终结点。 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. 然后从Angular角度来看,这将是一个简单的HTTP POST请求,就像其他任何请求一样,除非您想在端点上启用某种身份验证,否则在Angular代码中将没有关于它的AWS特定要求。

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. 在后端,API Gateway端点可以充当DynamoDB代理以将数据直接插入DynamoDB中,也可以调用AWS Lambda函数,然后使用AWS开发工具包将数据插入DynamoDB中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在AWS S3中托管的Angular应用程序中加载指定为url query param的组件 - Load a component specified as url query param in an Angular app hosted in AWS S3 使用代码管道在 AWS S3 上部署 Angular 7 应用程序时出错 - Error while deploying Angular 7 app on AWS S3 using codepipeline 在AWS S3上部署Angular 2应用程序 - Deploy Angular 2 app on AWS S3 在 AWS S3 + Cloudfront 上更新 Angular 应用程序 - Update Angular app on AWS S3 + Cloudfront 当app是在S3中托管的静态内容时,路由到Angular组件 - Routing to Angular components when app is static content hosted in S3 刷新 S3 上托管的 Angular 应用程序的路由时出错 - Error on refreshing routes for Angular app hosted on S3 将 AWS S3 用于 Angular SSR 存储 - Using AWS S3 for Angular SSR storage 托管在 AWS 重定向上的 Angular 应用程序在 S3 之前提供拒绝访问 - Angular application hosted on AWS redirection gives access denied having cloudfront ahead of S3 如何使 Angular Service Worker 识别 AWS CloudFront 中托管的静态托管 S3 存储桶中已部署应用程序的新版本 - How to make an Angular Service Worker recognize new versions of a deployed application in a static-hosted S3 bucket hosted in AWS CloudFront 使用AWS S3和CodePipeline自动执行Angular 7 App部署 - Automating Angular 7 App Deployment with AWS S3 and CodePipeline
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM