Skip to content

Commit d3eb3ea

Browse files
committed
dynamodb works
Signed-off-by: matto <muhamadto@gmail.com>
1 parent b2e3126 commit d3eb3ea

File tree

2 files changed

+15
-20
lines changed

2 files changed

+15
-20
lines changed

README.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -467,14 +467,7 @@ POST
467467
GET
468468

469469
```shell
470-
curl --location --request POST 'http://localhost:8080' \
471-
--header 'Content-Type: application/json' \
472-
--data-raw '{
473-
"httpMethod": "GET",
474-
"pathParameters": {
475-
"proxy": "production-1234-someapp"
476-
}
477-
}'
470+
curl --request GET 'https://lmk0qo0xrl.execute-api.ap-southeast-2.amazonaws.com/dev/production-1234-someapp'
478471
```
479472
3. Et voila! It runs with 500 ms for cold start.
480473

spring-native-aws-service/src/main/java/com/coffeebeans/springnativeawslambda/ReflectionRuntimeHints.java

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
package com.coffeebeans.springnativeawslambda;
2020

21-
import java.util.List;
2221
import com.amazonaws.services.lambda.runtime.events.APIGatewayProxyRequestEvent;
2322
import com.amazonaws.services.lambda.runtime.events.APIGatewayProxyResponseEvent;
2423
import com.coffeebeans.springnativeawslambda.model.Secret;
@@ -29,18 +28,21 @@
2928
import org.springframework.aot.hint.TypeReference;
3029
import org.springframework.lang.Nullable;
3130

31+
import java.util.List;
32+
3233
public class ReflectionRuntimeHints implements RuntimeHintsRegistrar {
3334

34-
@Override
35-
public void registerHints(final RuntimeHints hints, @Nullable final ClassLoader classLoader) {
36-
final List<TypeReference> typeReferences = List.of(
37-
TypeReference.of(DateTime.class),
38-
TypeReference.of(Secret.class),
39-
TypeReference.of(APIGatewayProxyResponseEvent.class),
40-
TypeReference.of(APIGatewayProxyRequestEvent.class),
41-
TypeReference.of(APIGatewayProxyRequestEvent.ProxyRequestContext.class)
42-
);
35+
@Override
36+
public void registerHints(final RuntimeHints hints, @Nullable final ClassLoader classLoader) {
37+
final List<TypeReference> typeReferences = List.of(
38+
TypeReference.of(DateTime.class),
39+
TypeReference.of(Secret.class),
40+
TypeReference.of(APIGatewayProxyResponseEvent.class),
41+
TypeReference.of(APIGatewayProxyRequestEvent.class),
42+
TypeReference.of(APIGatewayProxyRequestEvent.ProxyRequestContext.class),
43+
TypeReference.of(APIGatewayProxyRequestEvent.RequestIdentity.class)
44+
);
4345

44-
hints.reflection().registerTypes(typeReferences, builder -> builder.withMembers(MemberCategory.values()));
45-
}
46+
hints.reflection().registerTypes(typeReferences, builder -> builder.withMembers(MemberCategory.values()));
47+
}
4648
}

0 commit comments

Comments
 (0)