Amplify-cli: Change Lambda memory setting

Created on 19 Mar 2020  路  2Comments  路  Source: aws-amplify/amplify-cli

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

functions pending-response question

Most helpful comment

@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.

All 2 comments

@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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

amlcodes picture amlcodes  路  3Comments

ffxsam picture ffxsam  路  3Comments

mwarger picture mwarger  路  3Comments

jeanpaulcozzatti picture jeanpaulcozzatti  路  3Comments

onlybakam picture onlybakam  路  3Comments