-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: bump SamTranslator version (#4672)
* chore: Bump SamTranslator version to 1.59.0 * remove old runtimes --------- Co-authored-by: Jacob Fuss <[email protected]> Co-authored-by: Mehmet Nuri Deveci <[email protected]>
- Loading branch information
1 parent
4de254c
commit 6caefc9
Showing
14 changed files
with
664 additions
and
5 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
83 changes: 83 additions & 0 deletions
83
tests/functional/commands/validate/lib/models/embedded_connectors_api_to_function.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,83 @@ | ||
Resources: | ||
MyHttpApi: | ||
Type: AWS::Serverless::HttpApi | ||
Connectors: | ||
MyConnectorServerlessHttpApiToLambda: | ||
Properties: | ||
Destination: | ||
Id: MyFunction | ||
Permissions: | ||
- Write | ||
MyConnectorApigwToLambda: | ||
Properties: | ||
Destination: | ||
Id: MyServerlessFunction | ||
Permissions: | ||
- Write | ||
Properties: | ||
StageName: Prod | ||
|
||
MyApiGateway: | ||
Type: AWS::ApiGateway::RestApi | ||
Properties: | ||
Description: A test API | ||
Name: MyRestAPI | ||
|
||
MyApiGatewayRootMethod: | ||
Type: AWS::ApiGateway::Method | ||
Properties: | ||
AuthorizationType: NONE | ||
HttpMethod: POST | ||
Integration: | ||
Type: MOCK | ||
ResourceId: !GetAtt MyApiGateway.RootResourceId | ||
RestApiId: !Ref MyApiGateway | ||
|
||
MyApiGatewayV2: | ||
Type: AWS::ApiGatewayV2::Api | ||
Connectors: | ||
MyConnectorApiV2ToLambda: | ||
Properties: | ||
Destination: | ||
Id: MyServerlessFunction | ||
Permissions: | ||
- Write | ||
Properties: | ||
Name: MyApi | ||
ProtocolType: WEBSOCKET | ||
|
||
MyServerlessFunction: | ||
Type: AWS::Serverless::Function | ||
Properties: | ||
Runtime: nodejs14.x | ||
Handler: index.handler | ||
InlineCode: | | ||
const AWS = require('aws-sdk'); | ||
exports.handler = async (event) => { | ||
console.log(JSON.stringify(event)); | ||
}; | ||
MyRole: | ||
Type: AWS::IAM::Role | ||
Properties: | ||
AssumeRolePolicyDocument: | ||
Statement: | ||
- Effect: Allow | ||
Action: sts:AssumeRole | ||
Principal: | ||
Service: lambda.amazonaws.com | ||
ManagedPolicyArns: | ||
- !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole | ||
|
||
MyFunction: | ||
Type: AWS::Lambda::Function | ||
Properties: | ||
Role: !GetAtt MyRole.Arn | ||
Runtime: nodejs14.x | ||
Handler: index.handler | ||
Code: | ||
ZipFile: |- | ||
const AWS = require('aws-sdk'); | ||
exports.handler = async (event) => { | ||
console.log(JSON.stringify(event)); | ||
}; |
28 changes: 28 additions & 0 deletions
28
tests/functional/commands/validate/lib/models/embedded_connectors_depends_on_connector.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,28 @@ | ||
Resources: | ||
MyFunction: | ||
Type: AWS::Serverless::Function | ||
Properties: | ||
Runtime: nodejs16.x | ||
Handler: index.handler | ||
InlineCode: | | ||
exports.handler = async (event) => { | ||
console.log(event); | ||
}; | ||
MyQueue: | ||
Type: AWS::SQS::Queue | ||
Connectors: | ||
MyConnector: | ||
Properties: | ||
Destination: | ||
Id: MyFunction | ||
Permissions: | ||
- Read | ||
- Write | ||
|
||
MyEventSourceMapping: | ||
DependsOn: MyQueueMyConnector | ||
Type: AWS::Lambda::EventSourceMapping | ||
Properties: | ||
FunctionName: !Ref MyFunction | ||
EventSourceArn: !GetAtt MyQueue.Arn |
28 changes: 28 additions & 0 deletions
28
tests/functional/commands/validate/lib/models/embedded_connectors_esm_depends_on.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,28 @@ | ||
Resources: | ||
MyFunction: | ||
Type: AWS::Serverless::Function | ||
Properties: | ||
Runtime: nodejs16.x | ||
Handler: index.handler | ||
InlineCode: | | ||
exports.handler = async (event) => { | ||
console.log(event); | ||
}; | ||
MyQueue: | ||
Type: AWS::SQS::Queue | ||
Connectors: | ||
MyConnector: | ||
Properties: | ||
Destination: | ||
Id: MyFunction | ||
Permissions: | ||
- Read | ||
- Write | ||
|
||
MyEventSourceMapping: | ||
DependsOn: MyQueueMyConnectorPolicy | ||
Type: AWS::Lambda::EventSourceMapping | ||
Properties: | ||
FunctionName: !Ref MyFunction | ||
EventSourceArn: !GetAtt MyQueue.Arn |
124 changes: 124 additions & 0 deletions
124
tests/functional/commands/validate/lib/models/embedded_connectors_function_to.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,124 @@ | ||
Resources: | ||
MyServerlessFunction: | ||
Type: AWS::Serverless::Function | ||
Connectors: | ||
BucketConnector: | ||
Properties: | ||
Destination: | ||
Id: MyBucket | ||
Permissions: | ||
- Read | ||
- Write | ||
SQSConnector: | ||
Properties: | ||
Destination: | ||
Id: MyQueue | ||
Permissions: | ||
- Read | ||
- Write | ||
TableConnector: | ||
Properties: | ||
Destination: | ||
Id: MyTable | ||
Permissions: | ||
- Read | ||
- Write | ||
TableConnectorWithTableArn: | ||
Properties: | ||
Destination: | ||
Type: AWS::DynamoDB::Table | ||
Arn: !GetAtt MyTable.Arn | ||
Permissions: | ||
- Read | ||
- Write | ||
SNSConnector: | ||
Properties: | ||
Destination: | ||
Id: MySNSTopic | ||
Permissions: | ||
- Write | ||
SFNConnector: | ||
Properties: | ||
Destination: | ||
Id: MyStateMachine | ||
Permissions: | ||
- Read | ||
- Write | ||
Properties: | ||
Runtime: nodejs14.x | ||
Handler: index.handler | ||
InlineCode: | | ||
const AWS = require('aws-sdk'); | ||
exports.handler = async (event) => { | ||
console.log(JSON.stringify(event)); | ||
}; | ||
MyLambdaFunction: | ||
Type: AWS::Lambda::Function | ||
Connectors: | ||
LambdaSQSConnector: | ||
Properties: | ||
Destination: | ||
Id: MyQueue | ||
Permissions: | ||
- Read | ||
LambdaTableConnector: | ||
Properties: | ||
Destination: | ||
Id: MyTable | ||
Permissions: | ||
- Read | ||
- Write | ||
LambdaTableConnectorWithTableArn: | ||
Properties: | ||
Destination: | ||
Type: AWS::DynamoDB::Table | ||
Arn: !GetAtt MyTable.Arn | ||
Permissions: | ||
- Read | ||
- Write | ||
Properties: | ||
Role: !GetAtt MyRole.Arn | ||
Runtime: nodejs14.x | ||
Handler: index.handler | ||
Code: | ||
ZipFile: | | ||
const AWS = require('aws-sdk'); | ||
exports.handler = async (event) => { | ||
console.log(JSON.stringify(event)); | ||
}; | ||
Environment: | ||
Variables: | ||
TABLE_NAME: !Ref MyTable | ||
|
||
MyRole: | ||
Type: AWS::IAM::Role | ||
Properties: | ||
AssumeRolePolicyDocument: | ||
Statement: | ||
- Effect: Allow | ||
Action: sts:AssumeRole | ||
Principal: | ||
Service: lambda.amazonaws.com | ||
|
||
MyBucket: | ||
Type: AWS::S3::Bucket | ||
MyQueue: | ||
Type: AWS::SQS::Queue | ||
MySNSTopic: | ||
Type: AWS::SNS::Topic | ||
MyStateMachine: | ||
Type: AWS::Serverless::StateMachine | ||
Properties: | ||
Definition: | ||
StartAt: MyLambdaState | ||
MyTable: | ||
Type: AWS::DynamoDB::Table | ||
Properties: | ||
BillingMode: PAY_PER_REQUEST | ||
AttributeDefinitions: | ||
- AttributeName: Id | ||
AttributeType: S | ||
KeySchema: | ||
- AttributeName: Id | ||
KeyType: HASH |
67 changes: 67 additions & 0 deletions
67
tests/functional/commands/validate/lib/models/embedded_connectors_hardcoded_props.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,67 @@ | ||
Transform: AWS::Serverless-2016-10-31 | ||
Resources: | ||
MyFunction: | ||
Type: AWS::Lambda::Function | ||
|
||
MyRule: | ||
Type: AWS::Events::Rule | ||
Connectors: | ||
RuleToTopic: | ||
Properties: | ||
Destination: | ||
Type: AWS::SNS::Topic | ||
Arn: !Ref MyTopic | ||
Permissions: | ||
- Write | ||
|
||
MyQueue: | ||
Type: AWS::SQS::Queue | ||
MyQueue2: | ||
Type: AWS::SQS::Queue | ||
|
||
MyTopic: | ||
Type: AWS::SNS::Topic | ||
Connectors: | ||
TopicToQueue: | ||
Properties: | ||
Destination: | ||
Type: AWS::SQS::Queue | ||
Arn: !Ref MyQueue | ||
QueueUrl: sqs.us.amazonaws.com/1234567890/test | ||
Permissions: | ||
- Write | ||
|
||
MyApiV1: | ||
Type: AWS::ApiGateway::RestApi | ||
Connectors: | ||
ApiV1ToLambda: | ||
Properties: | ||
SourceReference: | ||
Qualifier: Prod/GET/foobar | ||
Destination: | ||
Id: MyFunction | ||
Permissions: | ||
- Write | ||
|
||
MyApiV2: | ||
Type: AWS::ApiGatewayV2::Api | ||
Connectors: | ||
ApiV2ToLambda: | ||
Properties: | ||
SourceReference: | ||
Qualifier: '*' | ||
Destination: | ||
Id: MyFunction | ||
Permissions: | ||
- Write | ||
|
||
MySNSTopic: | ||
Type: AWS::SNS::Topic | ||
Connectors: | ||
TopicToLambdaHardcoded: | ||
Properties: | ||
Destination: | ||
Type: AWS::Lambda::Function | ||
Arn: !GetAtt MyFunction.Arn | ||
Permissions: | ||
- Write |
Oops, something went wrong.