简体   繁体   中英

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. Part of it involves sending and receiving data to an Amazon SQS to communicate with some stuff on an EC2 instance. I don't want to distribute the API with my amazon keys in it though.

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?

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. If you want your own identity, then yes, you would need to build a service layer infront of AWS to broker API requests

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