localstack / serverless-localstack

⚡ Serverless plugin for running against LocalStack
519 stars 83 forks source link

fixed localstack AWS variables resolution #212

Closed AndrewChubatiuk closed 8 months ago

AndrewChubatiuk commented 1 year ago

Hello guys! This a fix for a bug that was introduced by #210 All AWS variables such as ${aws:accountId}, ${aws;region} and ${ssm:<path>} cannot be properly resolved because of async function call in a constructor, which cannot be completed before these variables resolution and AWS sdk credentials are not patched before these variables resolution. I'm a not sure that my approach is the best how to call async function synchronously, but at least it works. Also I've upgraded some dependencies and added some plugin features from Serverless v3

AndrewChubatiuk commented 1 year ago

@joe4dev is there anything needed from me to merge this PR?

joe4dev commented 1 year ago

Sorry for the late reply @AndrewChubatiuk (lots of things with the v2 release and I didn't plan to catch the flu)

We agree that the variable resolver issue is essential and would like to release this fix with Serverless v2 compatibility. Therefore, we plan to extract a PR that fixes the variable resolution issue without breaking the IPv4/IPv6 fallback. This PR can then serve as a basis for a major localstack-serverless release targeting Serverless v3 compatibility.

steffyP commented 1 year ago

Hi @AndrewChubatiuk 🙂

Thanks so much for your effort! In the meantime we found another solution (#219) for the issue with resolving environment variables, that keeps the fix we provided in #210 🥳 We also updated the CI pipeline so that the tests now run with serverless v2 and v3 (#220).

In your PR you also updated some other outdated libs - if you still want to work on this PR, please make sure to rebase with master! 🚀

steffyP commented 8 months ago

Hi @AndrewChubatiuk, unfortunately we haven't back from you in several months. I am closing this PR now because it's outdated.

Please feel free to create a new PR if you have new changes to contribute to localstack-serverless 🙏 🚀