title: How can i implement AWS Secrets Manager on a Scala SBT Project
body: <p>I'm trying to implement AWS Secrets Manager on a scala project, has anyone tried it?</p>
  <p>I have added the dependency to the project on build.sbt like this</p>
  <pre><code>libraryDependencies ++= Seq(
    &quot;com.databricks&quot;            %% &quot;spark-avro&quot;         % &quot;4.0.0&quot;,
    &quot;com.amazonaws&quot;             % &quot;aws-java-sdk-core&quot;   % &quot;1.11.569&quot;,
    &quot;com.amazonaws&quot;             % &quot;aws-java-sdk-s3&quot;     % &quot;1.11.569&quot;,
    &quot;com.amazonaws&quot;             % &quot;aws-java-sdk-secretsmanager&quot; % &quot;1.11.569&quot;,
    &quot;com.typesafe&quot;              % &quot;config&quot;              % &quot;1.3.4&quot;,
    &quot;org.apache.spark&quot;          %% &quot;spark-core&quot;         % &quot;2.3.0&quot; % &quot;provided&quot;,
    &quot;org.apache.spark&quot;          %% &quot;spark-sql&quot;          % &quot;2.3.0&quot; % &quot;provided&quot;,
    &quot;org.apache.spark&quot;          %% &quot;spark-hadoop-cloud&quot; % &quot;2.3.2.3.1.0.6-1&quot; % &quot;provided&quot;,
    &quot;org.apache.hadoop&quot;         % &quot;hadoop-common&quot;       % &quot;3.1.1.3.0.2.0-50&quot; % &quot;provided&quot;,
    &quot;com.github.gphat&quot;          %% &quot;datadog-scala&quot;      % &quot;1.1.3&quot; exclude (&quot;org.json4s&quot;, &quot;json4s-jackson&quot;) exclude (&quot;org.json4s&quot;, &quot;json4s-native&quot;),
    &quot;org.scalatest&quot;             %% &quot;scalatest&quot;          % &quot;3.0.5&quot; % &quot;test&quot;,
    &quot;org.mockito&quot;               % &quot;mockito-core&quot;        % &quot;2.27.0&quot; % &quot;test&quot;,
    &quot;com.github.tomakehurst&quot;    % &quot;wiremock-jre8&quot;       % &quot;2.23.2&quot; % &quot;test&quot;,
    &quot;org.glassfish.jersey.core&quot; % &quot;jersey-common&quot;       % &quot;2.22.2&quot; % &quot;test&quot;,
    &quot;org.glassfish.jersey.core&quot; % &quot;jersey-server&quot;       % &quot;2.22.2&quot; % &quot;test&quot;,
    &quot;org.glassfish.jersey.core&quot; % &quot;jersey-client&quot;       % &quot;2.22.2&quot; % &quot;test&quot;
  )
  
  assemblyMergeStrategy in assembly := {
    case PathList(&quot;META-INF&quot;, xs @ _*) =&gt;
      xs map { _.toLowerCase } match {
        case &quot;manifest.mf&quot; :: Nil | &quot;index.list&quot; :: Nil | &quot;dependencies&quot; :: Nil =&gt;
          MergeStrategy.discard
        case ps @ x :: xs if ps.last.endsWith(&quot;.sf&quot;) || ps.last.endsWith(&quot;.dsa&quot;) =&gt;
          MergeStrategy.discard
        case &quot;plexus&quot; :: xs =&gt;
          MergeStrategy.discard
        case &quot;services&quot; :: xs =&gt;
          MergeStrategy.filterDistinctLines
        case &quot;spring.com.conekta.schemas&quot; :: Nil | &quot;spring.handlers&quot; :: Nil =&gt;
          MergeStrategy.filterDistinctLines
        case _ =&gt; MergeStrategy.first
      }
  </code></pre>
  <p>And my implementation is like this</p>
  <pre><code>def getSecrets: Map[String,String] ={
      val secretName = &quot;***********************&quot;
      val endpoint = &quot;secretsmanager.us-east-1.amazonaws.com&quot;
  
      val config = new AwsClientBuilder.EndpointConfiguration(endpoint, Regions.US_EAST_1.getName)
      val clientBuilder = AWSSecretsManagerClientBuilder.standard()
      clientBuilder.setEndpointConfiguration(config)
  
      val client = clientBuilder.build()
      val getSecretValueRequest = new GetSecretValueRequest().withSecretId(secretName).withVersionStage(&quot;AWSCURRENT&quot;)
      val getSecretValueResult = client.getSecretValue(getSecretValueRequest)
      val secret = getSecretValueResult.getSecretString
  
      implicit val formats = DefaultFormats
      parse(secret).extract[Map[String, String]]
    }
  </code></pre>
  <p>It is working locally, but when i upload my jar to the server i'm working on i get this error:</p>
  <pre><code>java.lang.NoSuchMethodError: com.amazonaws.client.AwsSyncClientParams.getAdvancedConfig()Lcom/amazonaws/client/builder/AdvancedConfig;
      at com.amazonaws.services.secretsmanager.AWSSecretsManagerClient.&lt;init&gt;(AWSSecretsManagerClient.java:213)
      at com.amazonaws.services.secretsmanager.AWSSecretsManagerClient.&lt;init&gt;(AWSSecretsManagerClient.java:197)
      at com.amazonaws.services.secretsmanager.AWSSecretsManagerClientBuilder.build(AWSSecretsManagerClientBuilder.java:61)
      at com.amazonaws.services.secretsmanager.AWSSecretsManagerClientBuilder.build(AWSSecretsManagerClientBuilder.java:27)
      at com.amazonaws.client.builder.AwsSyncClientBuilder.build(AwsSyncClientBuilder.java:46)
      at com.conekta.helpers.SecretManager.getSecrets(SecretManager.scala:21)
  </code></pre>
  <p>Has anyone succesfuly implemented aws secret manager on a sbt project
  Any help would be much apreccuated.
  Thanks.</p>