-
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.91.0
- Loading branch information
Showing
13 changed files
with
140 additions
and
0 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
22 changes: 22 additions & 0 deletions
22
integration/resources/expected/single/basic_function_with_event_filtering_using_kms.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": "BasicFunctionWithEventFilteringUsingKmsKeyArn", | ||
"ResourceType": "AWS::Lambda::Function" | ||
}, | ||
{ | ||
"LogicalResourceId": "BasicFunctionWithEventFilteringUsingKmsKeyArnRole", | ||
"ResourceType": "AWS::IAM::Role" | ||
}, | ||
{ | ||
"LogicalResourceId": "MyKey", | ||
"ResourceType": "AWS::KMS::Key" | ||
}, | ||
{ | ||
"LogicalResourceId": "MySqsQueue", | ||
"ResourceType": "AWS::SQS::Queue" | ||
}, | ||
{ | ||
"LogicalResourceId": "BasicFunctionWithEventFilteringUsingKmsKeyArnMySqsEvent", | ||
"ResourceType": "AWS::Lambda::EventSourceMapping" | ||
} | ||
] |
45 changes: 45 additions & 0 deletions
45
integration/resources/templates/single/basic_function_with_event_filtering_using_kms.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,45 @@ | ||
Resources: | ||
BasicFunctionWithEventFilteringUsingKmsKeyArn: | ||
Type: AWS::Serverless::Function | ||
Properties: | ||
Handler: index.handler | ||
Runtime: nodejs18.x | ||
CodeUri: ${codeuri} | ||
MemorySize: 128 | ||
Events: | ||
MySqsEvent: | ||
Type: SQS | ||
Properties: | ||
Queue: !GetAtt MySqsQueue.Arn | ||
FilterCriteria: | ||
Filters: | ||
- Pattern: '{ "body" : { "RequestCode" : [ "BBBB" ] } }' | ||
KmsKeyArn: !GetAtt MyKey.Arn | ||
|
||
MyKey: | ||
Type: AWS::KMS::Key | ||
Properties: | ||
Description: A sample key | ||
KeyPolicy: | ||
Version: '2012-10-17' | ||
Id: key-default-1 | ||
Statement: | ||
- Sid: Allow administration of the key | ||
Effect: Allow | ||
Principal: | ||
AWS: !Sub arn:${AWS::Partition}:iam::${AWS::AccountId}:root | ||
Action: | ||
- kms:* | ||
Resource: '*' | ||
- Sid: Allow encryption/decryption access to Lambda Service Principal | ||
Effect: Allow | ||
Principal: | ||
Service: lambda.amazonaws.com | ||
Action: kms:Decrypt | ||
Resource: '*' | ||
|
||
MySqsQueue: | ||
Type: AWS::SQS::Queue | ||
|
||
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
Oops, something went wrong.