我希望通过Lambda中的AWS Security Token Service获取临时凭证,但它始终在cboBroker.RowSource = ""
cboBroker.AddItem "<ALL>"
Set rs = CurrentDb.OpenRecordset("SELECT...")
Do While Not rs.EOF
cboBroker.AddItem rs.Fields(0).Value
rs.MoveNext
Loop
处超时。
有人帮助我吗?
源代码:
AWSSecurityTokenServiceClientBuilder.standard().build()
错误讯息:
package example;
import com.amazonaws.services.lambda.runtime.Context;
import com.amazonaws.services.lambda.runtime.RequestHandler;
import com.amazonaws.services.securitytoken.AWSSecurityTokenService;
import com.amazonaws.services.securitytoken.AWSSecurityTokenServiceClientBuilder;
import com.amazonaws.services.securitytoken.model.AssumeRoleRequest;
import com.amazonaws.services.securitytoken.model.AssumeRoleResult;
public class SecurityTokenService implements RequestHandler<Request, Credential> {
public Credential handleRequest(Request request, Context context) {
AssumeRoleRequest assumeRoleRequest = new AssumeRoleRequest()
.withPolicy("arn:aws:iam::12345678900:policy/SomePolicy")
.withDurationSeconds(900);
AWSSecurityTokenService securityTokenService = AWSSecurityTokenServiceClientBuilder.standard().build();
AssumeRoleResult assumeRoleResult = securityTokenService.assumeRole(assumeRoleRequest);
return new Credential(assumeRoleResult.getCredentials());
}
}