In order to build Docker images for Lambda functions with CDK on ARM or other non-Intel platforms, but want the Lambda to be on an x86_64 platform, use the platform parameter with the from_image_asset() function.
_lambda.DockerImage_function(
...
code=_lambda.DockerImageCode.from_image_asset(
directory="./lambda",
file="./myservice/Dockerfile",
platform=ecr_assets.Platform.LINUX_AMD64,
),
...
)
ecr_assets is a CDK package that also needs to be imported from the main aws_cdk package.