Skip to content

Commit f2561f6

Browse files
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 <[email protected]> --------- Co-authored-by: josef <[email protected]>
1 parent 57ef4e1 commit f2561f6

File tree

1 file changed

+11
-0
lines changed
  • src/pages/[platform]/build-a-backend/functions/configure-functions

1 file changed

+11
-0
lines changed

src/pages/[platform]/build-a-backend/functions/configure-functions/index.mdx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,17 @@ export const myDemoFunction = defineFunction({
6969
});
7070
```
7171

72+
## `ephemeralStorageSizeMB`
73+
74+
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/).
75+
76+
```ts title="amplify/functions/my-demo-function/resource.ts"
77+
export const myDemoFunction = defineFunction({
78+
// highlight-next-line
79+
ephemeralStorageSizeMB: 1024 // allocate 1024 MB of ephemeral storage to the function.
80+
});
81+
```
82+
7283
## `runtime`
7384

7485
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).

0 commit comments

Comments
 (0)