Giter VIP home page Giter VIP logo

Comments (7)

IanMeyers avatar IanMeyers commented on August 22, 2024

Hello,

Sorry to hear you have an issue with this. Can you please confirm that the user credentials applied to your session where you are running the setup.js has rights to the AWS Key Management Service, specifically kms:DescribeKey, kms:GetKeyPolicy and kms:Encrypt?

Thx,

Ian

from aws-lambda-redshift-loader.

IanMeyers avatar IanMeyers commented on August 22, 2024

I've also just pushed a small update to kmsCrypto.js that should result in a better error message than what you are getting now.

from aws-lambda-redshift-loader.

andrewrguy avatar andrewrguy commented on August 22, 2024

Ian, thanks for the quick response. I did a pull and re ran the setup. The new error message is below:

Unknown Error during Customer Master Key describe
Error during resolution of Customer Master Key
/Users/andrewguy/src/aws-lambda-redshift-loader/node_modules/aws-sdk/lib/request.js:32
          throw err;
                ^
TypeError: Cannot read property 'length' of null
    at Object.toLambdaStringFormat (/Users/andrewguy/src/aws-lambda-redshift-loader/kmsCrypto.js:222:14)
    at /Users/andrewguy/src/aws-lambda-redshift-loader/setup.js:139:19
    at /Users/andrewguy/src/aws-lambda-redshift-loader/kmsCrypto.js:105:11
    at Response.<anonymous> (/Users/andrewguy/src/aws-lambda-redshift-loader/kmsCrypto.js:83:12)
    at Request.<anonymous> (/Users/andrewguy/src/aws-lambda-redshift-loader/node_modules/aws-sdk/lib/request.js:350:18)
    at Request.callListeners (/Users/andrewguy/src/aws-lambda-redshift-loader/node_modules/aws-sdk/lib/sequential_executor.js:100:18)
    at Request.emit (/Users/andrewguy/src/aws-lambda-redshift-loader/node_modules/aws-sdk/lib/sequential_executor.js:77:10)
    at Request.emit (/Users/andrewguy/src/aws-lambda-redshift-loader/node_modules/aws-sdk/lib/request.js:604:14)
    at Request.transition (/Users/andrewguy/src/aws-lambda-redshift-loader/node_modules/aws-sdk/lib/request.js:21:12)
    at AcceptorStateMachine.runTo (/Users/andrewguy/src/aws-lambda-redshift-loader/node_modules/aws-sdk/lib/state_machine.js:14:12)

I'm running with credentials in .aws/credentials that have this policy:
{
"Statement": [
{
"Effect": "Allow",
"NotAction": "iam:",
"Resource": "
"
}
]
}

That should work, or no? Is KMS categorized under IAM?

Thanks,
Andy

from aws-lambda-redshift-loader.

IanMeyers avatar IanMeyers commented on August 22, 2024

So not much better of an error message then. You will need kms :* grants to use so, a well as dynamo db write privileges.

from aws-lambda-redshift-loader.

andrewrguy avatar andrewrguy commented on August 22, 2024

Once I ran export AWS_.... instead of relying on the credentials file, the script completed. Why would it not read my credential file? the permissions seem fine on it.

from aws-lambda-redshift-loader.

IanMeyers avatar IanMeyers commented on August 22, 2024

For the javascript SDK, it has to be in your home folder/.aws/credentials. Was that the path for the file?

from aws-lambda-redshift-loader.

andrewrguy avatar andrewrguy commented on August 22, 2024

Yes, it is definitely in there:
/Users/andrewguy/.aws/credentials
I believe this happened with another AWS service before on my system..hmmm. Anyway, I believe this issue can be closed, since the original problem has been solved.

from aws-lambda-redshift-loader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.