-
Notifications
You must be signed in to change notification settings - Fork 27
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
update-stack not updating data even though JSON has been changed (now more of a feature request to tell people how to update the db.json on AWS) #829
Comments
Hey David, please delete the file in the s3 bucket after you executed the stack update. You can chain this together as well...
Hope this helps. br, pharindoko |
Thanks again for this super useful tooling. Appreciate it a lot.
I figured it out by trial & error… (for anyone coming along later), You
have to run command:
`aws s3 rm s3://jsonsls-<api_name>/db.json`
after the update-stack deploys and it will copy the newly deployed db.json
into that bucket when you hit the API next
You may want to make note of this in the docs and maybe even the command
line output after the update-stack completes. Would be even better if the
CLI would ask you if you want to invoke that command, since it knows the
URLs already, and it can do it for you if you say `Y`.
Anyway, this is super helpful. Thanks again!
…On Fri, Sep 17, 2021 at 1:14 PM, Florian Fuß ***@***.***> wrote:
Hey David,
please delete the file in the s3 bucket after you executed the stack
update.
After that the first request will recreate the file in the s3 bucket with
the new content.
You can chain this together as well...
1. sls update-stack
2. aws s3 rm
3. curl api-url
Hope this helps.
br,
pharindoko
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#829 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACEI6VA7QF46ONSJGSFOOFDUCOOTRANCNFSM5EIHPGYA>
.
|
I remember that I had describe it in the readme: But you`re right - when you wrote this I thought the same. |
Describe the bug
update-stack seems to deploy but does not actually update the JSON data in the API. Note: running locally works perfectly. Swagger shows proper data locally but not on AWS version after
update-stack
. Maybe worth noting that the db.json in the deployment folder has been updated. Just seems that it's not being uploaded/deployed. As a work-around, I am having to create a brand new Lambda stack every time I edit the JSON (can't keep doing)To Reproduce
Deploy a JSON
jsonsls create-stack ../DB/db.all--.json
Make a change to the JSON shape.
Run local:
jsonsls run ../DB/db.all--.json
[Works great]
Update the deploy with the exact same DB:
jsonsls update-stack ../DB/db.all--.json
...passes all the tests and "deploys", but the deployment is the old JSON data
Have done this several times. Does not update the API. Swagger still shows old fields and old results (using the new link that the script generates)
Check swagger (using the new link provided in the terminal after deploy). See nothing has changed
Expected behavior
jsonsls would update the swagger and API with the new JSON data
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: