1

I am trying to use aws-java-sdk-events in my project to dynamically create cloudwatch events to trigger lambda. The following snippet of code produces cannot access com.amazonaws.protocol.StructuredPojo on project compilation:

Target target = new Target()
      .withArn("")
      .withId("");

Also, Intellij Idea highlights it with the same message. As far as I understood, the problem is with @SdkProtectedApi that prohibits to do any operations on the class. I don't quite understand what would be the way to set targets then. Any possible help is much appreciated.

Vasiliy Vlasov
  • 3,316
  • 3
  • 17
  • 20
  • Are you dynamically trying to create new rules / targets? CloudWatch Events (now EventBridge) is eventually consistent with new rules & targets. So new rules / targets need few minutes to take effect. – blr Jan 01 '21 at 02:03

0 Answers0