Repository navigation
Conversation
The issue described in serverless#4311 comes from the fact, that aws needs `provider.profile` and `provider.stage` to be resolved before attempting to resolve the ssm references. As there is no way to separate ssm variables from others, a short wait (10 ms) was added, before attempting to fetch the parameters from aws.
|
@jbreckel Appreciate your thoughts and work on this 👍 , but I don't think this is a proper and deterministic solution for the problem. The bug itself is strongly related to #4702 - all AWS API calls during the variable resolution have to await the proper variable resolutions (and that not by just waiting) that are currently queued. Only after they have been resolved, the calls can be made safely. @erikerikson Is probably already working on a solution for this, together with the cleanup of the resolution of variable dependencies. If not done together in his PR, we should at least wait with these API call fixes in the variable resolution, until the dependent variable resolution has been fixed. |
|
Thanks for calling my attention here @HyperBrain. This particular matter isn't directly addressed by my current work (#4713) but it definitely fits in. The current work to avoid deadlocks is very much about sorting dependency problems and this is that in another form. A similar concern came up in the recent serverless.js discussions from a different perspective. I would say that my current code cannot be called correct without fixing this but it may have consequences. I'll tackle it today. |
|
This issue should be resolved via: |
|
I have the same issue with ssm and profiles in the latest version 1.27.3. Is it planned to be solved? Thanks! |
|
It appears that this PR can be closed. Any reason to keep it open? |
What did you implement:
Closes #4311
serverless.yml:When there are options used for
provider.stageorprovider.profilewith or without a default value,serverlesscan not resolve the ssm parameter and fails withProfile ${opt:profile} does not exist.How did you implement it:
Before sending the request to
awsto get the ssm parameter a short wait of 10 ms is introduced to wait for cli options to be resolved.How can we verify it:
sls print --stage stage --profile <profile-with-ssm-parameter>The above
serverless.ymlshould throw an error when run with the current release (=1.26.0).Todos:
Is this ready for review?: NO
Is it a breaking change?: NO