Hi, I am in the progress of migrating an app from ...
# getting-started
n
Hi, I am in the progress of migrating an app from serverless to pulumi. Now I am getting
Copy code
error: 1 error occurred:
        * error creating Lambda Function (1): RequestEntityTooLargeException:
        status code: 413, request id: ce25e9d7-45aa-4de3-a2b5-26a29372d6d3
when trying to upload an aws lambda with size of 72M. Any known way to solve this?
b
Are you asking why you're seeing that error or how you can stop seeing that error? If the "why" question then it's because lambda has a maximum deployment size of 50MB (see https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html) If the "how can I rectify this", can you share your code? There are a few different ways of doing lambda with Pulumi so more information would be useful. If you don't want to share here, you're welcome to email support@pulumi.com and I can take a look
n
I can deploy without problems using serverless framework. Sure, this is the python code I'm using (slightly modified):
Copy code
apiLambda = aws.lambda_.Function(
  resource_name="api",
  opts=pulumi.ResourceOptions(depends_on=[apiLambdaPolicy]),
  runtime="java11",
  code="test.jar",
  handler="path to handler",
  role=apiLambdaRole.arn,
  publish=False,
  memory_size=512,
  timeout=30,
)
I'll try to upload the deployment package to s3 bucket and reference that from lambda
seems to work