From c30e0763a8a07d76e35cc17edef3c7e1b00b7240 Mon Sep 17 00:00:00 2001 From: Penghao He Date: Tue, 31 Oct 2023 09:51:14 -0700 Subject: [PATCH] chore: upgrade lambda and codebuild default runtime from nodejs16.x to nodejs18.x (#5429) Resolves #5422 By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the Apache 2.0 License. --- internal/pkg/addon/package_test.go | 12 ++++++------ .../environments/template-with-basic-manifest.yml | 6 +++--- .../template-with-cloudfront-observability.yml | 2 +- .../template-with-default-access-log-config.yml | 6 +++--- .../template-with-defaultvpc-flowlogs.yml | 6 +++--- .../template-with-importedvpc-flowlogs.yml | 6 +++--- .../stack/testdata/pipeline/bb_template.yaml | 4 ++-- .../stack/testdata/pipeline/cc_template.yaml | 4 ++-- .../stack/testdata/pipeline/dd_stack_template.yaml | 2 +- .../stack/testdata/pipeline/gh_template.yaml | 12 ++++++------ .../stack/testdata/pipeline/ghv1_template.yml | 2 +- .../workloads/backend/http-autoscaling-template.yml | 6 +++--- .../workloads/backend/http-full-config-template.yml | 4 ++-- .../workloads/backend/http-only-path-template.yml | 4 ++-- .../workloads/backend/https-path-alias-template.yml | 4 ++-- .../backend/simple-template-without-port-config.yml | 2 +- .../testdata/workloads/backend/simple-template.yml | 2 +- .../stack/testdata/workloads/job-test.stack.yml | 2 +- .../stack/testdata/workloads/rdws-test.stack.yml | 2 +- .../testdata/workloads/static-site-test.stack.yml | 2 +- .../stack/testdata/workloads/static-site.stack.yml | 6 +++--- .../stack/testdata/workloads/svc-grpc-test.stack.yml | 6 +++--- .../stack/testdata/workloads/svc-nlb-dev.stack.yml | 4 ++-- .../stack/testdata/workloads/svc-nlb-prod.stack.yml | 6 +++--- .../stack/testdata/workloads/svc-nlb-test.stack.yml | 4 ++-- .../stack/testdata/workloads/svc-prod.stack.yml | 6 +++--- .../stack/testdata/workloads/svc-staging.stack.yml | 4 ++-- .../stack/testdata/workloads/svc-test.stack.yml | 6 +++--- .../testdata/workloads/windows-svc-test.stack.yml | 4 ++-- .../stack/testdata/workloads/worker-test.stack.yml | 6 +++--- internal/pkg/deploy/pipeline.go | 5 +++-- internal/pkg/deploy/pipeline_test.go | 2 +- .../pkg/template/templates/cicd/partials/test.yml | 2 +- .../templates/environment/partials/cdn-resources.yml | 4 ++-- .../templates/environment/partials/lambdas.yml | 6 +++--- .../template/templates/workloads/partials/cf/alb.yml | 2 +- .../templates/workloads/partials/cf/autoscaling.yml | 4 ++-- .../workloads/partials/cf/env-controller.yml | 2 +- .../template/templates/workloads/partials/cf/nlb.yml | 4 ++-- .../templates/workloads/services/rd-web/cf.yml | 2 +- .../templates/workloads/services/static-site/cf.yml | 6 +++--- site/content/docs/concepts/pipelines.en.md | 2 +- site/content/docs/concepts/pipelines.ja.md | 2 +- site/content/docs/developing/addons/package.en.md | 4 ++-- site/content/docs/developing/addons/package.ja.md | 4 ++-- site/content/docs/manifest/pipeline.en.md | 4 ++-- site/content/docs/manifest/pipeline.ja.md | 4 ++-- 47 files changed, 101 insertions(+), 100 deletions(-) diff --git a/internal/pkg/addon/package_test.go b/internal/pkg/addon/package_test.go index ef79fb8b497..71964862be6 100644 --- a/internal/pkg/addon/package_test.go +++ b/internal/pkg/addon/package_test.go @@ -80,7 +80,7 @@ Resources: Timeout: 900 MemorySize: 512 Role: !GetAtt "TestRole.Arn" - Runtime: nodejs16.x + Runtime: nodejs18.x `, outTemplate: ` Resources: @@ -96,7 +96,7 @@ Resources: Timeout: 900 MemorySize: 512 Role: !GetAtt "TestRole.Arn" - Runtime: nodejs16.x + Runtime: nodejs18.x `, }, "AWS::Glue::Job, non-zipped file": { @@ -225,7 +225,7 @@ Resources: Timeout: 900 MemorySize: 512 Role: !GetAtt "TestRole.Arn" - Runtime: nodejs16.x + Runtime: nodejs18.x `, outTemplate: ` Resources: @@ -247,7 +247,7 @@ Resources: Timeout: 900 MemorySize: 512 Role: !GetAtt "TestRole.Arn" - Runtime: nodejs16.x + Runtime: nodejs18.x `, }, "Fn::Transform nested in a yaml mapping and sequence node": { @@ -480,7 +480,7 @@ Resources: Timeout: 900 MemorySize: 512 Role: !GetAtt "TestRole.Arn" - Runtime: nodejs16.x + Runtime: nodejs18.x ` stack := &EnvironmentStack{ stack: stack{ @@ -511,7 +511,7 @@ Resources: Timeout: 900 MemorySize: 512 Role: !GetAtt "TestRole.Arn" - Runtime: nodejs16.x + Runtime: nodejs18.x ` require.NoError(t, err) tmpl, err := stack.Template() diff --git a/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-basic-manifest.yml b/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-basic-manifest.yml index 8ece1b5c6dc..e68ee44ac27 100644 --- a/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-basic-manifest.yml +++ b/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-basic-manifest.yml @@ -920,7 +920,7 @@ Resources: Timeout: 900 MemorySize: 512 Role: !GetAtt 'CustomResourceRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x CustomDomainFunction: Condition: ManagedAliases @@ -930,7 +930,7 @@ Resources: Timeout: 600 MemorySize: 512 Role: !GetAtt 'CustomResourceRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x DNSDelegationFunction: Type: AWS::Lambda::Function @@ -940,7 +940,7 @@ Resources: Timeout: 600 MemorySize: 512 Role: !GetAtt 'CustomResourceRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x DelegateDNSAction: Metadata: 'aws:copilot:description': 'Delegate DNS for environment subdomain' diff --git a/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-cloudfront-observability.yml b/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-cloudfront-observability.yml index b8bc6894137..ca0423b6f8f 100644 --- a/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-cloudfront-observability.yml +++ b/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-cloudfront-observability.yml @@ -311,7 +311,7 @@ Resources: Timeout: 600 MemorySize: 512 Role: !GetAtt "UniqueJSONValuesFunctionRole.Arn" - Runtime: nodejs16.x + Runtime: nodejs18.x UniqueAliasesAction: Metadata: "aws:copilot:description": "An action to get unique custom aliases for services in your environment" diff --git a/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-default-access-log-config.yml b/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-default-access-log-config.yml index 834e67877b8..da789ad3dcc 100644 --- a/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-default-access-log-config.yml +++ b/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-default-access-log-config.yml @@ -1028,7 +1028,7 @@ Resources: Timeout: 900 MemorySize: 512 Role: !GetAtt 'CustomResourceRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x CustomDomainFunction: Condition: ManagedAliases @@ -1038,7 +1038,7 @@ Resources: Timeout: 600 MemorySize: 512 Role: !GetAtt 'CustomResourceRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x DNSDelegationFunction: Type: AWS::Lambda::Function @@ -1048,7 +1048,7 @@ Resources: Timeout: 600 MemorySize: 512 Role: !GetAtt 'CustomResourceRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x DelegateDNSAction: Metadata: 'aws:copilot:description': 'Delegate DNS for environment subdomain' diff --git a/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-defaultvpc-flowlogs.yml b/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-defaultvpc-flowlogs.yml index 1553e6a22af..a1143ecc162 100644 --- a/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-defaultvpc-flowlogs.yml +++ b/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-defaultvpc-flowlogs.yml @@ -925,7 +925,7 @@ Resources: Timeout: 900 MemorySize: 512 Role: !GetAtt 'CustomResourceRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x CustomDomainFunction: Condition: ManagedAliases @@ -935,7 +935,7 @@ Resources: Timeout: 600 MemorySize: 512 Role: !GetAtt 'CustomResourceRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x DNSDelegationFunction: Type: AWS::Lambda::Function @@ -945,7 +945,7 @@ Resources: Timeout: 600 MemorySize: 512 Role: !GetAtt 'CustomResourceRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x DelegateDNSAction: Metadata: diff --git a/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-importedvpc-flowlogs.yml b/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-importedvpc-flowlogs.yml index a6c03bca27b..ea81c60cf93 100644 --- a/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-importedvpc-flowlogs.yml +++ b/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-importedvpc-flowlogs.yml @@ -754,7 +754,7 @@ Resources: Timeout: 900 MemorySize: 512 Role: !GetAtt 'CustomResourceRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x CustomDomainFunction: Condition: ManagedAliases @@ -764,7 +764,7 @@ Resources: Timeout: 600 MemorySize: 512 Role: !GetAtt 'CustomResourceRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x DNSDelegationFunction: Type: AWS::Lambda::Function @@ -774,7 +774,7 @@ Resources: Timeout: 600 MemorySize: 512 Role: !GetAtt 'CustomResourceRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x DelegateDNSAction: Metadata: diff --git a/internal/pkg/deploy/cloudformation/stack/testdata/pipeline/bb_template.yaml b/internal/pkg/deploy/cloudformation/stack/testdata/pipeline/bb_template.yaml index 2f9b7ba29a6..f11497f2f5b 100644 --- a/internal/pkg/deploy/cloudformation/stack/testdata/pipeline/bb_template.yaml +++ b/internal/pkg/deploy/cloudformation/stack/testdata/pipeline/bb_template.yaml @@ -125,7 +125,7 @@ Resources: Type: LINUX_CONTAINER ComputeType: BUILD_GENERAL1_SMALL PrivilegedMode: true - Image: aws/codebuild/amazonlinux2-x86_64-standard:4.0 + Image: aws/codebuild/amazonlinux2-x86_64-standard:5.0 EnvironmentVariables: - Name: AWS_ACCOUNT_ID Value: !Sub '${AWS::AccountId}' @@ -237,7 +237,7 @@ Resources: Type: NO_ARTIFACTS Environment: Type: LINUX_CONTAINER - Image: aws/codebuild/amazonlinux2-x86_64-standard:4.0 + Image: aws/codebuild/amazonlinux2-x86_64-standard:5.0 ComputeType: BUILD_GENERAL1_SMALL PrivilegedMode: true Source: diff --git a/internal/pkg/deploy/cloudformation/stack/testdata/pipeline/cc_template.yaml b/internal/pkg/deploy/cloudformation/stack/testdata/pipeline/cc_template.yaml index efbe1f04870..f07a3bef00c 100644 --- a/internal/pkg/deploy/cloudformation/stack/testdata/pipeline/cc_template.yaml +++ b/internal/pkg/deploy/cloudformation/stack/testdata/pipeline/cc_template.yaml @@ -120,7 +120,7 @@ Resources: Type: LINUX_CONTAINER ComputeType: BUILD_GENERAL1_SMALL PrivilegedMode: true - Image: aws/codebuild/amazonlinux2-x86_64-standard:4.0 + Image: aws/codebuild/amazonlinux2-x86_64-standard:5.0 EnvironmentVariables: - Name: AWS_ACCOUNT_ID Value: !Sub '${AWS::AccountId}' @@ -211,7 +211,7 @@ Resources: Type: NO_ARTIFACTS Environment: Type: LINUX_CONTAINER - Image: aws/codebuild/amazonlinux2-x86_64-standard:4.0 + Image: aws/codebuild/amazonlinux2-x86_64-standard:5.0 ComputeType: BUILD_GENERAL1_SMALL PrivilegedMode: true Source: diff --git a/internal/pkg/deploy/cloudformation/stack/testdata/pipeline/dd_stack_template.yaml b/internal/pkg/deploy/cloudformation/stack/testdata/pipeline/dd_stack_template.yaml index f5338599e70..6ea1e3243ab 100644 --- a/internal/pkg/deploy/cloudformation/stack/testdata/pipeline/dd_stack_template.yaml +++ b/internal/pkg/deploy/cloudformation/stack/testdata/pipeline/dd_stack_template.yaml @@ -248,7 +248,7 @@ Resources: Type: NO_ARTIFACTS Environment: Type: LINUX_CONTAINER - Image: aws/codebuild/amazonlinux2-x86_64-standard:4.0 + Image: aws/codebuild/amazonlinux2-x86_64-standard:5.0 ComputeType: BUILD_GENERAL1_SMALL PrivilegedMode: true Source: diff --git a/internal/pkg/deploy/cloudformation/stack/testdata/pipeline/gh_template.yaml b/internal/pkg/deploy/cloudformation/stack/testdata/pipeline/gh_template.yaml index c9e12b2332e..1e50fdd61dd 100644 --- a/internal/pkg/deploy/cloudformation/stack/testdata/pipeline/gh_template.yaml +++ b/internal/pkg/deploy/cloudformation/stack/testdata/pipeline/gh_template.yaml @@ -121,7 +121,7 @@ Resources: Type: LINUX_CONTAINER ComputeType: BUILD_GENERAL1_SMALL PrivilegedMode: true - Image: aws/codebuild/amazonlinux2-x86_64-standard:4.0 + Image: aws/codebuild/amazonlinux2-x86_64-standard:5.0 EnvironmentVariables: - Name: AWS_ACCOUNT_ID Value: !Sub '${AWS::AccountId}' @@ -234,7 +234,7 @@ Resources: Type: LINUX_CONTAINER ComputeType: BUILD_GENERAL1_SMALL PrivilegedMode: true - Image: aws/codebuild/amazonlinux2-x86_64-standard:4.0 + Image: aws/codebuild/amazonlinux2-x86_64-standard:5.0 EnvironmentVariables: - Name: AWS_ACCOUNT_ID Value: !Sub '${AWS::AccountId}' @@ -349,7 +349,7 @@ Resources: Type: LINUX_CONTAINER ComputeType: BUILD_GENERAL1_SMALL PrivilegedMode: true - Image: aws/codebuild/amazonlinux2-x86_64-standard:4.0 + Image: aws/codebuild/amazonlinux2-x86_64-standard:5.0 EnvironmentVariables: - Name: AWS_ACCOUNT_ID Value: !Sub '${AWS::AccountId}' @@ -467,7 +467,7 @@ Resources: Type: LINUX_CONTAINER ComputeType: BUILD_GENERAL1_SMALL PrivilegedMode: true - Image: aws/codebuild/amazonlinux2-x86_64-standard:4.0 + Image: aws/codebuild/amazonlinux2-x86_64-standard:5.0 EnvironmentVariables: - Name: AWS_ACCOUNT_ID Value: !Sub '${AWS::AccountId}' @@ -585,7 +585,7 @@ Resources: Type: LINUX_CONTAINER ComputeType: BUILD_GENERAL1_SMALL PrivilegedMode: true - Image: aws/codebuild/amazonlinux2-x86_64-standard:4.0 + Image: aws/codebuild/amazonlinux2-x86_64-standard:5.0 EnvironmentVariables: - Name: AWS_ACCOUNT_ID Value: !Sub '${AWS::AccountId}' @@ -703,7 +703,7 @@ Resources: Type: LINUX_CONTAINER ComputeType: BUILD_GENERAL1_SMALL PrivilegedMode: true - Image: aws/codebuild/amazonlinux2-x86_64-standard:4.0 + Image: aws/codebuild/amazonlinux2-x86_64-standard:5.0 EnvironmentVariables: - Name: AWS_ACCOUNT_ID Value: !Sub '${AWS::AccountId}' diff --git a/internal/pkg/deploy/cloudformation/stack/testdata/pipeline/ghv1_template.yml b/internal/pkg/deploy/cloudformation/stack/testdata/pipeline/ghv1_template.yml index cf9be576d5f..27545aa4bd1 100644 --- a/internal/pkg/deploy/cloudformation/stack/testdata/pipeline/ghv1_template.yml +++ b/internal/pkg/deploy/cloudformation/stack/testdata/pipeline/ghv1_template.yml @@ -206,7 +206,7 @@ Resources: Type: NO_ARTIFACTS Environment: Type: LINUX_CONTAINER - Image: aws/codebuild/amazonlinux2-x86_64-standard:4.0 + Image: aws/codebuild/amazonlinux2-x86_64-standard:5.0 ComputeType: BUILD_GENERAL1_SMALL PrivilegedMode: true Source: diff --git a/internal/pkg/deploy/cloudformation/stack/testdata/workloads/backend/http-autoscaling-template.yml b/internal/pkg/deploy/cloudformation/stack/testdata/workloads/backend/http-autoscaling-template.yml index 4c88e5f9fd9..19d854107cc 100644 --- a/internal/pkg/deploy/cloudformation/stack/testdata/workloads/backend/http-autoscaling-template.yml +++ b/internal/pkg/deploy/cloudformation/stack/testdata/workloads/backend/http-autoscaling-template.yml @@ -285,7 +285,7 @@ Resources: Timeout: 600 MemorySize: 512 Role: !GetAtt "DynamicDesiredCountFunctionRole.Arn" - Runtime: nodejs16.x + Runtime: nodejs18.x DynamicDesiredCountFunctionRole: Metadata: "aws:copilot:description": "An IAM Role for describing number of running tasks in your ECS service" @@ -464,7 +464,7 @@ Resources: Timeout: 600 MemorySize: 512 Role: !GetAtt "RulePriorityFunctionRole.Arn" - Runtime: nodejs16.x + Runtime: nodejs18.x RulePriorityFunctionRole: Metadata: "aws:copilot:description": "An IAM Role to describe load balancer rules for assigning a priority" @@ -568,7 +568,7 @@ Resources: Timeout: 900 MemorySize: 512 Role: !GetAtt "EnvControllerRole.Arn" - Runtime: nodejs16.x + Runtime: nodejs18.x EnvControllerRole: Metadata: "aws:copilot:description": "An IAM role to update your environment stack" diff --git a/internal/pkg/deploy/cloudformation/stack/testdata/workloads/backend/http-full-config-template.yml b/internal/pkg/deploy/cloudformation/stack/testdata/workloads/backend/http-full-config-template.yml index e24ae063974..5e10870f2b5 100644 --- a/internal/pkg/deploy/cloudformation/stack/testdata/workloads/backend/http-full-config-template.yml +++ b/internal/pkg/deploy/cloudformation/stack/testdata/workloads/backend/http-full-config-template.yml @@ -427,7 +427,7 @@ Resources: Timeout: 600 MemorySize: 512 Role: !GetAtt "RulePriorityFunctionRole.Arn" - Runtime: nodejs16.x + Runtime: nodejs18.x RulePriorityFunctionRole: Metadata: "aws:copilot:description": "An IAM Role to describe load balancer rules for assigning a priority" @@ -559,7 +559,7 @@ Resources: Timeout: 900 MemorySize: 512 Role: !GetAtt "EnvControllerRole.Arn" - Runtime: nodejs16.x + Runtime: nodejs18.x EnvControllerRole: Metadata: "aws:copilot:description": "An IAM role to update your environment stack" diff --git a/internal/pkg/deploy/cloudformation/stack/testdata/workloads/backend/http-only-path-template.yml b/internal/pkg/deploy/cloudformation/stack/testdata/workloads/backend/http-only-path-template.yml index 9663abf2982..e83ceb7ce50 100644 --- a/internal/pkg/deploy/cloudformation/stack/testdata/workloads/backend/http-only-path-template.yml +++ b/internal/pkg/deploy/cloudformation/stack/testdata/workloads/backend/http-only-path-template.yml @@ -345,7 +345,7 @@ Resources: Timeout: 600 MemorySize: 512 Role: !GetAtt "RulePriorityFunctionRole.Arn" - Runtime: nodejs16.x + Runtime: nodejs18.x RulePriorityFunctionRole: Metadata: "aws:copilot:description": "An IAM Role to describe load balancer rules for assigning a priority" @@ -449,7 +449,7 @@ Resources: Timeout: 900 MemorySize: 512 Role: !GetAtt "EnvControllerRole.Arn" - Runtime: nodejs16.x + Runtime: nodejs18.x EnvControllerRole: Metadata: "aws:copilot:description": "An IAM role to update your environment stack" diff --git a/internal/pkg/deploy/cloudformation/stack/testdata/workloads/backend/https-path-alias-template.yml b/internal/pkg/deploy/cloudformation/stack/testdata/workloads/backend/https-path-alias-template.yml index 7d8ce301ca3..aa225c688d9 100644 --- a/internal/pkg/deploy/cloudformation/stack/testdata/workloads/backend/https-path-alias-template.yml +++ b/internal/pkg/deploy/cloudformation/stack/testdata/workloads/backend/https-path-alias-template.yml @@ -242,7 +242,7 @@ Resources: Timeout: 600 MemorySize: 512 Role: !GetAtt "RulePriorityFunctionRole.Arn" - Runtime: nodejs16.x + Runtime: nodejs18.x RulePriorityFunctionRole: Metadata: 'aws:copilot:description': "An IAM Role to describe load balancer rules for assigning a priority" @@ -441,7 +441,7 @@ Resources: Timeout: 900 MemorySize: 512 Role: !GetAtt 'EnvControllerRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x EnvControllerRole: Metadata: 'aws:copilot:description': "An IAM role to update your environment stack" diff --git a/internal/pkg/deploy/cloudformation/stack/testdata/workloads/backend/simple-template-without-port-config.yml b/internal/pkg/deploy/cloudformation/stack/testdata/workloads/backend/simple-template-without-port-config.yml index a7cc669a2b7..8b90ec0dfc9 100644 --- a/internal/pkg/deploy/cloudformation/stack/testdata/workloads/backend/simple-template-without-port-config.yml +++ b/internal/pkg/deploy/cloudformation/stack/testdata/workloads/backend/simple-template-without-port-config.yml @@ -341,7 +341,7 @@ Resources: Timeout: 900 MemorySize: 512 Role: !GetAtt "EnvControllerRole.Arn" - Runtime: nodejs16.x + Runtime: nodejs18.x EnvControllerRole: Metadata: "aws:copilot:description": "An IAM role to update your environment stack" diff --git a/internal/pkg/deploy/cloudformation/stack/testdata/workloads/backend/simple-template.yml b/internal/pkg/deploy/cloudformation/stack/testdata/workloads/backend/simple-template.yml index f52a0399010..162aca1af86 100644 --- a/internal/pkg/deploy/cloudformation/stack/testdata/workloads/backend/simple-template.yml +++ b/internal/pkg/deploy/cloudformation/stack/testdata/workloads/backend/simple-template.yml @@ -351,7 +351,7 @@ Resources: Timeout: 900 MemorySize: 512 Role: !GetAtt "EnvControllerRole.Arn" - Runtime: nodejs16.x + Runtime: nodejs18.x EnvControllerRole: Metadata: "aws:copilot:description": "An IAM role to update your environment stack" diff --git a/internal/pkg/deploy/cloudformation/stack/testdata/workloads/job-test.stack.yml b/internal/pkg/deploy/cloudformation/stack/testdata/workloads/job-test.stack.yml index 00bc7d462d7..938394866af 100644 --- a/internal/pkg/deploy/cloudformation/stack/testdata/workloads/job-test.stack.yml +++ b/internal/pkg/deploy/cloudformation/stack/testdata/workloads/job-test.stack.yml @@ -70,7 +70,7 @@ Resources: Timeout: 900 MemorySize: 512 Role: !GetAtt 'EnvControllerRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x EnvControllerRole: Metadata: diff --git a/internal/pkg/deploy/cloudformation/stack/testdata/workloads/rdws-test.stack.yml b/internal/pkg/deploy/cloudformation/stack/testdata/workloads/rdws-test.stack.yml index 460136aead0..4ad08f9fac5 100644 --- a/internal/pkg/deploy/cloudformation/stack/testdata/workloads/rdws-test.stack.yml +++ b/internal/pkg/deploy/cloudformation/stack/testdata/workloads/rdws-test.stack.yml @@ -288,7 +288,7 @@ Resources: Timeout: 900 MemorySize: 512 Role: !GetAtt 'EnvControllerRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x EnvControllerRole: Metadata: diff --git a/internal/pkg/deploy/cloudformation/stack/testdata/workloads/static-site-test.stack.yml b/internal/pkg/deploy/cloudformation/stack/testdata/workloads/static-site-test.stack.yml index fe21b653683..c4a2ee35a3b 100644 --- a/internal/pkg/deploy/cloudformation/stack/testdata/workloads/static-site-test.stack.yml +++ b/internal/pkg/deploy/cloudformation/stack/testdata/workloads/static-site-test.stack.yml @@ -141,7 +141,7 @@ Resources: Properties: Handler: index.handler Role: !GetAtt TriggerStateMachineFunctionRole.Arn - Runtime: nodejs16.x + Runtime: nodejs18.x Timeout: 900 MemorySize: 512 diff --git a/internal/pkg/deploy/cloudformation/stack/testdata/workloads/static-site.stack.yml b/internal/pkg/deploy/cloudformation/stack/testdata/workloads/static-site.stack.yml index 9f9a2772b5d..6347784d6f8 100644 --- a/internal/pkg/deploy/cloudformation/stack/testdata/workloads/static-site.stack.yml +++ b/internal/pkg/deploy/cloudformation/stack/testdata/workloads/static-site.stack.yml @@ -141,7 +141,7 @@ Resources: Properties: Handler: index.handler Role: !GetAtt TriggerStateMachineFunctionRole.Arn - Runtime: nodejs16.x + Runtime: nodejs18.x Timeout: 900 MemorySize: 512 @@ -387,7 +387,7 @@ Resources: Timeout: 900 MemorySize: 512 Role: !GetAtt 'CustomDomainRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x CustomDomainRole: Metadata: @@ -451,7 +451,7 @@ Resources: Timeout: 900 MemorySize: 512 Role: !GetAtt 'CertificateValidatorRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x CertificateValidatorRole: Metadata: diff --git a/internal/pkg/deploy/cloudformation/stack/testdata/workloads/svc-grpc-test.stack.yml b/internal/pkg/deploy/cloudformation/stack/testdata/workloads/svc-grpc-test.stack.yml index 3533ae6e4fb..2acc68fd06a 100644 --- a/internal/pkg/deploy/cloudformation/stack/testdata/workloads/svc-grpc-test.stack.yml +++ b/internal/pkg/deploy/cloudformation/stack/testdata/workloads/svc-grpc-test.stack.yml @@ -254,7 +254,7 @@ Resources: # If a bucket URL is specified, that means the template exists. Timeout: 600 MemorySize: 512 Role: !GetAtt 'DynamicDesiredCountFunctionRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x DynamicDesiredCountFunctionRole: Metadata: 'aws:copilot:description': "An IAM Role for describing number of running tasks in your ECS service" @@ -359,7 +359,7 @@ Resources: # If a bucket URL is specified, that means the template exists. Timeout: 900 MemorySize: 512 Role: !GetAtt 'EnvControllerRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x EnvControllerRole: Metadata: 'aws:copilot:description': "An IAM role to update your environment stack" @@ -477,7 +477,7 @@ Resources: # If a bucket URL is specified, that means the template exists. Timeout: 600 MemorySize: 512 Role: !GetAtt 'RulePriorityFunctionRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x RulePriorityFunctionRole: Metadata: 'aws:copilot:description': "An IAM Role to describe load balancer rules for assigning a priority" diff --git a/internal/pkg/deploy/cloudformation/stack/testdata/workloads/svc-nlb-dev.stack.yml b/internal/pkg/deploy/cloudformation/stack/testdata/workloads/svc-nlb-dev.stack.yml index 00d59dc211a..2635f5b7b11 100644 --- a/internal/pkg/deploy/cloudformation/stack/testdata/workloads/svc-nlb-dev.stack.yml +++ b/internal/pkg/deploy/cloudformation/stack/testdata/workloads/svc-nlb-dev.stack.yml @@ -241,7 +241,7 @@ Resources: # If a bucket URL is specified, that means the template exists. Timeout: 900 MemorySize: 512 Role: !GetAtt 'EnvControllerRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x EnvControllerRole: Metadata: 'aws:copilot:description': "An IAM role to update your environment stack" @@ -369,7 +369,7 @@ Resources: # If a bucket URL is specified, that means the template exists. Timeout: 600 MemorySize: 512 Role: !GetAtt 'RulePriorityFunctionRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x RulePriorityFunctionRole: Metadata: 'aws:copilot:description': "An IAM Role to describe load balancer rules for assigning a priority" diff --git a/internal/pkg/deploy/cloudformation/stack/testdata/workloads/svc-nlb-prod.stack.yml b/internal/pkg/deploy/cloudformation/stack/testdata/workloads/svc-nlb-prod.stack.yml index 9fe65603482..ef477a57be2 100644 --- a/internal/pkg/deploy/cloudformation/stack/testdata/workloads/svc-nlb-prod.stack.yml +++ b/internal/pkg/deploy/cloudformation/stack/testdata/workloads/svc-nlb-prod.stack.yml @@ -343,7 +343,7 @@ Resources: # If a bucket URL is specified, that means the template exists. Timeout: 900 MemorySize: 512 Role: !GetAtt 'EnvControllerRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x EnvControllerRole: Metadata: 'aws:copilot:description': "An IAM role to update your environment stack" @@ -642,7 +642,7 @@ Resources: # If a bucket URL is specified, that means the template exists. Timeout: 900 MemorySize: 512 Role: !GetAtt 'NLBCustomDomainRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x NLBCustomDomainRole: Metadata: 'aws:copilot:description': "An IAM role to update the environment Route 53 hosted zone" @@ -709,7 +709,7 @@ Resources: # If a bucket URL is specified, that means the template exists. Timeout: 900 MemorySize: 512 Role: !GetAtt 'NLBCertValidatorRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x NLBCertValidatorRole: Metadata: 'aws:copilot:description': "An IAM role to request and validate a certificate for your service" diff --git a/internal/pkg/deploy/cloudformation/stack/testdata/workloads/svc-nlb-test.stack.yml b/internal/pkg/deploy/cloudformation/stack/testdata/workloads/svc-nlb-test.stack.yml index 23d458f6546..2c86c44e889 100644 --- a/internal/pkg/deploy/cloudformation/stack/testdata/workloads/svc-nlb-test.stack.yml +++ b/internal/pkg/deploy/cloudformation/stack/testdata/workloads/svc-nlb-test.stack.yml @@ -236,7 +236,7 @@ Resources: # If a bucket URL is specified, that means the template exists. Timeout: 900 MemorySize: 512 Role: !GetAtt 'EnvControllerRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x EnvControllerRole: Metadata: 'aws:copilot:description': "An IAM role to update your environment stack" @@ -522,7 +522,7 @@ Resources: # If a bucket URL is specified, that means the template exists. Timeout: 900 MemorySize: 512 Role: !GetAtt 'NLBCertValidatorRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x NLBCertValidatorRole: Metadata: 'aws:copilot:description': "An IAM role to request and validate a certificate for your service" diff --git a/internal/pkg/deploy/cloudformation/stack/testdata/workloads/svc-prod.stack.yml b/internal/pkg/deploy/cloudformation/stack/testdata/workloads/svc-prod.stack.yml index ef04124bb26..8487a10c16b 100644 --- a/internal/pkg/deploy/cloudformation/stack/testdata/workloads/svc-prod.stack.yml +++ b/internal/pkg/deploy/cloudformation/stack/testdata/workloads/svc-prod.stack.yml @@ -476,7 +476,7 @@ Resources: # If a bucket URL is specified, that means the template exists. Timeout: 600 MemorySize: 512 Role: !GetAtt 'DynamicDesiredCountFunctionRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x DynamicDesiredCountFunctionRole: Metadata: 'aws:copilot:description': "An IAM Role for describing number of running tasks in your ECS service" @@ -581,7 +581,7 @@ Resources: # If a bucket URL is specified, that means the template exists. Timeout: 900 MemorySize: 512 Role: !GetAtt 'EnvControllerRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x EnvControllerRole: Metadata: 'aws:copilot:description': "An IAM role to update your environment stack" @@ -755,7 +755,7 @@ Resources: # If a bucket URL is specified, that means the template exists. Timeout: 600 MemorySize: 512 Role: !GetAtt 'RulePriorityFunctionRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x RulePriorityFunctionRole: Type: AWS::IAM::Role Metadata: diff --git a/internal/pkg/deploy/cloudformation/stack/testdata/workloads/svc-staging.stack.yml b/internal/pkg/deploy/cloudformation/stack/testdata/workloads/svc-staging.stack.yml index 047bec95d51..03e992d1835 100644 --- a/internal/pkg/deploy/cloudformation/stack/testdata/workloads/svc-staging.stack.yml +++ b/internal/pkg/deploy/cloudformation/stack/testdata/workloads/svc-staging.stack.yml @@ -254,7 +254,7 @@ Resources: # If a bucket URL is specified, that means the template exists. Timeout: 900 MemorySize: 512 Role: !GetAtt 'EnvControllerRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x EnvControllerRole: Metadata: 'aws:copilot:description': "An IAM role to update your environment stack" @@ -394,7 +394,7 @@ Resources: # If a bucket URL is specified, that means the template exists. Timeout: 600 MemorySize: 512 Role: !GetAtt 'RulePriorityFunctionRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x RulePriorityFunctionRole: Metadata: 'aws:copilot:description': "An IAM Role to describe load balancer rules for assigning a priority" diff --git a/internal/pkg/deploy/cloudformation/stack/testdata/workloads/svc-test.stack.yml b/internal/pkg/deploy/cloudformation/stack/testdata/workloads/svc-test.stack.yml index 4cc367a9042..4ef68f6a491 100644 --- a/internal/pkg/deploy/cloudformation/stack/testdata/workloads/svc-test.stack.yml +++ b/internal/pkg/deploy/cloudformation/stack/testdata/workloads/svc-test.stack.yml @@ -255,7 +255,7 @@ Resources: # If a bucket URL is specified, that means the template exists. Timeout: 600 MemorySize: 512 Role: !GetAtt 'DynamicDesiredCountFunctionRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x DynamicDesiredCountFunctionRole: Metadata: 'aws:copilot:description': "An IAM Role for describing number of running tasks in your ECS service" @@ -360,7 +360,7 @@ Resources: # If a bucket URL is specified, that means the template exists. Timeout: 900 MemorySize: 512 Role: !GetAtt 'EnvControllerRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x EnvControllerRole: Metadata: 'aws:copilot:description': "An IAM role to update your environment stack" @@ -481,7 +481,7 @@ Resources: # If a bucket URL is specified, that means the template exists. Timeout: 600 MemorySize: 512 Role: !GetAtt 'RulePriorityFunctionRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x RulePriorityFunctionRole: Metadata: 'aws:copilot:description': "An IAM Role to describe load balancer rules for assigning a priority" diff --git a/internal/pkg/deploy/cloudformation/stack/testdata/workloads/windows-svc-test.stack.yml b/internal/pkg/deploy/cloudformation/stack/testdata/workloads/windows-svc-test.stack.yml index 9701639076f..14816d3b359 100644 --- a/internal/pkg/deploy/cloudformation/stack/testdata/workloads/windows-svc-test.stack.yml +++ b/internal/pkg/deploy/cloudformation/stack/testdata/workloads/windows-svc-test.stack.yml @@ -233,7 +233,7 @@ Resources: # If a bucket URL is specified, that means the template exists. Timeout: 900 MemorySize: 512 Role: !GetAtt 'EnvControllerRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x EnvControllerRole: Metadata: 'aws:copilot:description': "An IAM role to update your environment stack" @@ -349,7 +349,7 @@ Resources: # If a bucket URL is specified, that means the template exists. Timeout: 600 MemorySize: 512 Role: !GetAtt 'RulePriorityFunctionRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x RulePriorityFunctionRole: Metadata: 'aws:copilot:description': "An IAM Role to describe load balancer rules for assigning a priority" diff --git a/internal/pkg/deploy/cloudformation/stack/testdata/workloads/worker-test.stack.yml b/internal/pkg/deploy/cloudformation/stack/testdata/workloads/worker-test.stack.yml index 4d6474ebed2..75adeadd2e5 100644 --- a/internal/pkg/deploy/cloudformation/stack/testdata/workloads/worker-test.stack.yml +++ b/internal/pkg/deploy/cloudformation/stack/testdata/workloads/worker-test.stack.yml @@ -356,7 +356,7 @@ Resources: Timeout: 600 MemorySize: 512 Role: !GetAtt 'DynamicDesiredCountFunctionRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x DynamicDesiredCountFunctionRole: Metadata: 'aws:copilot:description': "An IAM Role for describing number of running tasks in your ECS service" @@ -450,7 +450,7 @@ Resources: Timeout: 600 MemorySize: 512 Role: !GetAtt BacklogPerTaskCalculatorRole.Arn - Runtime: nodejs16.x + Runtime: nodejs18.x Environment: Variables: CLUSTER_NAME: @@ -1182,7 +1182,7 @@ Resources: Timeout: 900 MemorySize: 512 Role: !GetAtt 'EnvControllerRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x EnvControllerRole: Metadata: 'aws:copilot:description': "An IAM role to update your environment stack" diff --git a/internal/pkg/deploy/pipeline.go b/internal/pkg/deploy/pipeline.go index bee9a60c5e1..2176938b010 100644 --- a/internal/pkg/deploy/pipeline.go +++ b/internal/pkg/deploy/pipeline.go @@ -8,13 +8,14 @@ package deploy import ( "errors" "fmt" - "gopkg.in/yaml.v3" "path" "path/filepath" "regexp" "sort" "strings" + "gopkg.in/yaml.v3" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/copilot-cli/internal/pkg/config" "github.com/aws/copilot-cli/internal/pkg/graph" @@ -26,7 +27,7 @@ const ( fmtErrMissingProperty = "missing `%s` in properties" fmtErrPropertyNotAString = "property `%s` is not a string" - defaultPipelineBuildImage = "aws/codebuild/amazonlinux2-x86_64-standard:4.0" + defaultPipelineBuildImage = "aws/codebuild/amazonlinux2-x86_64-standard:5.0" defaultPipelineEnvironmentType = "LINUX_CONTAINER" // DefaultPipelineArtifactsDir is the default folder to output Copilot-generated templates. diff --git a/internal/pkg/deploy/pipeline_test.go b/internal/pkg/deploy/pipeline_test.go index b2690e96039..a86988df429 100644 --- a/internal/pkg/deploy/pipeline_test.go +++ b/internal/pkg/deploy/pipeline_test.go @@ -202,7 +202,7 @@ func TestPipelineSourceFromManifest(t *testing.T) { func TestPipelineBuild_Init(t *testing.T) { const ( - defaultImage = "aws/codebuild/amazonlinux2-x86_64-standard:4.0" + defaultImage = "aws/codebuild/amazonlinux2-x86_64-standard:5.0" defaultEnvType = "LINUX_CONTAINER" ) yamlNode := yaml.Node{} diff --git a/internal/pkg/template/templates/cicd/partials/test.yml b/internal/pkg/template/templates/cicd/partials/test.yml index 665a83dcd84..a2474f7a983 100644 --- a/internal/pkg/template/templates/cicd/partials/test.yml +++ b/internal/pkg/template/templates/cicd/partials/test.yml @@ -9,7 +9,7 @@ BuildTestCommands{{logicalIDSafe $stage.Name}}: Type: NO_ARTIFACTS Environment: Type: LINUX_CONTAINER - Image: aws/codebuild/amazonlinux2-x86_64-standard:4.0 + Image: aws/codebuild/amazonlinux2-x86_64-standard:5.0 ComputeType: BUILD_GENERAL1_SMALL PrivilegedMode: true Source: diff --git a/internal/pkg/template/templates/environment/partials/cdn-resources.yml b/internal/pkg/template/templates/environment/partials/cdn-resources.yml index 61ac4513c2b..47e24bd94dd 100644 --- a/internal/pkg/template/templates/environment/partials/cdn-resources.yml +++ b/internal/pkg/template/templates/environment/partials/cdn-resources.yml @@ -34,7 +34,7 @@ UniqueJSONValuesFunction: Timeout: 600 MemorySize: 512 Role: !GetAtt 'UniqueJSONValuesFunctionRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x UniqueAliasesAction: Metadata: @@ -139,7 +139,7 @@ CertificateReplicatorFunction: Timeout: 900 MemorySize: 512 Role: !GetAtt 'CustomResourceRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x CertificateReplicator: Metadata: diff --git a/internal/pkg/template/templates/environment/partials/lambdas.yml b/internal/pkg/template/templates/environment/partials/lambdas.yml index c15e6b26989..d4dcb1a8270 100644 --- a/internal/pkg/template/templates/environment/partials/lambdas.yml +++ b/internal/pkg/template/templates/environment/partials/lambdas.yml @@ -11,7 +11,7 @@ CertificateValidationFunction: Timeout: 900 MemorySize: 512 Role: !GetAtt 'CustomResourceRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x CustomDomainFunction: Condition: ManagedAliases @@ -26,7 +26,7 @@ CustomDomainFunction: Timeout: 600 MemorySize: 512 Role: !GetAtt 'CustomResourceRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x DNSDelegationFunction: Type: AWS::Lambda::Function @@ -41,4 +41,4 @@ DNSDelegationFunction: Timeout: 600 MemorySize: 512 Role: !GetAtt 'CustomResourceRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x diff --git a/internal/pkg/template/templates/workloads/partials/cf/alb.yml b/internal/pkg/template/templates/workloads/partials/cf/alb.yml index 33c6b61971c..3252a627ed1 100644 --- a/internal/pkg/template/templates/workloads/partials/cf/alb.yml +++ b/internal/pkg/template/templates/workloads/partials/cf/alb.yml @@ -58,7 +58,7 @@ RulePriorityFunction: Timeout: 600 MemorySize: 512 Role: !GetAtt "RulePriorityFunctionRole.Arn" - Runtime: nodejs16.x + Runtime: nodejs18.x RulePriorityFunctionRole: Metadata: diff --git a/internal/pkg/template/templates/workloads/partials/cf/autoscaling.yml b/internal/pkg/template/templates/workloads/partials/cf/autoscaling.yml index bbd51dff9fc..3e7714ca3ee 100644 --- a/internal/pkg/template/templates/workloads/partials/cf/autoscaling.yml +++ b/internal/pkg/template/templates/workloads/partials/cf/autoscaling.yml @@ -26,7 +26,7 @@ DynamicDesiredCountFunction: Timeout: 600 MemorySize: 512 Role: !GetAtt 'DynamicDesiredCountFunctionRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x DynamicDesiredCountFunctionRole: Metadata: @@ -182,7 +182,7 @@ BacklogPerTaskCalculatorFunction: Timeout: 600 MemorySize: 512 Role: !GetAtt BacklogPerTaskCalculatorRole.Arn - Runtime: nodejs16.x + Runtime: nodejs18.x Environment: Variables: CLUSTER_NAME: diff --git a/internal/pkg/template/templates/workloads/partials/cf/env-controller.yml b/internal/pkg/template/templates/workloads/partials/cf/env-controller.yml index e6e2d069c33..ac51669db8e 100644 --- a/internal/pkg/template/templates/workloads/partials/cf/env-controller.yml +++ b/internal/pkg/template/templates/workloads/partials/cf/env-controller.yml @@ -24,7 +24,7 @@ EnvControllerFunction: Timeout: 900 MemorySize: 512 Role: !GetAtt 'EnvControllerRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x EnvControllerRole: Metadata: diff --git a/internal/pkg/template/templates/workloads/partials/cf/nlb.yml b/internal/pkg/template/templates/workloads/partials/cf/nlb.yml index 62a0f20d89c..e4d67306d07 100644 --- a/internal/pkg/template/templates/workloads/partials/cf/nlb.yml +++ b/internal/pkg/template/templates/workloads/partials/cf/nlb.yml @@ -259,7 +259,7 @@ NLBCustomDomainFunction: Timeout: 900 MemorySize: 512 Role: !GetAtt 'NLBCustomDomainRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x NLBCustomDomainRole: Metadata: @@ -347,7 +347,7 @@ NLBCertValidatorFunction: Timeout: 900 MemorySize: 512 Role: !GetAtt 'NLBCertValidatorRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x NLBCertValidatorRole: Metadata: diff --git a/internal/pkg/template/templates/workloads/services/rd-web/cf.yml b/internal/pkg/template/templates/workloads/services/rd-web/cf.yml index 6602f010ee8..48015cf5ad7 100644 --- a/internal/pkg/template/templates/workloads/services/rd-web/cf.yml +++ b/internal/pkg/template/templates/workloads/services/rd-web/cf.yml @@ -224,7 +224,7 @@ Resources: Timeout: 900 MemorySize: 512 Role: !GetAtt CustomResourceRole.Arn - Runtime: nodejs16.x + Runtime: nodejs18.x Layers: - {{ .AWSSDKLayer }} diff --git a/internal/pkg/template/templates/workloads/services/static-site/cf.yml b/internal/pkg/template/templates/workloads/services/static-site/cf.yml index 757c96d73c7..285d76e2c40 100644 --- a/internal/pkg/template/templates/workloads/services/static-site/cf.yml +++ b/internal/pkg/template/templates/workloads/services/static-site/cf.yml @@ -163,7 +163,7 @@ Resources: Properties: Handler: index.handler Role: !GetAtt TriggerStateMachineFunctionRole.Arn - Runtime: nodejs16.x + Runtime: nodejs18.x Timeout: 900 MemorySize: 512 {{- with $cr := index .CustomResources "TriggerStateMachineFunction" }} @@ -433,7 +433,7 @@ Resources: Timeout: 900 MemorySize: 512 Role: !GetAtt 'CustomDomainRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x CustomDomainRole: Metadata: @@ -508,7 +508,7 @@ Resources: Timeout: 900 MemorySize: 512 Role: !GetAtt 'CertificateValidatorRole.Arn' - Runtime: nodejs16.x + Runtime: nodejs18.x CertificateValidatorRole: Metadata: diff --git a/site/content/docs/concepts/pipelines.en.md b/site/content/docs/concepts/pipelines.en.md index bc69af46d1d..8121f04d703 100644 --- a/site/content/docs/concepts/pipelines.en.md +++ b/site/content/docs/concepts/pipelines.en.md @@ -198,7 +198,7 @@ warrant wiring up a separate buildspec, utilize the `test_commands` field. The `post_deployments` and `test_commands` fields within a stage are mutually exclusive. -Pre-deployments, post-deployments, and test commands generate CodeBuild projects with the [aws/codebuild/amazonlinux2-x86_64-standard:4.0](https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html) image, so most commands from Amazon Linux 2 (including `make`) are available for use. +Pre-deployments, post-deployments, and test commands generate CodeBuild projects with the [aws/codebuild/amazonlinux2-x86_64-standard:5.0](https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html) image, so most commands from Amazon Linux 2 (including `make`) are available for use. Are your tests configured to run inside a Docker container? Copilot's test commands CodeBuild project supports Docker, so `docker build` commands are available as well. In the example below, the pipeline will run the `make test` command (in your source code directory) and only promote the change to the prod stage if that command exits successfully. diff --git a/site/content/docs/concepts/pipelines.ja.md b/site/content/docs/concepts/pipelines.ja.md index f46dc2bca84..f4cbf0be5aa 100644 --- a/site/content/docs/concepts/pipelines.ja.md +++ b/site/content/docs/concepts/pipelines.ja.md @@ -200,7 +200,7 @@ stages: !!! warning ステージ内の `post_deployments` フィールドと `test_commands` フィールドは相互に排他的です。 -デプロイ前、デプロイ後、およびテストコマンドは、[aws/codebuild/amazonlinux2-x86_64-standard:4.0](https://docs.aws.amazon.com/ja_jp/codebuild/latest/userguide/build-env-ref-available.html) イメージを使用して CodeBuild プロジェクトを生成するため、Amazon Linux 2 のほとんどのコマンド (`make` を含む) を使用できます。 +デプロイ前、デプロイ後、およびテストコマンドは、[aws/codebuild/amazonlinux2-x86_64-standard:5.0](https://docs.aws.amazon.com/ja_jp/codebuild/latest/userguide/build-env-ref-available.html) イメージを使用して CodeBuild プロジェクトを生成するため、Amazon Linux 2 のほとんどのコマンド (`make` を含む) を使用できます。 テストの実行を Docker コンテナの中で実行するように設定していますか?Copilot では CodeBuild プロジェクトの Docker サポートを利用できますので、`docker build` コマンドも同様に利用可能です。 diff --git a/site/content/docs/developing/addons/package.en.md b/site/content/docs/developing/addons/package.en.md index 15f767be84f..925d8da5d74 100644 --- a/site/content/docs/developing/addons/package.en.md +++ b/site/content/docs/developing/addons/package.en.md @@ -20,7 +20,7 @@ For example, to deploy a javascript Lambda function alongside a copilot service, Timeout: 900 MemorySize: 512 Role: !GetAtt "ExampleFunctionRole.Arn" - Runtime: nodejs16.x + Runtime: nodejs18.x ``` === "lambdas/example/index.js" @@ -82,7 +82,7 @@ This architecture could be useful if you have a service that needs to minimize l Timeout: 60 MemorySize: 512 Role: !GetAtt "recordProcessorRole.Arn" - Runtime: nodejs16.x + Runtime: nodejs18.x recordProcessorRole: Type: AWS::IAM::Role diff --git a/site/content/docs/developing/addons/package.ja.md b/site/content/docs/developing/addons/package.ja.md index 372ae1c96d8..427fcb130e7 100644 --- a/site/content/docs/developing/addons/package.ja.md +++ b/site/content/docs/developing/addons/package.ja.md @@ -20,7 +20,7 @@ Copilot は、Addon テンプレートから参照されるローカルファイ Timeout: 900 MemorySize: 512 Role: !GetAtt "ExampleFunctionRole.Arn" - Runtime: nodejs16.x + Runtime: nodejs18.x ``` === "lambdas/example/index.js" @@ -84,7 +84,7 @@ zip が必要な一部のリソース (`AWS::Serverless::Function` など) で Timeout: 60 MemorySize: 512 Role: !GetAtt "recordProcessorRole.Arn" - Runtime: nodejs16.x + Runtime: nodejs18.x recordProcessorRole: Type: AWS::IAM::Role diff --git a/site/content/docs/manifest/pipeline.en.md b/site/content/docs/manifest/pipeline.en.md index 7171d5a46e1..c04de27ac1a 100644 --- a/site/content/docs/manifest/pipeline.en.md +++ b/site/content/docs/manifest/pipeline.en.md @@ -17,7 +17,7 @@ List of all available properties for a Copilot pipeline manifest. To learn more # connection_name: a-connection build: - image: aws/codebuild/amazonlinux2-x86_64-standard:4.0 + image: aws/codebuild/amazonlinux2-x86_64-standard:5.0 # additional_policy: # Add additional permissions while building your container images and templates. stages: @@ -135,7 +135,7 @@ Optional. The output artifact format. Values can be either `CODEBUILD_CLONE_REF` Configuration for CodeBuild project. build.`image` String -The URI that identifies the Docker image to use for this build project. As of now, `aws/codebuild/amazonlinux2-x86_64-standard:4.0` is used by default. +The URI that identifies the Docker image to use for this build project. As of now, `aws/codebuild/amazonlinux2-x86_64-standard:5.0` is used by default. build.`buildspec` String Optional. The path to a buildspec file, relative to the project root, to use for this build project. By default, Copilot will generate one for you, located at `copilot/pipelines/[your pipeline name]/buildspec.yml`. diff --git a/site/content/docs/manifest/pipeline.ja.md b/site/content/docs/manifest/pipeline.ja.md index 4075d7e973f..8c3e1138041 100644 --- a/site/content/docs/manifest/pipeline.ja.md +++ b/site/content/docs/manifest/pipeline.ja.md @@ -17,7 +17,7 @@ # connection_name: a-connection build: - image: aws/codebuild/amazonlinux2-x86_64-standard:4.0 + image: aws/codebuild/amazonlinux2-x86_64-standard:5.0 # additional_policy: # コンテナイメージやテンプレートを構築する際に、権限を追加することができます。 stages: @@ -136,7 +136,7 @@ Pipeline をトリガーするリポジトリのブランチ名。 Copilot は CodeBuild プロジェクトに関する設定。 build.`image` String -CodeBuild のビルドプロジェクトで利用する Docker イメージの URI。`aws/codebuild/amazonlinux2-x86_64-standard:4.0` がデフォルトで利用されます。 +CodeBuild のビルドプロジェクトで利用する Docker イメージの URI。`aws/codebuild/amazonlinux2-x86_64-standard:5.0` がデフォルトで利用されます。 build.`buildspec` String 任意項目。このビルドプロジェクトで使用する、buildspec ファイルへのプロジェクトルートからの相対パスを指定します。デフォルトでは、作成したファイルは、 `copilot/pipelines/[your pipeline name]/buildspec.yml` に配置されています。