AWS Mobile Hub Environments

296 views Asked by At

I'm currently working through my first AWS Mobile Hub project, and it's going pretty well so far. However one thing which is unclear is how "production" deployments are managed.

My Mobile Hub project is using features including:

  • Sign In (Cognito)
  • NoSQL Database (DynamoDB)
  • Cloud Logic (API Gateway & Lambda)

Is there any way to make a distinction between a "development" and "production" environment?

For example, maintain a separate "Users" DB for development and production, and if so, how would i configure the app code (React Native) to know which DB / environment to talk to.

Similarly for API Gateway, i can see that it has created a "Development" stage, but it's not clear whether i should be pointing my production iOS/Android build directly at this Development stage, or if i should be deploying a "production stage", and again, if so, how would i integrate this environment specific switching login in my app code.

Thanks in advance!

1

There are 1 answers

1
Victor 'Chris' Cabral On

I don't know if there is a simple distinction but there are some options I have seen in the docs.

Detach from existing awsmobile project

awsmobile init --remove

Attach to new existing awsmobile project

awsmobile init <awsmobile-project-id>

Track the ids of the environments when you deploy.

Mobile ID

https://console.aws.amazon.com/mobilehub/home?region=us-east-1#/[awsmobile-project-id]/build