3 個答案
- 最新
- 最多得票
- 最多評論
0
What is the error you are getting? Where is your Lambda trying to save the image to? Local file? Lambda only supports writing files to /tmp folder.
0
Got a successful response after 5 seconds of computation the function time out was 3 seconds.
已回答 1 年前
So you need to change the function timeout :)
0
as I understand your lambda is responsible for the creation of the image and save it on /tmp folder? or on S3 ?
已回答 1 年前
相關內容
- AWS 官方已更新 2 年前
- AWS 官方已更新 3 年前
Matplotlib created a temporary config/cache directory at /tmp/matplotlib-8j65adly because the default path (/home/sbx_user1051/.config/matplotlib) is not a writable directory; it is highly recommended to set the MPLCONFIGDIR environment variable to a writable directory, in particular to speed up the import of Matplotlib and to better support multiprocessing.
This the error I am getting.
import json import boto3 import pandas as pd from matplotlib import pyplot as plt from boto3.dynamodb.conditions import Key from datetime import datetime
dynamo=boto3.resource('dynamodb') table=dynamo.Table('airplotdata')
def lambda_handler(event, context): # TODO implement response=table.query(KeyConditionExpression=Key('id').eq('12468'), ProjectionExpression="#c,aqi,co,so2,pm25,pm10", ExpressionAttributeNames = {'#c': 'timestamp'}) items=response['Items']
This is my code.
I am having problem in plt.savefig("/tmp/output")