aws-samples / aws-cdk-examples

Example projects using the AWS CDK
Apache License 2.0
4.95k stars 2.1k forks source link

Update Java Custom Resource example to use Java for Custom Resource Handler #1000

Open NotLucxs opened 3 months ago

NotLucxs commented 3 months ago

Describe the feature

Currently, the Java CDK example for a Custom Resource uses Python. Very little material exists on Java based Lambda backed Custom Resources and implementing one is causing a bit of pain. Of the examples that exist, some send a response to a presigned S3 URL, some just return a Response object containing "SUCCESS" or "FAILED". The example can be found at: https://github.com/aws-samples/aws-cdk-examples/blob/master/java/custom-resource/lambda/custom-resource-handler.py

Use Case

The Java CDK example code should be written in Java, not Python. I should be able to follow a Java example in the same language throughout

Proposed Solution

Provide a Custom Resource handler example in Java

Other Information

The solution could also make use of your own Powertools util: https://docs.powertools.aws.dev/lambda/java/utilities/custom_resources/

Acknowledgements

Language

Java