You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In case anyone else came here with the same problem:
As this goes by unresolved, I've built a makefile script to deploy and added one envsubst strategy to fill-in the SSM parameters from a templated serverless.yml.
It's not ideal but did the trick for now.
It goes by like this:
Remove from repo and git-ignore serverless.yml (because he will be injected with sensitive ssm data from now on)
Create a copy of serverless.yml as serverless.template.yml
Create one pre-build step on makefile that will reach to AWS-SSM-API, fetch the parameter and assign it to a temp env-var on make shell
Use envsubst to create a serverless.yml from template injecting the ssm parameters from the temp env-var
Run actual serverless deploy, now using the injected and generated serverless.yml
Snippet from makefile:
Snippet from serverless.template.yml:
So, although it's not ideal, running make deploy now do trick :)
Unfortunately you can't use serverless plugins with serverless components. Also, most serverless variables don't work with serverless components. This is all because serverless components is a completely different implementation of the Serverless Framework (spoiler alert, it'll likely be the next major version of the framework 😉 ).
In the components world, we'll likely have an SSM component in the future that you can reference. If you're up to it, you could create it yourself and we'll be super grateful 🙏
I'm trying to setup env vars from ssm parameter store following this guide, but it didn't worked as expected.
Using this plugin did not work as well.
The end result is serverless deploying the
${ssm:XPTO}
as string instead of fetching the parameter value from ssm.The parameter exist on ssm:
And the
--debug
did not indicate a failed attempt to fetch the ssm parameter:Is this a bug?
Should this be a feature request?
Is this an intentional missing feature?
.. Or, am I doing something wrong?
Thanks! :)
The text was updated successfully, but these errors were encountered: