In this recipe, we will write our logic within the Lambda handler itself without any service classes. I generally tend to create service classes as I primarily come from an enterprise Java development background. This is, however, not a requirement for Lambdas, and in many cases it might be better to simply code the logic within the Lambda handler itself. You can follow whatever approach you feel comfortable with. There might be also a preferred approach for most teams.
The Maven pom.xml file of the project should also define the following dependency:
<dependency> <groupId>com.amazonaws</groupId> <artifactId>aws-java-sdk-sns</artifactId> <version>${aws.sdk.version}</version></dependency>
We can create the Java ...