@@ -27,7 +27,7 @@ exports[`Snapshot test 1`] = `
2727 " Arn" ,
2828 ],
2929 },
30- " Runtime" : " nodejs22 .x" ,
30+ " Runtime" : " nodejs24 .x" ,
3131 " Timeout" : 900 ,
3232 },
3333 " Type" : " AWS::Lambda::Function" ,
@@ -433,7 +433,7 @@ exports[`Snapshot test 2`] = `
433433 " Arn" ,
434434 ],
435435 },
436- " Runtime" : " nodejs22 .x" ,
436+ " Runtime" : " nodejs24 .x" ,
437437 " Timeout" : 120 ,
438438 },
439439 " Type" : " AWS::Lambda::Function" ,
@@ -486,7 +486,7 @@ exports[`Snapshot test 2`] = `
486486 " Arn" ,
487487 ],
488488 },
489- " Runtime" : " nodejs22 .x" ,
489+ " Runtime" : " nodejs24 .x" ,
490490 " Timeout" : 900 ,
491491 },
492492 " Type" : " AWS::Lambda::Function" ,
@@ -1290,17 +1290,20 @@ exports[`Snapshot test 2`] = `
12901290 " aws s3 cp \\ " $sourceS3Url \\" temp.zip" ,
12911291 " unzip temp.zip" ,
12921292 " ls -la" ,
1293- " aws ecr get-login-password | docker login --username AWS --password-stdin $repositoryAuthUri" ,
1293+ " aws ecr get-login-password --region $repositoryRegion | docker login --username AWS --password-stdin $repositoryAuthUri" ,
12941294 " aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws" ,
1295- " docker buildx create --use" ,
12961295 " docker buildx ls" ,
1297- " eval \\ " $buildCommand \\" "
1296+ " echo \\ " $buildCommand \\" " ,
1297+ " eval \\ " $buildCommand \\" " ,
1298+ " docker images" ,
1299+ " docker tag artifact:$imageTag $repositoryUri:$imageTag" ,
1300+ " docker push $repositoryUri:$imageTag"
12981301 ]
12991302 },
13001303 " post_build" : {
13011304 " commands" : [
13021305 " echo Build completed on \` date\` " ,
1303- " \\ nSTATUS='SUCCESS'\\ nif [ $CODEBUILD_BUILD_SUCCEEDING -ne 1 ] # Test if the build is failing\\ nthen\\ nSTATUS='FAILED'\\ nREASON=\\ " ContainerImageBuild failed . See CloudWatch Log stream for the detailed reason : \\nhttps :// $AWS_REGION.console.aws.amazon.com/cloudwatch/home?region=$AWS_REGION#logsV2:log-groups/log-group/\\\\$252Faws\\\\$252Fcodebuild\\\\$252F$projectName/log-events/$CODEBUILD_LOG_PATH\\"\\nfi\\ncat <<EOF > payload.json\\n{\\n \\"StackId\\": \\"$stackId\\",\\n \\"RequestId\\": \\"$requestId\\",\\n \\"LogicalResourceId\\":\\"$logicalResourceId\\",\\n \\"PhysicalResourceId\\": \\"$imageTag\\",\\n \\"Status\\": \\"$STATUS\\",\\n \\"Reason\\": \\"$REASON\\",\\n \\"Data\\": {\\n \\"ImageTag\\": \\"$imageTag\\"\\n }\\n}\\nEOF\\ncurl -v - i -X PUT -H 'Content-Type:' -d \\"@payload.json\\" \\"$responseURL\\"\\n "
1306+ " \\ nSTATUS='SUCCESS'\\ nif [ $CODEBUILD_BUILD_SUCCEEDING -ne 1 ] # Test if the build is failing\\ nthen\\ nSTATUS='FAILED'\\ nREASON=\\ " ContainerImageBuild failed . See CloudWatch Log stream for the detailed reason : \\nhttps :// $AWS_REGION.console.aws.amazon.com/cloudwatch/home?region=$AWS_REGION#logsV2:log-groups/log-group/\\\\$252Faws\\\\$252Fcodebuild\\\\$252F$projectName/log-events/$CODEBUILD_LOG_PATH\\"\\nfi\\ncat <<EOF > payload.json\\n{\\n \\"StackId\\": \\"$stackId\\",\\n \\"RequestId\\": \\"$requestId\\",\\n \\"LogicalResourceId\\":\\"$logicalResourceId\\",\\n \\"PhysicalResourceId\\": \\"$imageTag\\",\\n \\"Status\\": \\"$STATUS\\",\\n \\"Reason\\": \\"$REASON\\",\\n \\"Data\\": {\\n \\"ImageTag\\": \\"$imageTag\\"\\n }\\n}\\nEOF\\ncurl -i -X PUT -H 'Content-Type:' -d \\"@payload.json\\" \\"$responseURL\\"\\n "
13041307 ]
13051308 }
13061309 }
@@ -1508,7 +1511,7 @@ exports[`Snapshot test 2`] = `
15081511 " Arn" ,
15091512 ],
15101513 },
1511- " Runtime" : " nodejs22 .x" ,
1514+ " Runtime" : " nodejs24 .x" ,
15121515 " Timeout" : 900 ,
15131516 },
15141517 " Type" : " AWS::Lambda::Function" ,
@@ -1594,7 +1597,7 @@ exports[`Snapshot test 2`] = `
15941597 " Arn" ,
15951598 ],
15961599 },
1597- " Runtime" : " nodejs22 .x" ,
1600+ " Runtime" : " nodejs24 .x" ,
15981601 " Timeout" : 900 ,
15991602 },
16001603 " Type" : " AWS::Lambda::Function" ,
@@ -2076,7 +2079,7 @@ exports[`Snapshot test 2`] = `
20762079 " Arn" ,
20772080 ],
20782081 },
2079- " Runtime" : " nodejs20 .x" ,
2082+ " Runtime" : " nodejs22 .x" ,
20802083 " Timeout" : 300 ,
20812084 },
20822085 " Type" : " AWS::Lambda::Function" ,
@@ -2232,7 +2235,7 @@ exports[`Snapshot test 2`] = `
22322235 " Arn" ,
22332236 ],
22342237 },
2235- " Runtime" : " nodejs22 .x" ,
2238+ " Runtime" : " nodejs24 .x" ,
22362239 " Timeout" : 900 ,
22372240 },
22382241 " Type" : " AWS::Lambda::Function" ,
@@ -3193,49 +3196,7 @@ service iptables save",
31933196 " Dns.Http" ,
31943197 ],
31953198 },
3196- " --build-arg NEXT_PUBLIC_AWS_REGION=us-west-2 --platform linux/arm64 --output type=image,name=" ,
3197- {
3198- " Fn::Select" : [
3199- 4 ,
3200- {
3201- " Fn::Split" : [
3202- " :" ,
3203- {
3204- " Fn::GetAtt" : [
3205- " WebappBuildRepository4C93D48D" ,
3206- " Arn" ,
3207- ],
3208- },
3209- ],
3210- },
3211- ],
3212- },
3213- " .dkr.ecr." ,
3214- {
3215- " Fn::Select" : [
3216- 3 ,
3217- {
3218- " Fn::Split" : [
3219- " :" ,
3220- {
3221- " Fn::GetAtt" : [
3222- " WebappBuildRepository4C93D48D" ,
3223- " Arn" ,
3224- ],
3225- },
3226- ],
3227- },
3228- ],
3229- },
3230- " ." ,
3231- {
3232- " Ref" : " AWS::URLSuffix" ,
3233- },
3234- " /" ,
3235- {
3236- " Ref" : " WebappBuildRepository4C93D48D" ,
3237- },
3238- " :<IMAGE_TAG>,push=true --provenance=false ." ,
3199+ " --build-arg NEXT_PUBLIC_AWS_REGION=us-west-2 --platform linux/arm64 --output type=docker,name=artifact:$imageTag --provenance=false ." ,
32393200 ],
32403201 ],
32413202 },
@@ -3301,6 +3262,9 @@ service iptables save",
33013262 " DeletionPolicy" : " Delete" ,
33023263 " Properties" : {
33033264 " EmptyOnDelete" : true ,
3265+ " ImageScanningConfiguration" : {
3266+ " ScanOnPush" : true ,
3267+ },
33043268 " RepositoryPolicyText" : {
33053269 " Statement" : [
33063270 {
0 commit comments