agent/ssm/factory/factory.go
func (*ssmClientCreator) NewSSMClient(region string,
	creds credentials.IAMRoleCredentials) ssmclient.SSMClient {
	cfg := aws.NewConfig().
		WithHTTPClient(httpclient.New(roundtripTimeout, false)).
		WithRegion(region).
		WithCredentials(
			awscreds.NewStaticCredentials(creds.AccessKeyID, creds.SecretAccessKey,
				creds.SessionToken))
	sess := session.Must(session.NewSession(cfg))
	return ssm.New(sess)
}
func (*ssmClientCreator) NewSSMClient(region string,
	creds credentials.IAMRoleCredentials) ssmclient.SSMClient {
	cfg := aws.NewConfig().
		WithHTTPClient(httpclient.New(roundtripTimeout, false)).
		WithRegion(region).
		WithCredentials(
			awscreds.NewStaticCredentials(creds.AccessKeyID, creds.SecretAccessKey,
				creds.SessionToken))
	sess := session.Must(session.NewSession(cfg))
	return ssm.New(sess)
}
func ( * ssmClientCreator ) NewSSMClient ( region string , creds credentials . IAMRoleCredentials ) ssmclient . SSMClient { cfg := aws . NewConfig ( ) . WithHTTPClient ( httpclient . New ( roundtripTimeout , false ) ) . WithRegion ( region ) . WithCredentials ( awscreds . NewStaticCredentials ( creds . AccessKeyID , creds . SecretAccessKey , creds . SessionToken ) ) sess := session . Must ( session . NewSession ( cfg ) ) return ssm . New ( sess ) }
//SSM Client will automatically retry 3 times when has throttling error
SSM Client will automatically retry 3 times when has throttling error