You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/pages/[platform]/build-a-backend/functions/custom-functions/index.mdx
+26-4
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ AWS Amplify Gen 2 functions are AWS Lambda functions that can be used to perform
34
34
35
35
<Calloutwarning>
36
36
37
-
**Note:**[Fullstack Git-based environments](https://docs.amplify.aws/react/how-amplify-works/concepts/#fullstack-git-based-environments) do not support Docker for functions bundling out of the box.
37
+
**Note:**[Fullstack Git-based environments](https://docs.amplify.aws/react/how-amplify-works/concepts/#fullstack-git-based-environments) do not support Docker for functions bundling out of the box. To learn more [skip to the Docker section](#Docker).
38
38
39
39
</Callout>
40
40
@@ -81,7 +81,7 @@ Next, create the corresponding handler file at `amplify/functions/say-hello/inde
You're now ready to deploy your python function. Next is the same process as the Node.js/TypeScript function. Go to [Common steps for all languages](#common-steps-for-all-languages) to continue.
105
105
106
106
## Go
107
-
To get started, Create a new directory and a resource file, `amplify/functions/say-hello/resource.ts`. Then, define the function with `defineFunction`:
107
+
To get started, Create a new directory and a resource file, `amplify/functions/say-hello/resource.ts`. Then, define the function with `defineFunction`:
You're now ready to deploy your golang function. Next is the same process as the Node.js/TypeScript function.
189
189
190
-
## Common steps for all languages
190
+
## Common steps for all languages
191
191
192
192
Regardless of the language used, your function needs to be added to your backend.
193
193
```ts title="amplify/backend.ts"
@@ -228,3 +228,25 @@ export const data = defineData({
228
228
},
229
229
})
230
230
```
231
+
232
+
## Docker
233
+
234
+
Custom function may require [Docker](https://www.docker.com/) in order to build and bundle function's code.
235
+
A deployment failing with `CustomFunctionProviderDockerError` error indicates that a custom function requires Docker but the
236
+
Docker daemon was not found. In that case you need to provide a working Docker installation at runtime.
237
+
238
+
### Personal sandboxes
239
+
240
+
Ensure that Docker is installed on your computer and that Docker daemon is running. You can check if Docker daemon is running using the following command:
241
+
```bash title="terminal" showLineNumbers={false}
242
+
docker info
243
+
```
244
+
245
+
### Fullstack Git-based environments
246
+
247
+
Amplify does not provide Docker daemon out of the box in branch deployments. However, you have an option to provide
248
+
[your own image that meets Amplify requirements](https://docs.aws.amazon.com/amplify/latest/userguide/custom-build-image.html)
249
+
and includes a Docker installation.
250
+
251
+
For example, the `aws/codebuild/amazonlinux-x86_64-standard:5.0` image (see definition [here](https://github.com/aws/aws-codebuild-docker-images))
252
+
meets Amplify requirements and includes Docker installation.
0 commit comments