Use
Using canvas layer in function
Before starting to use the canvas layer, it is required to have the layer deployed through AWS Serverless Application Repository or AWS Lambda console, you may refer setup information for details. Then, you may create your Lambda function using:
- AWS Lambda console editor; or
- Local tool in your machine; or
- Any way you may prefer
Following is an example where a Lambda function uses the canvas layer to generate PNG graphic with colored text and circle rendered. There is no environment variable setting is required in this example.
Function structure
The setup of the function may look like the following structure. For font file, you may use any supported font file you like, in this example, we are going to use DejaVu Sans1 which could be originally found in Amazon Linux 2 EC2 instance.
/var/task/
.
├── fonts/
├── DejaVuSans.ttf
├── fonts.conf
├── index.js
Font configuration using fonts.config
Since AWS Lambda does not appear to support even the basic fonts on its own, so we create the fonts directory at the root directory for our Lambda function with following font configuration file2.
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<dir>/var/task/fonts</dir>
<cachedir>/tmp/fonts-cache/</cachedir>
<config></config>
</fontconfig>
Build function code in index.js
Once the setup is ready, we may put following function code and test it in AWS Lambda console.
let { registerFont, createCanvas } = require('canvas');
exports.handler = async (event) => {
registerFont(__dirname.concat('/fonts/DejaVuSans.ttf'), { family: 'DejaVu Sans' });
let canvas = createCanvas(300, 300);
var ctxCircle = canvas.getContext('2d');
var X = canvas.width / 2;
var Y = canvas.height / 2;
var R = 45;
ctxCircle.beginPath();
ctxCircle.arc(X, Y, R, 0, 2 * Math.PI, false);
ctxCircle.lineWidth = 3;
ctxCircle.strokeStyle = '#FF9900';
ctxCircle.stroke();
var ctxText = canvas.getContext('2d');
ctxText.font = '40px "DejaVu Sans"';
ctxText.fillStyle = '#146EB4';
ctxText.fillText('DejaVu Sans', 15, 120);
const response = {
statusCode: 200,
body: JSON.stringify(canvas.toDataURL()),
};
return response;
};
Following is the sample response from the above example function code.
{
"statusCode": 200,
"body": "\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAAABmJLR0QA/wD/AP+gvaeTAAAgAElEQVR4nO3dd3hc5Zn38e99RpI7LhoZTAvhNRBKKAGWloRACsUyNs0hhJqNLZpkU5bsJrtEpJEC2MgBWwYSEjYJmB7JxlSTpSRLaAmBEKqzNBfJDdvYkubc7x8ajc6ojqwyM/Lvc12+POfRc87cmnLrPOc8BUREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREREtkWW7QDyRcnMms+625Mt226cXX9D6X9nMyaBkosWjqRg2OlgR4fGZ8zZARgNJIB1hi9z7K9u/nTBlqIlK+YftzLLIUsvFPTVgXa8vCbe0GiruqnWYPCRwzrwdYYtc3gR54UCgmeXzz2xu/23afHy2qswrm7ZNvjVqqrS83p93Fk1XyC0pZGiv9dVle7T2+P2q8qFRfHVw77t2GXAKADzdrWGObYDcLi5zUgUNYbxitqn3Lh51LoRdy+77ZjNAxy19FIwwM9X5FAM7A52kMPJwPcwapss/DBeXru0ZGbNV6lc2meJdDBJBH4bELZsO5wWv/KBUb09riWC89sU/aK3x+xP2126ZFx8zfCnwb5LMlllKAA+b87tG7bb0OtELwNvoBNWV2IYX3C3O+L1G18qmVnz2WwHlGvW3DD5/wx7NFI0wj6Ond6bY44rX7ydm58aKWoMLHF7b47Zr2Y8V1iUSCzBOSRS6ji/x+3MwIOJ1rRpVN24TUNCD3Yx7ASMOcB72QpZ+k6/nck4LKuvKv1k2/Jx5Yu3o7BhdCwsLHYPD3W3ww2mAuNSlYx93W1pSUXtZauqSuf2V4x5ycJf4PaVlk03zqMXZ0SB+TRgRKRo8cobpqzoRYT9Kj70w3KwQ1MFxjoPOa1+bumjbeuubk5S7wFLmPHclfEhH07D7NtAbjd3pVN9dtG97TWszhJWh/vOqBneMNTOAn4IxKM/c+ei+rml8/oqzny323lLh27YbuP7tCZ4t1hiz1Wzp7y5NceLz6x9CueoVIExpe6G0t/3Qaj9Il5R+zbQ+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HgXA232XYoYW1jvJpCjItwvg+Miv4IZxHO9+1Cns1WfFE+nwMwLgfOhLRJCjcBP2MsPxosNxAkM0pY2yi/kV0oYDZwagc/fgrj1xRy10D3EE9ec5tG87qBn+2gyl0EXGbTeW8g45LcoIS1jfObOZiQ/wSm0P7zsBmowbmPBEvtYpb3Sww3sgMFHItxMk4pMLRNlRC4H/ihlaVWwJZtkBKWAMnrRDG+jXMaUNhJtVcxHgOeIcE/GMHrdk5qqubMnudGRlLAnjh7YRwJHEv6NbWoRuAujB8lVwySbZwSlqTxX1BCI1+juUl2SHf1gXeBt4E6YAOwAWND88EYCal/cWB3WofOdM54Nrl8/B1a5FSilLCkU34ze5PgVIxjgSNo31TrK5txnsF4jAT32EX8o5+eR/KcEpZkxK9nGMM5EuNonP0w9gImQo/nkW8A3gReo7lbwhMU8IydnxqwLdIpJSzZal5JATuzG86uOGNTTcDm/0k2DZubiMYaQv7JWJblW+96ERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERER4f8DqOCCaaubKHMAAAAASUVORK5CYII=\""
}
As a result, the generated PNG graphic with colored text and circle rendered may look like as follow.