danielfeelfine
danielfeelfine

Reputation: 1874

What is the best way to work with environments in AWS API Gateway?

I am using AWS to build an API, and deploy this to multiple stages.

When a call is made to a specific environment, I need to get a stage variable in Lambda and then data is recorded in a DynamoDB table such as "environment-Table".

Is this the best way to work with environments (like development, production etc) using AWS API Gateway, Lambda and DynamoDB?

Upvotes: 2

Views: 163

Answers (1)

MikeD at AWS
MikeD at AWS

Reputation: 3745

It difficult to say what the best approach is for your specific situation, given the limited data in your post. Managing multiple environments such as development and production was one of the intended uses of stage and stage variables. I don't see any obvious problems with what your are proposing.

Depending on your use case, you can call a Lambda function to record data in DynamoDB, or you may be able to skip the Lambda function and record the data in DynamoDB directly using the AWS proxy integration type.

Upvotes: 0

Related Questions