-
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 branch 'main' into release-v1.82.0
- Loading branch information
Showing
22 changed files
with
553 additions
and
9 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
22 changes: 22 additions & 0 deletions
22
.../expected/combination/function_with_msk_trigger_and_s3_onfailure_events_destinations.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,22 @@ | ||
[ | ||
{ | ||
"LogicalResourceId": "MyMskStreamProcessor", | ||
"ResourceType": "AWS::Lambda::Function" | ||
}, | ||
{ | ||
"LogicalResourceId": "MyLambdaExecutionRole", | ||
"ResourceType": "AWS::IAM::Role" | ||
}, | ||
{ | ||
"LogicalResourceId": "MyMskCluster", | ||
"ResourceType": "AWS::MSK::Cluster" | ||
}, | ||
{ | ||
"LogicalResourceId": "MyMskStreamProcessorMyMskEvent", | ||
"ResourceType": "AWS::Lambda::EventSourceMapping" | ||
}, | ||
{ | ||
"LogicalResourceId": "PreCreatedS3Bucket", | ||
"ResourceType": "AWS::S3::Bucket" | ||
} | ||
] |
80 changes: 80 additions & 0 deletions
80
...templates/combination/function_with_msk_trigger_and_s3_onfailure_events_destinations.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,80 @@ | ||
Parameters: | ||
PreCreatedSubnetOne: | ||
Type: String | ||
PreCreatedSubnetTwo: | ||
Type: String | ||
MskClusterName3: | ||
Type: String | ||
|
||
Resources: | ||
MyLambdaExecutionRole: | ||
Type: AWS::IAM::Role | ||
Properties: | ||
AssumeRolePolicyDocument: | ||
Version: '2012-10-17' | ||
Statement: | ||
- Action: [sts:AssumeRole] | ||
Effect: Allow | ||
Principal: | ||
Service: [lambda.amazonaws.com] | ||
Policies: | ||
- PolicyName: IntegrationTestExecution | ||
PolicyDocument: | ||
Statement: | ||
- Action: [kafka:DescribeCluster, kafka:GetBootstrapBrokers, ec2:CreateNetworkInterface, | ||
ec2:DescribeNetworkInterfaces, ec2:DescribeVpcs, ec2:DeleteNetworkInterface, | ||
ec2:DescribeSubnets, ec2:DescribeSecurityGroups, logs:CreateLogGroup, | ||
logs:CreateLogStream, logs:PutLogEvents] | ||
Effect: Allow | ||
Resource: '*' | ||
ManagedPolicyArns: [arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole] | ||
Tags: | ||
- {Value: SAM, Key: lambda:createdBy} | ||
|
||
MyMskCluster: | ||
Type: AWS::MSK::Cluster | ||
Properties: | ||
BrokerNodeGroupInfo: | ||
ClientSubnets: | ||
- Ref: PreCreatedSubnetOne | ||
- Ref: PreCreatedSubnetTwo | ||
InstanceType: kafka.t3.small | ||
StorageInfo: | ||
EBSStorageInfo: | ||
VolumeSize: 1 | ||
ClusterName: | ||
Ref: MskClusterName3 | ||
KafkaVersion: 2.4.1.1 | ||
NumberOfBrokerNodes: 2 | ||
|
||
MyMskStreamProcessor: | ||
Type: AWS::Serverless::Function | ||
Properties: | ||
Runtime: nodejs18.x | ||
Handler: index.handler | ||
CodeUri: ${codeuri} | ||
Role: | ||
Fn::GetAtt: [MyLambdaExecutionRole, Arn] | ||
Events: | ||
MyMskEvent: | ||
Type: MSK | ||
Properties: | ||
StartingPosition: LATEST | ||
Stream: | ||
Ref: MyMskCluster | ||
Topics: | ||
- MyDummyTestTopic | ||
DestinationConfig: | ||
OnFailure: | ||
Type: S3 | ||
Destination: | ||
Fn::GetAtt: | ||
- PreCreatedS3Bucket | ||
- Arn | ||
|
||
PreCreatedS3Bucket: | ||
Type: AWS::S3::Bucket | ||
DeletionPolicy: Delete | ||
|
||
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
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
20 changes: 20 additions & 0 deletions
20
tests/translator/input/function_with_msk_s3_onfailure_dest.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,20 @@ | ||
Resources: | ||
MyMskStreamProcessor: | ||
Type: AWS::Serverless::Function | ||
Properties: | ||
Runtime: nodejs12.x | ||
Handler: index.handler | ||
CodeUri: s3://sam-demo-bucket/kafka.zip | ||
Events: | ||
MyMskEvent: | ||
Type: MSK | ||
Properties: | ||
StartingPosition: LATEST | ||
Stream: !Sub arn:${AWS::Partition}:kafka:${AWS::Region}:012345678901:cluster/mycluster/6cc0432b-8618-4f44-bccc-e1fbd8fb7c4d-2 | ||
Topics: | ||
- MyDummyTestTopic | ||
ConsumerGroupId: consumergroup1 | ||
DestinationConfig: | ||
OnFailure: | ||
Type: S3 | ||
Destination: !Sub arn:${AWS::Partition}:s3:::my-s3-arn |
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
Oops, something went wrong.