[英]AWS S3 on multiple devices
Ok, so I am new to AWS. 好的,所以我是AWS的新手。 I want to make an app that will store a small amount of user data.
我想制作一个将存储少量用户数据的应用程序。 S3 seems to be the way to store data.
S3似乎是存储数据的方式。 Is there a way to make multiple storage spaces automatically with S3?
有没有办法用S3自动创建多个存储空间? Lets say I make an android app and people install it on their phone.
可以说我制作了一个android应用,人们将其安装在手机上。 Will they each automatically get an S3 storage space?
他们每个人都会自动获得一个S3存储空间吗? how do I do that?
我怎么做? thanks
谢谢
You can create a S3 Bucket to your project with folders (depending on the architecture, can be one for customer). 您可以使用文件夹为您的项目创建一个S3存储桶 (取决于体系结构,可以供客户使用)。 On this way, you will have an instance of the s3 service with all your user data.
这样,您将拥有包含所有用户数据的s3服务实例。
Amazon S3 is simply an object-storage system. Amazon S3只是一个对象存储系统。 How you use it is totally up to you.
您如何使用它完全取决于您。
If you wish to store information on a per user basis, then you need to consider security in addition to how the data is stored. 如果你想存储在每个用户的基础信息,那么你就需要考虑另外的安全的数据存储方式 。
If the intention is that a user can access some information that is private to them (as opposed to being publicly visible to anyone), then you first need to control access to data. 如果意图是用户可以访问一些他们专有的信息(而不是对任何人公开可见),那么您首先需要控制对数据的访问。
You should not give permanent AWS Credentials (Access Key, Secret Key) to every user. 你不应该给予永久AWS凭证(访问密钥,秘密密钥)的每一个用户。 These credentials are only for your IT operations staff (you!) and for your applications.
这些凭据仅适用于您的IT运营人员(您!)和您的应用程序。
This leaves two options: 剩下两个选择:
Based upon your use-case, it seems a better fit to use pre-signed URLs . 根据您的用例,使用预签名的URL似乎更合适。 Basically, the flow is:
基本上,流程是:
Only the app running on your central server requires AWS credentials. 只有在中央服务器上运行的应用程序才需要AWS凭证。 It then uses those credentials to generate pre-signed URLs that can be used by the client apps.
然后,它使用这些凭据生成客户端应用程序可以使用的预签名URL。
By the way, the app on the central server doesn't actually need to be running on a server. 顺便说一下,中央服务器上的应用程序实际上不需要在服务器上运行。 You could use AWS API Gateway to send requests to AWS Lambda functions, which can perform the logic and send back the response.
您可以使用AWS API Gateway将请求发送到AWS Lambda函数,该函数可以执行逻辑并发回响应。 This would be a serverless solution, but still with centralized logic.
这将是一个无服务器的解决方案,但仍具有集中式逻辑。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.