Include custom fonts in AWS Lambda
The official AWS response on the forum post is still correct.
Currently, it is not possible to customize Lambda environment. If you want additional packages you can build on Amazon Linux and put them into the zip file you upload.
That's the extent to which you can "install" anything in the Lambda environment.
the easiest way would be to include them via OS.
Arguably so, but that's simply not how Lambda works.
Install mscorefonts on ec2
Eventually I figured this out. My solution was to enable the multiverse ppa's. Here is the script that I used.
#font installation -- required to properly display fonts used in
echo "deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ saucy multiverse" | sudo tee -a /etc/apt/sources.list
echo "deb-src http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ saucy multiverse" | sudo tee -a /etc/apt/sources.list
echo "deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ saucy-updates multiverse" | sudo tee -a /etc/apt/sources.list
echo "deb-src http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ saucy-updates multiverse" | sudo tee -a /etc/apt/sources.list
sudo apt-get update
# preselect yes for ms EULA
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections
sudo apt-get install -y ttf-mscorefonts-installer
This works on EC2 ubuntu as of January 2015 and my local machine running ubuntu 14.04.
Getting Microsoft Calibri font on Amazon EC2 ubuntu
Use
wget "http://cl.ly/0m3f0x0c252P3O3t190q/download/Calibri.ttf" -O "~/.fonts/Calibri.ttf"
This will save Calibri font to your default fonts directory, and all your apps & scripts can use it as a normal font.
How to install 3rd party Python libraries for a single script running on AWS EC2?
Normally when you fire up an AWS instance you select an "Image".
These are called Amazon Machine Images or AMI for short.
Typically you would select say (for example) an "Ubuntu" AMI.
Example: https://cloud-images.ubuntu.com/locator/ec2/
Select the appropriate AMI and then perform some steps similar to:
- Configure and Start your Instance
- Shell into your Instance
- Run:
apt-get install python-setuptools
- Run:
easy_install nltk
You may also find the Python package(s) you're looking for already available in the repositories of the Distribution/Image you've selected.
Related Topics
Linux Kernel Changing Default CPU Scheduler
Resolving MAC Address for Ip Address Using C++ on Linux
Remove a List of Words from Filename
Raising Hard Limit on Rlimit_Nofile System-Wide on Linux
Alternative to Valgrind (Memcheck) for Finding Leaks on Linux
Why Does Wget Output to Stderr Rather Than Stdout
The Difference Between Wait_Queue_Head and Wait_Queue in Linux Kernel
How to Disable Tcp Slow Start in Linux
Powershell Connecting from a Linux Client to a Windows Remote
How Syscall Knows Where to Jump
Compile Swift Code to Native Executable for Linux
Does Each Unix File Description Have Its Own Read/Write Buffers