title: How do I install fontconfig on AWS lambda?
body: <p>This is a continuation of <a href="https://stackoverflow.com/q/56795567/61624">How do you install phantomjs on AWS lambda?</a> I've figured out how to get phantomjs running on an aws lambda, but when I use it to generate pdfs (using the html-pdf nodejs library), the content is missing text.  If I create a docker container that's using <code>FROM node:10.16.0-jessie</code> on it, the pdfs render fine.  If I create a docker container using <code>FROM amazonlinux:2.0.20190508</code> (which I think is similar to the AWS lambda container), the text is missing on my PDFs.</p>
  
  <p>I've fixed this problem in <code>amazonlinux:2.0.20190508</code> by running <code>yum install fontconfig</code>.  But, I don't know how to do the equivalent of a <code>yum install fontconfig</code> inside a real lambda.  If you look at the link above, you'll see that an answer there <em>attempts</em> to provide that information, but for whatever reason, it still doesn't work correctly.  I believe the reason is there's still a missing step on how to get the fontconfig install properly extracted from the <code>amazonlinux:2.0.20190508</code> container.</p>
  
  <p>In summary, here is my question: After I run <code>yum install fontconfig</code> in <code>amazonlinux:2.0.20190508</code>, how do I extract it from the container and package it up so that an AWS Lambda can use it?</p>
  
  <p>By the way, I'm sure there are other answers that seem to be answering this question, but the AWS lambda built-in dependencies change so frequently, none of those answers work anymore.</p>