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
chore(doc): improve the doc on DockerImageFunction for cross-platform bundling (#31053)
### Issue # (if applicable)
Closes#31048
### Reason for this change
Per discussed #31048 (comment), the `architecture` would still be required when bundling `X86_64` DockerImageFunction from a `arm64` machine like a Macbook with arm64 chip as it explicitly pass the `--platform` argument to `docker build`, which is required in this use case.
### Description of changes
### Description of how you validated changes
### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)
----
*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-lib/aws-lambda/README.md
+4
Original file line number
Diff line number
Diff line change
@@ -78,6 +78,10 @@ configurations as well as choosing a specific tag or digest. See their docs for
78
78
To deploy a `DockerImageFunction` on Lambda `arm64` architecture, specify `Architecture.ARM_64` in `architecture`.
79
79
This will bundle docker image assets for `arm64` architecture with `--platform linux/arm64` even if build within an `x86_64` host.
80
80
81
+
With that being said, if you are bundling `DockerImageFunction` for Lambda `amd64` architecture from a `arm64` machine like a Macbook with `arm64` CPU, you would
82
+
need to specify `architecture: lambda.Architecture.X86_64` as well. This ensures the `--platform` argument is passed to the image assets
83
+
bundling process so you can bundle up `X86_64` images from the `arm64` machine.
0 commit comments