Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing required key 'KeyId' in params #3

Open
Outc4sted opened this issue Dec 22, 2016 · 3 comments
Open

Missing required key 'KeyId' in params #3

Outc4sted opened this issue Dec 22, 2016 · 3 comments

Comments

@Outc4sted
Copy link

This error happens when I attempt to encrypt. The alias for my KMS is PhotoboothConn

service: userApi
provider:
   ...
plugins:
   - serverless-crypt
custom:
   - cryptKeyId: ${env:PhotoboothConn}
functions:
   ...

And the command I run is
sls encrypt -n PhotoboothConn -t "postgres://restOfConnectionString" --save

@marcy-terui
Copy link
Owner

marcy-terui commented Dec 22, 2016

@Outc4sted Thank you for your reporting.

cryptKeyId must be a valid KMS key ID.
Does ${env:PhotoboothConn} mean "Using PhotoboothConn environment variable" in Serverless Framework.

Have you set PhotoboothConn environment variable?

@Outc4sted
Copy link
Author

I didn't. I thought when I created the KMS it would automatically be set as an environment var for my lambdas. I just tried with pasting my key id in there and that worked, so thanks. Is it okay to make that into an environment var within my serverless.yml or is that something sensitive I don't want in plain text?

@marcy-terui
Copy link
Owner

Is it okay to make that into an environment var within my serverless.yml or is that something sensitive I don't want in plain text?

I think it is better not to show the ID to others. But, it is not a problem. It's like Account ID in the relationship between Account ID and Password.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants