Skip to content

Instantly share code, notes, and snippets.

@bmccann36
Created July 4, 2020 11:52
Show Gist options
  • Save bmccann36/4c63cb90940f77170150f06ec421e80b to your computer and use it in GitHub Desktop.
Save bmccann36/4c63cb90940f77170150f06ec421e80b to your computer and use it in GitHub Desktop.
zeebe credentials sourcing
if (accessKey == null) {
logger.info("Creating Lambda client without credentials the container will use task IAM role ");
Regions region = Regions.fromName(this.region);
AWSLambdaClientBuilder builder = AWSLambdaClientBuilder.standard()
.withRegion(region);
client = builder.build();
} else {
logger.info("Creating Lambda client with provided access and secret key");
Regions region = Regions.fromName(this.region);
BasicAWSCredentials credentials = new BasicAWSCredentials(accessKey, secret);
AWSLambdaClientBuilder builder = AWSLambdaClientBuilder.standard().withCredentials(new AWSStaticCredentialsProvider(credentials)).withRegion(region);
client = builder.build();
}
return client;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment