amazon-archives / awsmobile-cli

CLI experience for Frontend developers in the JavaScript ecosystem.
Apache License 2.0
142 stars 35 forks source link

How to switch from "development" to "production" #161

Open jbarwick opened 6 years ago

jbarwick commented 6 years ago

I asked this question from AWS support with no helpful answer:

The current deployment stage is:

sdk-generation-stage-name: Development

How are you supposed to switch to "Production"?

What is the workflow?

Now that I am in production, I'd like to use a production stage. And, make updates to a development stage so I can test.

Again, I asked this exact question to AWS support and they gave the answer:

"The stage name corresponds to the APIGatway stage".

I understand this. I get it. But, I don't yet understand the workflow from "development -> staging -> production" with MobileHub. And since APIGateway is a lambda proxy, I'd like to see lambda functions from development/staging/production or whatever stage I set the stage-name to.

Is there a blog somewhere?

swaminator commented 6 years ago

@jbarwick: Checkout https://stackoverflow.com/questions/50736739/how-to-handle-development-to-production-process-with-multiple-aws-services/50751535?noredirect=1#comment88528527_50751535

The solution is to create two Mobile Hub projects.

matthewsommer commented 5 years ago

Hi @jbarwick did you ever figure this out? Even with two mobile hub projects how do you change the default path to be 'production' instead of 'development'?

jbarwick commented 5 years ago

@matthewsommer I think it makes the most sense to create two projects. So, managing this in git will be what's necessary.

matthewsommer commented 5 years ago

@jbarwick okay, thanks for the quick response! How do you even change it in the first place? If I try to change "sdk-generation-stage-name: Development" to "sdk-generation-stage-name: Production" it reverts back when it syncs. Does it need to be set from the first push of the project?

For my use case it might make sense for me to use Organizational Units to separate prod from dev.

swaminator commented 5 years ago

@jbarwick: Would love to chat with you if you have time. If you can share your email I can set something up.

nishanthk commented 5 years ago

Having similar issue, is there a fix for this ?