Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSM module / Fix object like values failing to set into the env #808

Closed

Conversation

randomhash
Copy link
Contributor

@randomhash randomhash commented Feb 16, 2022

Hey! Would like to add option to not parse value ;)

What does this implement/fix? Explain your changes.

An object like values are added to the environment as the string "[object Object]"
This solution is to add more options for the default behavior with the usage of the safeJsonParse.
The default behavior will not change

Does this close any currently open issues?

Nope

Any relevant logs, error output, etc?

Test should cover it

[ x ] Feature/Fix fully implemented
[ x ] Added tests
[ x ] Updated relevant documentation
[ x ] Updated relevant examples

@willfarrell
Copy link
Member

Thanks for putting this PR together. Unfortunately, setToEnv will be deprecated in v3. Is there a use case for this outside the use with setToEnv?

If you want to manually set to the env, and stringify, checkout: https://github.com/middyjs/middy/blob/release/3.x/docs/UPGRADE.md#notes

@randomhash
Copy link
Contributor Author

Hello! Thanks, no other use case
When is 3.0 planned for release?

@willfarrell
Copy link
Member

We hope to have a beta out next month, but depends on movement from AWS between now and then. #584 is the deciding factor on what middy will look like in that beta. Full release will be sometime after node16.x runtime is released.

@randomhash
Copy link
Contributor Author

@willfarrell why setToEnv is deprecated? it is safer in cases of proxy usage of events and in terms of lambda environments. I don't think this is a good decision in a long run
I can see login in common monolithic systems, but not for lambdas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants