3 réponses
- Le plus récent
- Le plus de votes
- La plupart des commentaires
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.
répondu il y a un an
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 ?
répondu il y a un an
Contenus pertinents
- demandé il y a un an
- demandé il y a 13 jours
- demandé il y a 5 mois
- AWS OFFICIELA mis à jour il y a 3 mois
- AWS OFFICIELA mis à jour il y a 10 mois
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")