forked from komodorio/validkube
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bugfix: png generation fails in a Lambda environment (#41)
In an AWS Lambda container, no paths are writable except /tmp. When generating PNGs via inframap/dot, the program attempted to write to $XDG_CACHE_HOME, which was /validiac/bin/.cache, i.e. a non-writable path. This commit fixes the issue by setting $XDG_CACHE_HOME to /tmp/.cache instead. In addition, core MS fonts are installed in the image so that Graphviz can properly render text. Also, the Lambda handlers will now encode output in base64 encoding when the output is binary rather than textual. It should be noted that API Gateway will only decode base64 responses for media types that were defined in the API configuration's "Binary Media Type" list, and when clients send appropriate Accept headers. Co-authored-by: Ido Perlmuter <ido.perlmuter@gofirefly.io>
- Loading branch information
Showing
4 changed files
with
32 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters