简体   繁体   English

在不提供密钥的情况下在API中公开AWS的正确方法是什么?

[英]What is the correct way to expose an AWS in an API without giving out your keys?

Sorry about the awkward title. 不好意思的标题。

I am building a Python API. 我正在构建一个Python API。 Part of it involves sending and receiving data to an Amazon SQS to communicate with some stuff on an EC2 instance. 其中一部分涉及发送和接收数据到Amazon SQS,以与EC2实例上的某些内容进行通信。 I don't want to distribute the API with my amazon keys in it though. 我不想随同我的Amazon Key一起分发API。

What is the correct way around an issue like this? 解决此类问题的正确方法是什么? Do I have to write a separate layer that sits in front of SQS with my own authentication or is there a way to add permissions to amazon keys such that uses could just send and receive messages to SQS but couldn't create additional queues or access any other web services? 我是否必须使用我自己的身份验证在SQS前面编写一个单独的层,还是有办法添加对Amazon Key的权限,以便使用者只能向SQS发送和接收消息,但不能创建其他队列或访问任何队列其他网络服务?

It depends on your identity requirements. 这取决于您的身份要求。 If it's ok for your clients to have AWS accounts, you can give their accounts permission to send messages to your queue. 如果您的客户可以使用AWS账户,则可以授予其账户将消息发送到队列的权限。 If you want your own identity, then yes, you would need to build a service layer infront of AWS to broker API requests 如果您想要自己的身份,那么是的,您需要在AWS前端构建一个服务层以代理API请求

暂无
暂无

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

相关问题 将pandas / scikit-learn包添加到项目以在AWS lambda中使用的正确方法是什么 - What is the correct way to add pandas/scikit-learn packages to your project for use in AWS lambda 有什么方法可以使用 AWS textract API 而无需访问代码中的密钥? - Is there any way to use AWS textract API without giving access to secret key in code? 构建和公开机器学习模型 REST api 的最佳方法是什么? - What is the best way to build and expose a Machine Learning model REST api? 在ZOBD OOBTree中使用对象作为键的正确方法是什么? - What is the correct way to use objects as keys in a ZOBD OOBTree? 编写用于 AWS Lambda 的异步代码的正确方法是什么? - What is the correct way to write asyncio code for use with AWS Lambda? 有哪些方法可以弄清楚为什么你的神经网络会按照它的方式对数据进行分类 - What are some ways to figure out why your neural network classifies your data the way it does AWS产品API:什么是我们West 2的正确区域位置和URL - aws product api: what is the correct regional location and url for us west 2 在Python中从文本中解析IP和CIDR的正确方法是什么 - What is the correct way to parse IPs and CIDRs out of text in Python 这是生成rsa密钥的正确方法吗? - is this a correct way to generate rsa keys? 什么是写入文件路径的正确方法,以访问计算机上文件夹中的文档 - What is the correct way to write a file path, to access a document in a folder on your computer
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM