From e1e3e267b9231c6363eb265e2559d4d91dd5e6cd Mon Sep 17 00:00:00 2001 From: aws-sam-cli-bot <46753707+aws-sam-cli-bot@users.noreply.github.com> Date: Tue, 29 Nov 2022 03:32:58 +0000 Subject: [PATCH] chore: Bump SamTranslator version to 1.55.0 --- requirements/base.txt | 2 +- requirements/reproducible-linux.txt | 8 ++--- .../lib/models/function_with_snapstart.yaml | 35 +++++++++++++++++++ .../lib/models/globals_for_function.yaml | 4 +++ 4 files changed, 44 insertions(+), 5 deletions(-) create mode 100644 tests/functional/commands/validate/lib/models/function_with_snapstart.yaml diff --git a/requirements/base.txt b/requirements/base.txt index e24c2cae1d..c14347bb0b 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -8,7 +8,7 @@ boto3>=1.19.5,==1.* jmespath~=0.10.0 PyYAML~=5.3 cookiecutter~=2.1.1 -aws-sam-translator==1.54.0 +aws-sam-translator==1.55.0 #docker minor version updates can include breaking changes. Auto update micro version only. docker~=4.2.0 dateparser~=1.0 diff --git a/requirements/reproducible-linux.txt b/requirements/reproducible-linux.txt index b8b716c070..7008d73974 100644 --- a/requirements/reproducible-linux.txt +++ b/requirements/reproducible-linux.txt @@ -16,10 +16,10 @@ aws-lambda-builders==1.23.1 \ --hash=sha256:4db4133decf149c5b2daa0959db0f6e5563a9763beac0e25005a90c2ce7abe48 \ --hash=sha256:dda6f7e04bc77120c206ef5269a0c17bbcecacf065865248d31c1c80f325a343 # via aws-sam-cli (setup.py) -aws-sam-translator==1.54.0 \ - --hash=sha256:10d6771ebbe9107a0ddb756ccffd68ba81d885ef2eace80358a098566e6abaf1 \ - --hash=sha256:1bb4abb197e6de3f935425e65f67d14f47eb620d984e9de963b666cc9deb66e4 \ - --hash=sha256:a3ae79f1f2d430f5ade4d245165d5612414233f540b471d170f1aab95c3713a6 +aws-sam-translator==1.55.0 \ + --hash=sha256:08e182e76d6fabc13ce2f38b8a3932b3131407c6ad29ec2849ef3d9a41576b94 \ + --hash=sha256:93dc74614ab291c86be681e025679d08f4fa685ed6b55d410f62f2f235012205 \ + --hash=sha256:e86a67b87329a0de7d531d33257d1a448d0d6ecd84aee058d084957f28a8e4b1 # via aws-sam-cli (setup.py) backports-zoneinfo==0.2.1 \ --hash=sha256:17746bd546106fa389c51dbea67c8b7c8f0d14b5526a579ca6ccf5ed72c526cf \ diff --git a/tests/functional/commands/validate/lib/models/function_with_snapstart.yaml b/tests/functional/commands/validate/lib/models/function_with_snapstart.yaml new file mode 100644 index 0000000000..4b3e088362 --- /dev/null +++ b/tests/functional/commands/validate/lib/models/function_with_snapstart.yaml @@ -0,0 +1,35 @@ +%YAML 1.1 +--- +Parameters: + SnapStartParam: + Type: String + Default: None + +Resources: + SnapStartFunction: + Type: AWS::Serverless::Function + Properties: + CodeUri: s3://sam-demo-bucket/hello.zip + Handler: hello.handler + Runtime: python3.9 + SnapStart: + ApplyOn: PublishedVersions + + SnapStartParameterFunction: + Type: AWS::Serverless::Function + Properties: + CodeUri: s3://sam-demo-bucket/hello.zip + Handler: hello.handler + Runtime: python3.9 + SnapStart: + ApplyOn: !Ref SnapStartParam + + SnapStartFunctionWithAlias: + Type: AWS::Serverless::Function + Properties: + CodeUri: s3://sam-demo-bucket/hello.zip + Handler: hello.handler + Runtime: python3.9 + AutoPublishAlias: live + SnapStart: + ApplyOn: PublishedVersions diff --git a/tests/functional/commands/validate/lib/models/globals_for_function.yaml b/tests/functional/commands/validate/lib/models/globals_for_function.yaml index 8f5702ce45..e9adecd42c 100644 --- a/tests/functional/commands/validate/lib/models/globals_for_function.yaml +++ b/tests/functional/commands/validate/lib/models/globals_for_function.yaml @@ -26,6 +26,8 @@ Globals: ReservedConcurrentExecutions: 50 Architectures: - x86_64 + SnapStart: + ApplyOn: PublishedVersions EphemeralStorage: Size: 1024 @@ -54,4 +56,6 @@ Resources: PermissionsBoundary: arn:aws:1234:iam:boundary/OverridePermissionsBoundary Layers: - !Sub arn:${AWS::Partition}:lambda:${AWS::Region}:${AWS::AccountId}:layer:MyLayer2:2 + SnapStart: + ApplyOn: None ReservedConcurrentExecutions: 100