-
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 #3689 from aws/tmp/1732213576/main
Merge main to develop
- Loading branch information
Showing
17 changed files
with
1,618 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "1.92.0" | ||
__version__ = "1.93.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
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
77 changes: 77 additions & 0 deletions
77
tests/translator/input/function_with_event_dest_s3_bucket.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,77 @@ | ||
Parameters: | ||
S3BucketArn1: | ||
Type: String | ||
Default: arn:aws:s3::123456789012:my_bucket-1 | ||
S3BucketArn2: | ||
Type: String | ||
Default: arn:aws:s3::123456789012:my_bucket-2 | ||
Globals: | ||
Function: | ||
AutoPublishAlias: live | ||
EventInvokeConfig: | ||
MaximumEventAgeInSeconds: 70 | ||
MaximumRetryAttempts: 1 | ||
DestinationConfig: | ||
OnSuccess: | ||
Type: S3Bucket | ||
Destination: !Ref S3BucketArn1 | ||
OnFailure: | ||
Type: S3Bucket | ||
Destination: !Ref S3BucketArn2 | ||
|
||
Resources: | ||
MyTestFunction: | ||
Type: AWS::Serverless::Function | ||
Properties: | ||
InlineCode: | | ||
exports.handler = function(event, context, callback) { | ||
var event_received_at = new Date().toISOString(); | ||
console.log('Event received at: ' + event_received_at); | ||
console.log('Received event:', JSON.stringify(event, null, 2)); | ||
if (event.Success) { | ||
console.log("Success"); | ||
context.callbackWaitsForEmptyEventLoop = false; | ||
callback(null); | ||
} else { | ||
console.log("Failure"); | ||
context.callbackWaitsForEmptyEventLoop = false; | ||
callback(new Error("Failure from event, Success = false, I am failing!"), 'Destination Function Error Thrown'); | ||
} | ||
}; | ||
Handler: index.handler | ||
Runtime: nodejs12.x | ||
MemorySize: 1024 | ||
|
||
MyTestFunction2: | ||
Type: AWS::Serverless::Function | ||
Properties: | ||
EventInvokeConfig: | ||
MaximumEventAgeInSeconds: 70 | ||
MaximumRetryAttempts: 1 | ||
DestinationConfig: | ||
OnSuccess: | ||
Type: S3Bucket | ||
Destination: arn:aws:s3::123456789012:my_bucket-3 | ||
OnFailure: | ||
Type: S3Bucket | ||
Destination: arn:aws:s3::123456789012:my_bucket-4 | ||
InlineCode: | | ||
exports.handler = function(event, context, callback) { | ||
var event_received_at = new Date().toISOString(); | ||
console.log('Event received at: ' + event_received_at); | ||
console.log('Received event:', JSON.stringify(event, null, 2)); | ||
if (event.Success) { | ||
console.log("Success"); | ||
context.callbackWaitsForEmptyEventLoop = false; | ||
callback(null); | ||
} else { | ||
console.log("Failure"); | ||
context.callbackWaitsForEmptyEventLoop = false; | ||
callback(new Error("Failure from event, Success = false, I am failing!"), 'Destination Function Error Thrown'); | ||
} | ||
}; | ||
Handler: index.handler | ||
Runtime: nodejs12.x | ||
MemorySize: 1024 |
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,58 @@ | ||
Resources: | ||
FilteredEventsFunction: | ||
Type: AWS::Serverless::Function | ||
Properties: | ||
CodeUri: s3://sam-demo-bucket/metricsConfig.zip | ||
Handler: index.handler | ||
Runtime: nodejs16.x | ||
Events: | ||
KinesisStream: | ||
Type: Kinesis | ||
Properties: | ||
Stream: !GetAtt KinesisStream.Arn | ||
StartingPosition: LATEST | ||
MetricsConfig: | ||
Metrics: | ||
- EventCount | ||
FilterCriteria: | ||
Filters: | ||
- Pattern: '{"name": "value"}' | ||
- Pattern: '{"name2": "value2"}' | ||
DynamoDBStreamEvent: | ||
Type: DynamoDB | ||
Properties: | ||
Stream: !GetAtt DynamoDBTable.StreamArn | ||
StartingPosition: TRIM_HORIZON | ||
MetricsConfig: | ||
Metrics: [] | ||
FilterCriteria: | ||
Filters: [] | ||
MySqsQueue: | ||
Type: SQS | ||
Properties: | ||
Queue: !GetAtt MySqsQueue.Arn | ||
MetricsConfig: | ||
Metrics: | ||
- EventCount | ||
FilterCriteria: | ||
Filters: | ||
- Pattern: '{"name": "value"}' | ||
|
||
KinesisStream: | ||
Type: AWS::Kinesis::Stream | ||
Properties: | ||
ShardCount: 1 | ||
|
||
DynamoDBTable: | ||
Type: AWS::DynamoDB::Table | ||
Properties: | ||
AttributeDefinitions: | ||
- AttributeName: id | ||
AttributeType: S | ||
BillingMode: PAY_PER_REQUEST | ||
KeySchema: | ||
- AttributeName: id | ||
KeyType: HASH | ||
|
||
MySqsQueue: | ||
Type: AWS::SQS::Queue |
Oops, something went wrong.