From df7d618b1cf6e8c5122881eb6d6d4370ec1b02e7 Mon Sep 17 00:00:00 2001 From: MURAKAMI Masahiko Date: Fri, 29 Nov 2024 14:16:19 +0900 Subject: [PATCH 1/3] Add ephemeralStorageSize option docs --- .../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 5a79e735d11..240dbc7c68f 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({ }); ``` +## `ephemeralStorageSize` + +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 see [here](https://aws.amazon.com/lambda/pricing/). + +```ts title="amplify/functions/my-demo-function/resource.ts" +export const myDemoFunction = defineFunction({ + // highlight-next-line + ephemeralStorageSize: 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). From 724314b8d0c27843b4c92ce36f18206e9475dcfe Mon Sep 17 00:00:00 2001 From: MURAKAMI Masahiko Date: Fri, 13 Dec 2024 22:01:17 +0900 Subject: [PATCH 2/3] fix: rename ephemeralStorageSize to ephemeralStorageSizeMB --- .../build-a-backend/functions/configure-functions/index.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 240dbc7c68f..6de235f4748 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,14 +69,14 @@ export const myDemoFunction = defineFunction({ }); ``` -## `ephemeralStorageSize` +## `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 see [here](https://aws.amazon.com/lambda/pricing/). ```ts title="amplify/functions/my-demo-function/resource.ts" export const myDemoFunction = defineFunction({ // highlight-next-line - ephemeralStorageSize: 1024 // allocate 1024 MB of ephemeral storage to the function. + ephemeralStorageSizeMB: 1024 // allocate 1024 MB of ephemeral storage to the function. }); ``` From fc12fdb5e850094c6b2f26be57d19de9a4b2e364 Mon Sep 17 00:00:00 2001 From: MURAKAMI Masahiko Date: Tue, 17 Dec 2024 09:11:33 +0900 Subject: [PATCH 3/3] Update src/pages/[platform]/build-a-backend/functions/configure-functions/index.mdx Co-authored-by: josef --- .../build-a-backend/functions/configure-functions/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ef635f743d8..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 @@ -71,7 +71,7 @@ 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 see [here](https://aws.amazon.com/lambda/pricing/). +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({