0

We have a project in our AWS Lambda account which was developed by a Freelancer long back. In that project IAM Credentials API KEY ID and ACCESS KEY ID are hardcoded. Now we have to change those keys. But we don't have the project source code.

  1. We are unable to unzip the project but we did it by using Mac terminal unzip <path>
  2. I've edited the class by using a byte code editor program rej
  3. I've compressed the entire program as it was before and uploaded it to the lambda. Now we are getting Class not found Exception

The project MANIFEST file has following data Manifest-Version: 1.0 Archiver-Version: Plexus Archiver Built-By: ..... Created-By: Apache Maven 3.3.3 Build-Jdk: 1.8.0_31

Is there any way to edit the hardcoded keys in the project with the above configuration.

Many Thanks in advance.

  • First issue: Not using a version control? Can't get in contact with the original dev? So based on what you've written it will be hard..really hard..cause if you need to change the byte code which obviously has gone wrong..for whatever reason.. The byte code editor seemed to be created for old jdk's ? Using the same at the moment? ?? Have tried to change an output in a log file for testing purposes first? To see if it's really working ? – khmarbaise Sep 11 '18 at 11:16
  • @khmarbaise Thank you very much for the response. It was not our main project. It was just a part of our project which send the data to a warehouse. We are not maintaining a version control for it and we can't get in contact with the original dev. I've edited the bytecode by using this http://rejava.sourceforge.net/features.html I believe it worked but I just compressed the files by using default zip program in my mac. I believe there is some setup to build the project. From the MANIFEST file listed above, can you suggest anything? –  Sep 11 '18 at 11:28

1 Answers1

0

I've updated the contents of .class files by using Byte code editor http://rejava.sourceforge.net/features.html. Later I've opened the original project's zip file in WinRAR and replaced those modified class files. And that's it, I've uploaded the zip file to Lambda and it's worked as usual.