Skip to content

AWS lambda deployment for skottie, embedded fonts not rendering #3108

Answered by ashishpadave
ashishpadave asked this question in Q&A
Discussion options

You must be logged in to vote

Created a Lambda Layer with the fontconfig library taken from a Amazon2 WSL instance, added the fonts and the fonts.conf to the the layer.
Set the environment variables to

FONTCONFIG_PATH  /opt/fonts   -- contains the fonts and the fonts.conf
LD_LIBRARY_PATH  /opt/lib -- contains the fontconfig, png and other libraries.

Fonts.conf contents:

<fontconfig>
<dir>/opt/fonts/</dir>
<cachedir>/tmp/fonts-cache/</cachedir>
<config></config>
</fontconfig>

Note: The Zip file for the layer should have fonts and lib folders only not the /opt folder, since lambda mounts the layer on /opt.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ashishpadave
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant