Monthly subscription plan for API access.

0

Using API Gateway and Lambda, I have built a simple chatbot. To cover my infrastructure costs, I would like to offer my users a monthly paid subscription plan, where the API is only accessible when the user is subscribed and pays a fixed monthly amount (no usage-based billing).

Naively, this should work by integrating the API Gateway with AWS Cognito and a payment service like Stripe. But I don't know how to stitch these things together. Or maybe different services are required. I am also open to marketplace solutions.

How can I charge a fixed monthly fee for API access?

1 Resposta
0

There's some very good information in this blog post about controlling access to API Gateway.

In this case, I'd look at a Lambda Authorizer for your API - something that can check the identity of the caller and whether they are authorized to use the API which in this case would be whether they are a valid subscriber or not. Note that you want the authorizer to be as low-latency as possible so it might be valuable to store a valid list of current subscribers in a key-value store like DynamoDB.

profile pictureAWS
ESPECIALISTA
respondido há um ano

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas