我正在使用AWSLambdaClient.createFunction()。已弃用。

请让我知道,这有什么替代方法。

AWSLambdaClient lclient = new AWSLambdaClient(Credentials);
..
..
lclient.createFunction(request);

最佳答案

您可以使用AWSLambdaClientBuilder

BasicAWSCredentials creds = new BasicAWSCredentials("access_key", "secret_key");
AWSLambda lClient = AWSLambdaClientBuilder.standard().withCredentials(new AWSStaticCredentialsProvider(creds)).build();

07-24 09:55