Posts

Showing posts with the label Aws Sdk Js

Configuration Error: Missing Region In Config (AWS)

Answer : The correct code of Oregon region is us-west-2 .You have set it as us-west-2a in two places. While mentioning identity pool id,correct the code as below and try: AWS.config.update({region:'us-west-2'}); var myCredentials = new AWS.CognitoIdentityCredentials({ IdentityPoolId:'us-west-2:"Identity Pool ID"' }); If you are not passing the region for the API CognitoIdentityCredentials , then it will pull the data from AWS.config . Also, In your code, while initializing AWS.CONFIG with region name, You have used us-west-2a . Correct it, if you are going to use it instead of AWS.config.update . var myConfig = new AWS.Config({ credentials: myCredentials, region: 'us-west-2' }); Update I have identified another issue. The issue is that, you are initializing the AWS.config with var myConfig = new AWS.Config() but you are NOT updating the AWS.config class back with it. The missing code is : AWS.config = myConfig . As you are not updat...