const AWS=require('aws-sdk')
addUserToGroup = () => {
var params = {
GroupName: "storeusers" /* required */,
UserPoolId: "us-west-2_XXXXX" /* required */,
Username: "joshigarikimukku@gmail.com" /* required
*/
}
var cognitoidentityserviceprovider = new
AWS.CognitoIdentityServiceProvider()
cognitoidentityserviceprovider.adminAddUserToGroup(params,
function (
err,
data
) {
if (err) console.log("error...",err, err.stack)
// an error occurred
else console.log("data...",data) // successful
response
})
}
я получаю эту ошибку
error ... [CredentialsError: отсутствуют учетные данные в конфигурации, если используется AWS_CONFIG_FILE, установите AWS_SDK_LOAD_CONFIG = 1 credError @ http://127.0.0.1: 19001 / node_modules / expo / AppEntry. расслоение? платформа = ios & dev = true & minify = false & hot = false: 434736: 55 getCredentials @ http://127.0.0.1: 19001 / node_modules / expo / AppEntry.bundle? платформа = ios & dev = true & minify = false & hot = false: 434780: 29 VALIDATE_CREDENTIALS @ http://127.0.0.1: 19001 / node_modules / expo / AppEntry.bundle? платформа = ios & dev = true & minify = false & hot = false: 435172: 46 callListeners @ http://127.0.0.1: 19001 / node_modules / expo / AppEntry.bundle? платформа = ios & dev = true & minify = false & hot = false: 433906: 29 emit @ http://127.0.0.1: 19001 / node_modules / expo / AppEntry.bundle addUserToGroup
commitHookEffectList @ http://127.0.0.1: 19001 / node_modules / expo / AppEntry.bundle? платформа = ios & dev = true & minify = false & hot = false: 24530: 38 commitPassiveHookEffects @ http://127.0.0.1: 19001 / node_modules / expo / AppEntry.bundle? callFunctionReturnFlushedQueue @ [собственный код]