Commit Graph

20 Commits

Author SHA1 Message Date
Sachin Shekhar
782b693e71
🤖 Merge PR #48268 [aws-lambda] Add Amazon MSK event by @SachinShekhar 2020-09-28 04:50:57 -07:00
Johannes Würbach
89a11295bc
🤖 Merge PR #47284 [aws-lambda] add ses event by @johanneswuerbach 2020-09-05 07:26:05 -04:00
करतोफ्फेलस्क्रिप्ट™
55e2c9837e
🤖 Merge PR #46142 [aws-lambda] add individual event types for all cognito triggers by @netroy 2020-08-11 23:15:37 -04:00
Alexander Patton
c1375f8e7e
🤖 Merge PR #46656 Update sqs.d.ts in aws-lambda to include support for FIFO SQS event by @alexander-patton
* Update sqs.d.ts

Additional SQSRecordAttributes to support FIFO SQS queue, see Example Amazon SQS message event (FIFO queue) here: https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html

* added test for sqs fifo
2020-08-10 17:34:24 -04:00
Zach Anthony
fd848fb675
feat(aws-lambda): add the amazon connect contact flow trigger (#45820)
* Added support for Amazon Connect Contact Flow Trigger to AWS Lambda

* Updated formatting of files
2020-07-06 14:10:10 -07:00
Ivan Martos
413fe846ec
aws-lambda Added CodeBuild CloudWatch state event (#45490)
* added type and handler for CodeBuild Cloudwatch State event

* added type and handler for CodeBuild Cloudwatch event

* added test for codebuild cloudwatch event

* extended definitions block

* added SECRETS_MANAGER as environment variable type

* removed handlers

* removed unnecessary general codebuild types

* CodeBuildCloudWatchStateEvent extends EventBridgeEvent and added CodeBuildCloudWatchStateHandler

* added general type strArrayOrUndefined for tests

* added tests for CodeBuildCloudWatchStateHandler
2020-06-24 07:31:44 -04:00
Vittorio Guerriero
8b9c70c6ee
🤖 Merge PR #45336 feat(aws-lambda): add generic type to cloud watch scheduled event by @uittorio
* feat(aws-lambda): add generic type to cloud watch scheduled event

* feat(aws-lambda): ensure detail are correct
2020-06-10 02:23:31 -07:00
Dominic Scheirlinck
8de51b2d06
🤖 Merge PR #45379 fix(aws-lambda): approximateArrivalTimestamp should be number by @dominics 2020-06-09 21:06:06 -07:00
Sachin Shekhar
2b8d29e426
🤖 Merge PR #45263 Tweaks to API Gateway proxy v2 definitions by @SachinShekhar
* [aws-lambda] tweaks to APIGatewayProxyEventV2 interface

* [aws-lambda] tweaks to response type of API Gateway v2

* [aws-lambda] tweaks to APIGatewayProxyResultV2<T>
2020-06-03 15:18:34 -07:00
Sachin Shekhar
cedfab2b23
🤖 Merge PR #45205 [aws-lambda] Add support for payload format v2 of API Gateway proxy by @SachinShekhar
* [aws-lambda] Add support for payload format version 2.0 of API Gateway proxy event

* [aws-lambda] minor fix

* [aws-lambda] prettier fix

* [aws-lambda] minor fixes to test
2020-06-01 18:39:05 -07:00
apalumbo
d81ce06782
[aws-lambda] Added support for EventBridge triggers (#43546)
* [aws-lambda] Added support for EventBridge triggers

* Changed cloudwatch-events to use eventbridge types as AWS extended cloudwatch-events to create EventBridge

* Added multi type handler example to eventbrige test
2020-04-23 13:49:46 -04:00
daku10
c5e570e794
[aws-lambda] add userNotFound property (#43915) 2020-04-15 16:23:11 -07:00
daku10
b2a5c56a28
update aws-lambda type definition (#43881) 2020-04-14 20:32:14 -07:00
Nicolas Hodin
c72d502e2e
🤖 Merge PR #43696 Added requestId member on all CloudFrontEvent types by @nhodin
* Added requestId member on all CloudFrontEvent types

The requestId member is defined on all origin/viewer requests/responses, it is described here : https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-event-structure.html
There is one example for each request/response and they all have a cf.config.requestId.
Added new requests examples in tests in order to have all 4 types available

* Fix lint issue with consecutive empty lines

* Fix missing spaces
2020-04-08 11:00:36 -07:00
Bart Monhemius
b71c8267d3
[aws-lambda]: Fix definition of APIGatewayRequestAuthorizerEvent (#43539)
* [aws-lambda]: Fix APIGatewayRequestAuthorizerEvent definition

* [aws-lambda]: Update tests for updated APIGatewayRequestAuthorizerEvent definition
2020-04-01 09:41:34 -07:00
Simon Buchan
53c3baddff
[aws-lambda] New API Gateway Authorizer types, deprecating old… (#42420)
* [aws-lambda] Deprecate CustomAuthorizer*, new APIGateway*Authorizer*

Noticed this testing #42419.

When integrating a custom authorizer, you actually have two options,
creating a token or a request authorizer, which changes what payload
you will get. You nearly certainly know which you will be called with!

Just deprecating the old version as it's kinda broken in a way thats
hard to fix without breaking someone, but we want to guide devs to the
new version.

It is possible to fix the existing type by adding a bunch of
`foo?: never` fields to each alternative so existing accesses don't,
error but this makes things more complex, and confusing for the common
case.

Other ideas welcome!

* [aws-lambda] Add api-gateway authorizer parameters.

Fixes #34069, #42418

Ended up a bit messy, might be a bit much.

* [aws-lambda] Bump minimum typescript to 3.0

Required to fix failing $ExpectError in tests.
Surely nobody is still using pre-3.0?

* [aws-lambda] Enforcea API Gateway authorizer context narrowing

And implement the changes that API gateway does on the proxy request context for it.

Also rename TAuthorizer to TAuthorizerContext to be more clear that they should be the same type across both authorizer and proxy.

Some cleanups and fixes for names.
2020-03-02 09:50:45 -08:00
KozelAnatoliy
6208bf89ac
Enrich sqs event with x ray trace header (#42762) 2020-03-02 09:49:09 -08:00
Menno
d02a3f361d
fix: [@types/aws-lambda] add missing prop clientMetadata to Co… (#42707) 2020-02-28 10:45:25 -08:00
Simon Buchan
1833099f50
[aws-lambda] Add protocol to APIGatewayRequestContext. (#42419)
Fixes #42049.

No decent docs from AWS for the actual proxy integration, on the
Lambda side or the API Gateway side, but there's an approximation on
the API Gateway docs for the VTL $context variable:

https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html#context-variable-reference

From experimentation, not all of the variables referenced above exist,
at least most of the time, but everything except the `protocol` that
was present in what I received already existed.
2020-02-21 11:42:57 -08:00
Simon Buchan
186ed7ba26
[aws-lambda] Some docs, split up types and tests (#42080)
* [aws-lambda] Some docs, split up index.d.ts into multiple files.

Documents handler type and conventions for adding triggers more
explicitly. The same index.d.ts docs should explain the thinking for the
new layout convention.

No changes to the type tests in this first commit, to show that the tests
still passs, and because I think they deserve more attention (and I need
lunch right now).

Most event structures have little to no changes other than re-ordering or removing
inaccurately copy/pasted comments in a case or two.

Loses history, but github doesn't support rename history anyway, and
it's even more ugly to get git to track file splits even for local
usage. Apologies for the huge diff.

* [aws-lambda] Split tests to per-service files, add contributor README.md

Updates most of the files to a consistent style.
2020-02-14 09:18:39 -08:00