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
feat(lambda): docker platform for architecture (#16858)
Add a `dockerPlatform` property in `Architecture` and use it to pass the
correct `platform` when bundling in a container in `aws-lambda-nodejs`,
`aws-lambda-go` and `aws-lambda-python`.
Note that the SAM build images (`public.ecr.aws/sam/build-<runtime>`) are now
multi-arch.
----
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Copy file name to clipboardExpand all lines: packages/@aws-cdk/aws-lambda-go/README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -106,7 +106,7 @@ All other properties of `lambda.Function` are supported, see also the [AWS Lambd
106
106
By default the following environment variables are set for you:
107
107
108
108
*`GOOS=linux`
109
-
*`GOARCH=amd64`
109
+
*`GOARCH`: based on the target architecture of the Lambda function
110
110
*`GO111MODULE=on`
111
111
112
112
Use the `environment` prop to define additional environment variables when go runs:
@@ -124,7 +124,7 @@ new lambda.GoFunction(this, 'handler', {
124
124
125
125
## Local Bundling
126
126
127
-
If `Go` is installed locally and the version is >= `go1.11` then it will be used to bundle your code in your environment. Otherwise, bundling will happen in a [Lambda compatible Docker container](https://hub.docker.com/layers/lambci/lambda/build-go1.x/images/sha256-e14dab718ed0bb06b2243825c5993e494a6969de7c01754ad7e80dacfce9b0cf?context=explore).
127
+
If `Go` is installed locally and the version is >= `go1.11` then it will be used to bundle your code in your environment. Otherwise, bundling will happen in a [Lambda compatible Docker container](https://gallery.ecr.aws/sam/build-go1.x) with the Docker platform based on the target architecture of the Lambda function.
128
128
129
129
For macOS the recommended approach is to install `Go` as Docker volume performance is really poor.
0 commit comments