This repository was archived by the owner on Apr 5, 2025. It is now read-only.
File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ export class LambdaPowertoolsLayer extends lambda.LayerVersion {
43
43
* There are multiple combinations between version and extras package that results in different suffix for the installation.
44
44
* With and without version, with and without extras flag.
45
45
* We construct one suffix here because it is easier to do in code than inside the Dockerfile with bash commands.
46
- * For example, if we set extras =true and version=1.22.0 we get '[extras ]==1.22.0'.
46
+ * For example, if we set `includeExtras =true` and ` version=1.22.0` we get '[all ]==1.22.0'.
47
47
*
48
48
*/
49
49
static constructBuildArgs (
@@ -88,7 +88,8 @@ export class LambdaPowertoolsLayer extends lambda.LayerVersion {
88
88
props ?. version ,
89
89
) ,
90
90
} ,
91
- platform : getPlatformNameFromArchitectures ( compatibleArchitectures ) ,
91
+ // supports cross-platform docker build
92
+ platform : getDockerPlatformNameFromArchitectures ( compatibleArchitectures ) ,
92
93
} ) ,
93
94
layerVersionName : props ?. layerVersionName ? props ?. layerVersionName : undefined ,
94
95
license : 'MIT-0' ,
@@ -131,7 +132,7 @@ function getLanguageNameFromRuntimeFamily(runtimeFamily: lambda.RuntimeFamily):
131
132
}
132
133
}
133
134
134
- function getPlatformNameFromArchitectures ( architectures : lambda . Architecture [ ] ) : string {
135
+ function getDockerPlatformNameFromArchitectures ( architectures : lambda . Architecture [ ] ) : string {
135
136
if ( architectures . length == 1 ) {
136
137
return architectures [ 0 ] . dockerPlatform ;
137
138
} else {
You can’t perform that action at this time.
0 commit comments