Skip to content

Commit 02aaf4b

Browse files
update snapshot
1 parent 15e6728 commit 02aaf4b

2 files changed

Lines changed: 36 additions & 108 deletions

File tree

cdk/test/__snapshots__/serverless-fullstack-webapp-starter-kit-without-domain.test.ts.snap

Lines changed: 18 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -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
{

cdk/test/__snapshots__/serverless-fullstack-webapp-starter-kit.test.ts.snap

Lines changed: 18 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ exports[`Snapshot test 1`] = `
4949
"Arn",
5050
],
5151
},
52-
"Runtime": "nodejs22.x",
52+
"Runtime": "nodejs24.x",
5353
"Timeout": 900,
5454
},
5555
"Type": "AWS::Lambda::Function",
@@ -454,7 +454,7 @@ exports[`Snapshot test 2`] = `
454454
"Arn",
455455
],
456456
},
457-
"Runtime": "nodejs22.x",
457+
"Runtime": "nodejs24.x",
458458
"Timeout": 120,
459459
},
460460
"Type": "AWS::Lambda::Function",
@@ -507,7 +507,7 @@ exports[`Snapshot test 2`] = `
507507
"Arn",
508508
],
509509
},
510-
"Runtime": "nodejs22.x",
510+
"Runtime": "nodejs24.x",
511511
"Timeout": 900,
512512
},
513513
"Type": "AWS::Lambda::Function",
@@ -1206,17 +1206,20 @@ exports[`Snapshot test 2`] = `
12061206
"aws s3 cp \\"$sourceS3Url\\" temp.zip",
12071207
"unzip temp.zip",
12081208
"ls -la",
1209-
"aws ecr get-login-password | docker login --username AWS --password-stdin $repositoryAuthUri",
1209+
"aws ecr get-login-password --region $repositoryRegion | docker login --username AWS --password-stdin $repositoryAuthUri",
12101210
"aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws",
1211-
"docker buildx create --use",
12121211
"docker buildx ls",
1213-
"eval \\"$buildCommand\\""
1212+
"echo \\"$buildCommand\\"",
1213+
"eval \\"$buildCommand\\"",
1214+
"docker images",
1215+
"docker tag artifact:$imageTag $repositoryUri:$imageTag",
1216+
"docker push $repositoryUri:$imageTag"
12141217
]
12151218
},
12161219
"post_build": {
12171220
"commands": [
12181221
"echo Build completed on \`date\`",
1219-
"\\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 "
1222+
"\\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 "
12201223
]
12211224
}
12221225
}
@@ -1424,7 +1427,7 @@ exports[`Snapshot test 2`] = `
14241427
"Arn",
14251428
],
14261429
},
1427-
"Runtime": "nodejs22.x",
1430+
"Runtime": "nodejs24.x",
14281431
"Timeout": 900,
14291432
},
14301433
"Type": "AWS::Lambda::Function",
@@ -1510,7 +1513,7 @@ exports[`Snapshot test 2`] = `
15101513
"Arn",
15111514
],
15121515
},
1513-
"Runtime": "nodejs22.x",
1516+
"Runtime": "nodejs24.x",
15141517
"Timeout": 900,
15151518
},
15161519
"Type": "AWS::Lambda::Function",
@@ -1992,7 +1995,7 @@ exports[`Snapshot test 2`] = `
19921995
"Arn",
19931996
],
19941997
},
1995-
"Runtime": "nodejs20.x",
1998+
"Runtime": "nodejs22.x",
19961999
"Timeout": 300,
19972000
},
19982001
"Type": "AWS::Lambda::Function",
@@ -2149,7 +2152,7 @@ exports[`Snapshot test 2`] = `
21492152
"Arn",
21502153
],
21512154
},
2152-
"Runtime": "nodejs22.x",
2155+
"Runtime": "nodejs24.x",
21532156
"Timeout": 900,
21542157
},
21552158
"Type": "AWS::Lambda::Function",
@@ -3038,49 +3041,7 @@ service iptables save",
30383041
"Dns.Http",
30393042
],
30403043
},
3041-
" --build-arg NEXT_PUBLIC_AWS_REGION=us-west-2 --platform linux/arm64 --output type=image,name=",
3042-
{
3043-
"Fn::Select": [
3044-
4,
3045-
{
3046-
"Fn::Split": [
3047-
":",
3048-
{
3049-
"Fn::GetAtt": [
3050-
"WebappBuildRepository4C93D48D",
3051-
"Arn",
3052-
],
3053-
},
3054-
],
3055-
},
3056-
],
3057-
},
3058-
".dkr.ecr.",
3059-
{
3060-
"Fn::Select": [
3061-
3,
3062-
{
3063-
"Fn::Split": [
3064-
":",
3065-
{
3066-
"Fn::GetAtt": [
3067-
"WebappBuildRepository4C93D48D",
3068-
"Arn",
3069-
],
3070-
},
3071-
],
3072-
},
3073-
],
3074-
},
3075-
".",
3076-
{
3077-
"Ref": "AWS::URLSuffix",
3078-
},
3079-
"/",
3080-
{
3081-
"Ref": "WebappBuildRepository4C93D48D",
3082-
},
3083-
":<IMAGE_TAG>,push=true --provenance=false .",
3044+
" --build-arg NEXT_PUBLIC_AWS_REGION=us-west-2 --platform linux/arm64 --output type=docker,name=artifact:$imageTag --provenance=false .",
30843045
],
30853046
],
30863047
},
@@ -3146,6 +3107,9 @@ service iptables save",
31463107
"DeletionPolicy": "Delete",
31473108
"Properties": {
31483109
"EmptyOnDelete": true,
3110+
"ImageScanningConfiguration": {
3111+
"ScanOnPush": true,
3112+
},
31493113
"RepositoryPolicyText": {
31503114
"Statement": [
31513115
{

0 commit comments

Comments
 (0)