-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3346 from aws/release-v1.75.0
Release 1.75.0 (to main)
- Loading branch information
Showing
102 changed files
with
15,917 additions
and
2,097 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
integration/combination/test_function_with_implicit_api_with_timeout.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
from unittest.case import skipIf | ||
|
||
from integration.config.service_names import REST_API | ||
from integration.helpers.base_test import BaseTest | ||
from integration.helpers.resource import current_region_does_not_support | ||
|
||
|
||
@skipIf(current_region_does_not_support([REST_API]), "REST API is not supported in this testing region") | ||
class TestFunctionWithImplicitApiWithTimeout(BaseTest): | ||
def test_function_with_implicit_api_with_timeout(self): | ||
self.create_and_verify_stack("combination/function_with_implicit_api_with_timeout") | ||
|
||
# verify that TimeoutInMillis is set to expected value in the integration | ||
expected_timeout = 5000 | ||
apigw_client = self.client_provider.api_client | ||
rest_api_id = self.get_physical_id_by_type("AWS::ApiGateway::RestApi") | ||
resources = apigw_client.get_resources(restApiId=rest_api_id)["items"] | ||
|
||
resource = get_resource_by_path(resources, "/hello") | ||
method = apigw_client.get_method(restApiId=rest_api_id, resourceId=resource["id"], httpMethod="GET") | ||
method_integration = method["methodIntegration"] | ||
self.assertEqual(method_integration["timeoutInMillis"], expected_timeout) | ||
|
||
|
||
def get_resource_by_path(resources, path): | ||
for resource in resources: | ||
if resource["path"] == path: | ||
return resource | ||
return None |
11 changes: 11 additions & 0 deletions
11
integration/combination/test_function_with_intrinsics_resource_attributes.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from integration.helpers.base_test import BaseTest | ||
|
||
|
||
class TestFunctionWithIntrinsicsResourceAttributes(BaseTest): | ||
def test_function_with_intrinsics_resource_attributes(self): | ||
# simply verify the stack is deployed successfully is enough | ||
self.create_and_verify_stack("combination/function_with_intrinsics_resource_attribute") | ||
|
||
stack_outputs = self.get_stack_outputs() | ||
id_dev_stack = stack_outputs["IsDevStack"] | ||
self.assertEqual(id_dev_stack, "true") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
integration/resources/expected/combination/function_with_implicit_api_with_timeout.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[ | ||
{ | ||
"LogicalResourceId": "MyLambdaFunctionApiEventPermissionProd", | ||
"ResourceType": "AWS::Lambda::Permission" | ||
}, | ||
{ | ||
"LogicalResourceId": "MyLambdaFunctionRole", | ||
"ResourceType": "AWS::IAM::Role" | ||
}, | ||
{ | ||
"LogicalResourceId": "MyLambdaFunction", | ||
"ResourceType": "AWS::Lambda::Function" | ||
}, | ||
{ | ||
"LogicalResourceId": "ServerlessRestApiDeployment", | ||
"ResourceType": "AWS::ApiGateway::Deployment" | ||
}, | ||
{ | ||
"LogicalResourceId": "ServerlessRestApiProdStage", | ||
"ResourceType": "AWS::ApiGateway::Stage" | ||
}, | ||
{ | ||
"LogicalResourceId": "ServerlessRestApi", | ||
"ResourceType": "AWS::ApiGateway::RestApi" | ||
} | ||
] |
10 changes: 10 additions & 0 deletions
10
integration/resources/expected/combination/function_with_intrinsics_resource_attribute.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[ | ||
{ | ||
"LogicalResourceId": "MyLambdaFunction", | ||
"ResourceType": "AWS::Lambda::Function" | ||
}, | ||
{ | ||
"LogicalResourceId": "MyLambdaFunctionRole", | ||
"ResourceType": "AWS::IAM::Role" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
integration/resources/templates/combination/function_with_implicit_api_with_timeout.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
AWSTemplateFormatVersion: '2010-09-09' | ||
Description: A template to test timeout support for implicit APIs. | ||
|
||
Resources: | ||
MyLambdaFunction: | ||
Type: AWS::Serverless::Function | ||
Properties: | ||
Handler: index.handler | ||
Runtime: nodejs16.x | ||
MemorySize: 128 | ||
Timeout: 3 | ||
InlineCode: | | ||
exports.handler = async () => ‘Hello World!' | ||
Events: | ||
ApiEvent: | ||
Type: Api | ||
Properties: | ||
Path: /hello | ||
Method: get | ||
TimeoutInMillis: 5000 | ||
|
||
Metadata: | ||
SamTransformTest: true |
27 changes: 27 additions & 0 deletions
27
integration/resources/templates/combination/function_with_intrinsics_resource_attribute.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
AWSTemplateFormatVersion: '2010-09-09' | ||
Description: A template to test timeout support for implicit APIs. | ||
|
||
Parameters: | ||
IsDevStack: {Type: String, Default: 'true', AllowedValues: ['true', 'false']} | ||
Conditions: | ||
IsDevStack: !Equals [!Ref IsDevStack, 'true'] | ||
NotIsDevStack: !Not [Condition: IsDevStack] | ||
|
||
Resources: | ||
MyLambdaFunction: | ||
DeletionPolicy: !If [NotIsDevStack, Retain, Delete] | ||
Type: AWS::Serverless::Function | ||
Properties: | ||
Handler: index.handler | ||
Runtime: nodejs16.x | ||
MemorySize: 128 | ||
Timeout: 3 | ||
InlineCode: | | ||
exports.handler = async () => 'Hello World!' | ||
Outputs: | ||
IsDevStack: | ||
Value: !Ref IsDevStack | ||
|
||
Metadata: | ||
SamTransformTest: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "1.74.0" | ||
__version__ = "1.75.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
try: | ||
from pydantic import v1 as pydantic | ||
except ImportError: | ||
# Unfortunately mypy cannot handle this try/expect pattern, and "type: ignore" | ||
# is the simplest work-around. See: https://github.com/python/mypy/issues/1153 | ||
import pydantic # type: ignore | ||
|
||
__all__ = ["pydantic"] |
Oops, something went wrong.