-
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 #1625 from awslabs/release-1-25-0
Release Changes for 1.25.0
- Loading branch information
Showing
11 changed files
with
452 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "1.24.0" | ||
__version__ = "1.25.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
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
53 changes: 53 additions & 0 deletions
53
tests/translator/input/function_with_file_system_config.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,53 @@ | ||
Description: SAM + Lambda + EFS | ||
|
||
Parameters: | ||
ExistingEfsFileSystem: | ||
Type: String | ||
|
||
SecurityGroupIds: | ||
Type: List<AWS::EC2::SecurityGroup::Id> | ||
Description: Security Group IDs that Lambda will use | ||
|
||
VpcSubnetIds: | ||
Type: List<AWS::EC2::Subnet::Id> | ||
Description: VPC Subnet IDs that Lambda will use | ||
|
||
Resources: | ||
EfsFileSystem: | ||
Type: AWS::EFS::FileSystem | ||
|
||
MountTarget: | ||
Type: AWS::EFS::MountTarget | ||
Properties: | ||
FileSystemId: !Ref EfsFileSystem | ||
SubnetId: subnet-abc123 | ||
SecurityGroups: !Ref SecurityGroupIds | ||
|
||
AccessPoint: | ||
Type: AWS::EFS::AccessPoint | ||
Properties: | ||
FileSystemId: !Ref EfsFileSystem | ||
|
||
LambdaFunctionWithEfs: | ||
Type: AWS::Serverless::Function | ||
Properties: | ||
InlineCode: | | ||
const fs = require('fs') | ||
const path = require('path') | ||
const efsMountPath = '/mnt/efs' | ||
exports.handler = async (event, context, callback) => { | ||
const directory = path.join(efsMountPath, event.body) | ||
const files = fs.readdirSync(directory) | ||
return files | ||
} | ||
Handler: index.handler | ||
MemorySize: 128 | ||
Runtime: nodejs12.x | ||
Timeout: 3 | ||
VpcConfig: | ||
SecurityGroupIds: !Ref SecurityGroupIds | ||
SubnetIds: !Ref VpcSubnetIds | ||
FileSystemConfigs: | ||
- Arn: !GetAtt AccessPoint.Arn | ||
LocalMountPath: /mnt/EFS |
115 changes: 115 additions & 0 deletions
115
tests/translator/output/aws-cn/function_with_file_system_config.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,115 @@ | ||
{ | ||
"Resources": { | ||
"EfsFileSystem": { | ||
"Type": "AWS::EFS::FileSystem" | ||
}, | ||
"LambdaFunctionWithEfs": { | ||
"Type": "AWS::Lambda::Function", | ||
"Properties": { | ||
"Code": { | ||
"ZipFile": "const fs = require('fs')\nconst path = require('path')\nconst efsMountPath = '/mnt/efs'\n\nexports.handler = async (event, context, callback) => {\nconst directory = path.join(efsMountPath, event.body)\nconst files = fs.readdirSync(directory)\nreturn files\n}\n" | ||
}, | ||
"VpcConfig": { | ||
"SubnetIds": { | ||
"Ref": "VpcSubnetIds" | ||
}, | ||
"SecurityGroupIds": { | ||
"Ref": "SecurityGroupIds" | ||
} | ||
}, | ||
"Tags": [ | ||
{ | ||
"Value": "SAM", | ||
"Key": "lambda:createdBy" | ||
} | ||
], | ||
"MemorySize": 128, | ||
"Handler": "index.handler", | ||
"Role": { | ||
"Fn::GetAtt": [ | ||
"LambdaFunctionWithEfsRole", | ||
"Arn" | ||
] | ||
}, | ||
"Timeout": 3, | ||
"FileSystemConfigs": [ | ||
{ | ||
"Arn": { | ||
"Fn::GetAtt": [ | ||
"AccessPoint", | ||
"Arn" | ||
] | ||
}, | ||
"LocalMountPath": "/mnt/EFS" | ||
} | ||
], | ||
"Runtime": "nodejs12.x" | ||
} | ||
}, | ||
"MountTarget": { | ||
"Type": "AWS::EFS::MountTarget", | ||
"Properties": { | ||
"SubnetId": "subnet-abc123", | ||
"FileSystemId": { | ||
"Ref": "EfsFileSystem" | ||
}, | ||
"SecurityGroups": { | ||
"Ref": "SecurityGroupIds" | ||
} | ||
} | ||
}, | ||
"LambdaFunctionWithEfsRole": { | ||
"Type": "AWS::IAM::Role", | ||
"Properties": { | ||
"AssumeRolePolicyDocument": { | ||
"Version": "2012-10-17", | ||
"Statement": [ | ||
{ | ||
"Action": [ | ||
"sts:AssumeRole" | ||
], | ||
"Effect": "Allow", | ||
"Principal": { | ||
"Service": [ | ||
"lambda.amazonaws.com" | ||
] | ||
} | ||
} | ||
] | ||
}, | ||
"ManagedPolicyArns": [ | ||
"arn:aws-cn:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", | ||
"arn:aws-cn:iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole" | ||
], | ||
"Tags": [ | ||
{ | ||
"Value": "SAM", | ||
"Key": "lambda:createdBy" | ||
} | ||
] | ||
} | ||
}, | ||
"AccessPoint": { | ||
"Type": "AWS::EFS::AccessPoint", | ||
"Properties": { | ||
"FileSystemId": { | ||
"Ref": "EfsFileSystem" | ||
} | ||
} | ||
} | ||
}, | ||
"Description": "SAM + Lambda + EFS", | ||
"Parameters": { | ||
"ExistingEfsFileSystem": { | ||
"Type": "String" | ||
}, | ||
"VpcSubnetIds": { | ||
"Type": "List<AWS::EC2::Subnet::Id>", | ||
"Description": "VPC Subnet IDs that Lambda will use" | ||
}, | ||
"SecurityGroupIds": { | ||
"Type": "List<AWS::EC2::SecurityGroup::Id>", | ||
"Description": "Security Group IDs that Lambda will use" | ||
} | ||
} | ||
} |
115 changes: 115 additions & 0 deletions
115
tests/translator/output/aws-us-gov/function_with_file_system_config.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,115 @@ | ||
{ | ||
"Resources": { | ||
"EfsFileSystem": { | ||
"Type": "AWS::EFS::FileSystem" | ||
}, | ||
"LambdaFunctionWithEfs": { | ||
"Type": "AWS::Lambda::Function", | ||
"Properties": { | ||
"Code": { | ||
"ZipFile": "const fs = require('fs')\nconst path = require('path')\nconst efsMountPath = '/mnt/efs'\n\nexports.handler = async (event, context, callback) => {\nconst directory = path.join(efsMountPath, event.body)\nconst files = fs.readdirSync(directory)\nreturn files\n}\n" | ||
}, | ||
"VpcConfig": { | ||
"SubnetIds": { | ||
"Ref": "VpcSubnetIds" | ||
}, | ||
"SecurityGroupIds": { | ||
"Ref": "SecurityGroupIds" | ||
} | ||
}, | ||
"Tags": [ | ||
{ | ||
"Value": "SAM", | ||
"Key": "lambda:createdBy" | ||
} | ||
], | ||
"MemorySize": 128, | ||
"Handler": "index.handler", | ||
"Role": { | ||
"Fn::GetAtt": [ | ||
"LambdaFunctionWithEfsRole", | ||
"Arn" | ||
] | ||
}, | ||
"Timeout": 3, | ||
"FileSystemConfigs": [ | ||
{ | ||
"Arn": { | ||
"Fn::GetAtt": [ | ||
"AccessPoint", | ||
"Arn" | ||
] | ||
}, | ||
"LocalMountPath": "/mnt/EFS" | ||
} | ||
], | ||
"Runtime": "nodejs12.x" | ||
} | ||
}, | ||
"MountTarget": { | ||
"Type": "AWS::EFS::MountTarget", | ||
"Properties": { | ||
"SubnetId": "subnet-abc123", | ||
"FileSystemId": { | ||
"Ref": "EfsFileSystem" | ||
}, | ||
"SecurityGroups": { | ||
"Ref": "SecurityGroupIds" | ||
} | ||
} | ||
}, | ||
"LambdaFunctionWithEfsRole": { | ||
"Type": "AWS::IAM::Role", | ||
"Properties": { | ||
"AssumeRolePolicyDocument": { | ||
"Version": "2012-10-17", | ||
"Statement": [ | ||
{ | ||
"Action": [ | ||
"sts:AssumeRole" | ||
], | ||
"Effect": "Allow", | ||
"Principal": { | ||
"Service": [ | ||
"lambda.amazonaws.com" | ||
] | ||
} | ||
} | ||
] | ||
}, | ||
"ManagedPolicyArns": [ | ||
"arn:aws-us-gov:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", | ||
"arn:aws-us-gov:iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole" | ||
], | ||
"Tags": [ | ||
{ | ||
"Value": "SAM", | ||
"Key": "lambda:createdBy" | ||
} | ||
] | ||
} | ||
}, | ||
"AccessPoint": { | ||
"Type": "AWS::EFS::AccessPoint", | ||
"Properties": { | ||
"FileSystemId": { | ||
"Ref": "EfsFileSystem" | ||
} | ||
} | ||
} | ||
}, | ||
"Description": "SAM + Lambda + EFS", | ||
"Parameters": { | ||
"ExistingEfsFileSystem": { | ||
"Type": "String" | ||
}, | ||
"VpcSubnetIds": { | ||
"Type": "List<AWS::EC2::Subnet::Id>", | ||
"Description": "VPC Subnet IDs that Lambda will use" | ||
}, | ||
"SecurityGroupIds": { | ||
"Type": "List<AWS::EC2::SecurityGroup::Id>", | ||
"Description": "Security Group IDs that Lambda will use" | ||
} | ||
} | ||
} |
4 changes: 2 additions & 2 deletions
4
tests/translator/output/error_globals_unsupported_property.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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
{ | ||
"errors": [ | ||
{ | ||
"errorMessage": "'Globals' section is invalid. 'SomeKey' is not a supported property of 'Function'. Must be one of the following values - ['Handler', 'Runtime', 'CodeUri', 'DeadLetterQueue', 'Description', 'MemorySize', 'Timeout', 'VpcConfig', 'Environment', 'Tags', 'Tracing', 'KmsKeyArn', 'AutoPublishAlias', 'Layers', 'DeploymentPreference', 'PermissionsBoundary', 'ReservedConcurrentExecutions', 'ProvisionedConcurrencyConfig', 'EventInvokeConfig']" | ||
"errorMessage": "'Globals' section is invalid. 'SomeKey' is not a supported property of 'Function'. Must be one of the following values - ['Handler', 'Runtime', 'CodeUri', 'DeadLetterQueue', 'Description', 'MemorySize', 'Timeout', 'VpcConfig', 'Environment', 'Tags', 'Tracing', 'KmsKeyArn', 'AutoPublishAlias', 'Layers', 'DeploymentPreference', 'PermissionsBoundary', 'ReservedConcurrentExecutions', 'ProvisionedConcurrencyConfig', 'EventInvokeConfig', 'FileSystemConfigs']" | ||
} | ||
], | ||
"errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. 'Globals' section is invalid. 'SomeKey' is not a supported property of 'Function'. Must be one of the following values - ['Handler', 'Runtime', 'CodeUri', 'DeadLetterQueue', 'Description', 'MemorySize', 'Timeout', 'VpcConfig', 'Environment', 'Tags', 'Tracing', 'KmsKeyArn', 'AutoPublishAlias', 'Layers', 'DeploymentPreference', 'PermissionsBoundary', 'ReservedConcurrentExecutions', 'ProvisionedConcurrencyConfig', 'AssumeRolePolicyDocument', 'EventInvokeConfig']" | ||
"errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. 'Globals' section is invalid. 'SomeKey' is not a supported property of 'Function'. Must be one of the following values - ['Handler', 'Runtime', 'CodeUri', 'DeadLetterQueue', 'Description', 'MemorySize', 'Timeout', 'VpcConfig', 'Environment', 'Tags', 'Tracing', 'KmsKeyArn', 'AutoPublishAlias', 'Layers', 'DeploymentPreference', 'PermissionsBoundary', 'ReservedConcurrentExecutions', 'ProvisionedConcurrencyConfig', 'AssumeRolePolicyDocument', 'EventInvokeConfig', 'FileSystemConfigs']" | ||
} |
Oops, something went wrong.