InvalidAction: The action or operation requested is invalid. Verify that the action is typed correctly

好久不见. 提交于 2019-12-11 15:28:22

问题


I am using AWS Cognito Service Provider to create and list User Pool Clients. I have a locally installed DynamoDB to store the additional data. But I am getting the above error in the callback. I looked a lot for the error context but couldn't fine one.

const cognitoidentityserviceprovider = new AWS.CognitoIdentityServiceProvider();
cognitoidentityserviceprovider.listUserPoolClients(params, function(clientListError, clientListData) {
    console.log(clientListError)
    if(clientListError){
        return res.json({
            status: false,
            message: 'Error Fetching Client Apps',
            data: clientListError
        })
    }
    return res.json({
        status: true,
        message: 'List fetch success',
        data: clientListData
    })
});

This is for fetching the user pool client apps. In the same way I am creating the user pool client but I am getting the same error "InvalidAction"


回答1:


The error thrown was from Dynamodb because I was connected to my local DB which had no tables and data and I was also not passing the credentials generated by the token manager. I removed the local DB URL from the config and then passed the credentials from the token manager and I got the desired result.




回答2:


I am facing the same issue, but unable to solve it. Can you guide me on:

I removed the local DB URL from the config and then passed the credentials from the token manager and I got the desired result.

I am configuring DB this way:

static DB_CONFIG = AppConfig.ENVIRONMENT === 'localhost' ? { endpoint: 'http://localhost:8000', region: 'us-east-1' } : { region: 'us-east-1' };

which, in my case is localhost and first object gets passed in.



来源:https://stackoverflow.com/questions/48625431/invalidaction-the-action-or-operation-requested-is-invalid-verify-that-the-act

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!