I have an aws lambda
function to create an s3
bucket. I have written this using python 3.6
Here's my code:
import boto3
def lambda_handler(event, context):
client = boto3.client('s3')
return client.list_buckets()
And I have set the timeout
value as 20s
and increased the memory to 512mb
as well.
I have attached AmazonS3FullAccess
as well to the IAM role
of lambda. But I get the following error:
{ "errorMessage": "2021-06-18T16:49:19.237Z 1a33460c-8d7e-45f1-8601-c5b01290e439 Task timed out after 20.02 seconds" }
Why am I getting this error? Can someone help me please?