简体   繁体   English

如何编写将文件从 aws 客户端机器上传到 s3 存储桶的 api?

[英]How do I write an api that uploads files from aws client machine to s3 bucket?

I am writing an api that does some operations on files in the s3 bucket but that file needs to be uploaded from from aws client machines from different regions to s3 bucket using some other api.我正在编写一个 api,它对 s3 存储桶中的文件执行一些操作,但该文件需要使用其他一些 api 从不同区域的 aws 客户端机器上传到 s3 存储桶。

Prachi, I'm assuming that client machines are AWS EC2 Instances, these are the steps that you'll need to follow: " Prachi,我假设客户端机器是 AWS EC2 实例,这些是您需要遵循的步骤:“

  1. Create IAM Role with permissions to that specific S3 bucket.创建具有该特定 S3 存储桶权限的 IAM 角色。
  2. Attach IAM Role to EC2 to give client instances permission to interact with S3.将 IAM 角色附加到 EC2 以授予客户端实例与 S3 交互的权限。
  3. Use AWS SDK on client machines to put the file to S3 Bucket.在客户端计算机上使用 AWS SDK 将文件放入 S3 存储桶。 You can either use nodejs or python boto3 .您可以使用nodejs或 python boto3

You should be able to get most of the things above on single google search.您应该能够通过单一的谷歌搜索获得上述大部分内容。

暂无
暂无

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

相关问题 如何使用 AWS Lambda 函数将文件从 AWS S3 存储桶复制到 EC2 linux 机器 - How to copy files from AWS S3 bucket to EC2 linux machine using AWS Lambda Functions 如何仅将更新的文件/文件夹从 aws s3 存储桶复制到本地机器? - How to copy only updated files/folders from aws s3 bucket to local machine? 如何使用.NET API为AWS S3上传生成请求签名? - How do I generate my request signature for AWS S3 uploads using the .NET API? 如何使用 AWS CLI 将名称每天更改的文件移动到 AWS S3 存储桶? - How do I move files whose name changes daily to AWS S3 bucket using AWS CLI? 如何将 AWS S3 存储桶与远程非 AWS 服务器上的文件同步? - How do I sync an AWS S3 bucket with files on a remote non-AWS server? AWS S3 Bucket Policy允许从aws机器学习中进行读/写访问 - AWS S3 Bucket Policy to allow read/write access from aws machine learning AWS-s3:如何根据文件名将文件从 s3 存储桶复制到另一个 s3 存储桶 - AWS-s3 : How to copy files from s3 bucket to another s3 bucket based on filename 如何在 Ruby 中将所有文件和子文件夹从一个文件夹复制到同一 AWS S3 存储桶中的另一个文件夹 - How do I copy all Files and Sub-Folders from One Folder to another Folder in same AWS S3 bucket in Ruby 如何将文件从 S3 存储桶复制到 PHP(AWS SDK for PHP)中的 S3 存储桶? - How to copy files from S3 bucket to S3 bucket in PHP (AWS SDK for PHP)? 如何从 React 前端将文件上传到 AWS S3 存储桶 - How to upload files to AWS S3 bucket from the react frontend
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM