From f2561f6c8235273e46313ed4e78592f6c02a467f Mon Sep 17 00:00:00 2001 From: MURAKAMI Masahiko Date: Tue, 14 Jan 2025 02:07:33 +0900 Subject: [PATCH] Add ephemeralStorageSizeMB option docs (#8142) * Add ephemeralStorageSize option docs * fix: rename ephemeralStorageSize to ephemeralStorageSizeMB * Update src/pages/[platform]/build-a-backend/functions/configure-functions/index.mdx Co-authored-by: josef --------- Co-authored-by: josef --- .../functions/configure-functions/index.mdx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/pages/[platform]/build-a-backend/functions/configure-functions/index.mdx b/src/pages/[platform]/build-a-backend/functions/configure-functions/index.mdx index 8a6d6bbfd47..1bd7aa2163b 100644 --- a/src/pages/[platform]/build-a-backend/functions/configure-functions/index.mdx +++ b/src/pages/[platform]/build-a-backend/functions/configure-functions/index.mdx @@ -69,6 +69,17 @@ export const myDemoFunction = defineFunction({ }); ``` +## `ephemeralStorageSizeMB` + +By default, functions have 512MB of ephemeral storage to them. This can be configured from 512 MB upto 10240 MB. Note that this can increase the cost of function invocation. For more pricing information visit the [Lambda pricing documentation](https://aws.amazon.com/lambda/pricing/). + +```ts title="amplify/functions/my-demo-function/resource.ts" +export const myDemoFunction = defineFunction({ + // highlight-next-line + ephemeralStorageSizeMB: 1024 // allocate 1024 MB of ephemeral storage to the function. +}); +``` + ## `runtime` Currently, only Node runtimes are supported by `defineFunction`. However, you can change the Node version that is used by the function. The default is the oldest Node LTS version that is supported by AWS Lambda (currently Node 18).