fix(dev): fix Localstack yet again #252
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
All Localstack services (image upload, logo upload, storage mode attachments) were not working.
Closes #202
Solution
Initialising Localstack using
awslocal
In their latest version, the
awslocal
CLI switched to using the edge port 4566 for all services by default. However, this edge port is not available to us, since we are using an older version of Localstack. Hence it is now necessary to specify the endpoint URL ininit-localstack.sh
when creating the S3 buckets.Specifying mock AWS credentials
All actions involving S3 require the global
AWS
object to have its credentials configured. Since we removed the mock AWS credentials, those credentials could no longer be set, resulting in all S3 operations failing. The solution was to restore the mock credentials todocker-compose
.What about upgrading Localstack?
Sadly, the issue opened by our esteemed @karrui on the Localstack repo doesn't seem to have been resolved, since I tried upgrading Localstack but ran into the same problem. We seem to be stuck with v0.8.0 for now.