Reputation: 737
We have a previous stack with some resources and outputs, and we want to add new resources, but when we add a new environment variable that reference a new stack output and we try to deploy with serverless we found that:
serverless deploy --stage Zzzz
Trying to request a non exported variable from CloudFormation. Stack name: "Xxxx-Cognito-Zzzz" Requested variable: "MyNewVariable".
I have the following .yml:
environment:
MY_NEW_ENVIRONMENT_VARIABLE: ${cf:${self:custom.serviceName}-Cognito-${self:custom.stage}.MyNewVariable}
Upvotes: 0
Views: 917
Reputation: 1138
In CloudFormation console:
Now go to your EC2 dashboard: (please be careful here, specially if you are in the production environment)
Note: It is recommended to have at least 2 instances in the cloud formation stack so that you don't face a downtime in the production environment. Once you delete the instance the traffic will be migrated to the other instance until your new instance is spawned and reaches a steady state. Once this is done, the other instance can also be terminated so that it can be replaced as well.
Upvotes: 1