Hey Serverless people!
is there a way to change the Lambda memory settings for the amplify deployment?
Functions are deployed with the default setting of 128 MB of memory.
I would like to change this value and I don't want to do this manually by logging in the AWS Console.
Someone an idea?
Thank you!
Which Category is your question related to?
Amplify function - Lambda
Amplify CLI Version
4.16.1
What AWS Services are you utilizing?
DynamoDB, Lambda, AppSync
@Lasim You can go into your amplify/backend/function/<function-name>/template.json file and modify the Cloudformation file to add the memory settings. You can find more information here - https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-memorysize
You have to basically add the "MemorySize" parameter to your ""AWS::Lambda::Function" resource in the Cloudformation file.
@kaustavghosh06 thanks for your response.
I just noticed that template.json represent CF file.
Solution:
Added:"MemorySize": INT to
amplify/backend/function/<function-name>/<function-name>-template.json
Most helpful comment
@Lasim You can go into your
amplify/backend/function/<function-name>/template.jsonfile and modify the Cloudformation file to add the memory settings. You can find more information here - https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-memorysizeYou have to basically add the "MemorySize" parameter to your ""AWS::Lambda::Function" resource in the Cloudformation file.