trek10inc / serverless-secrets

An opinionated tool for safely managing and deploying Serverless projects and their secrets.
Other
165 stars 27 forks source link

intact env conversion leads to invalid env idents #39

Closed jasonkuhrt closed 6 years ago

jasonkuhrt commented 6 years ago

Example failing config case:

  environmentSecrets:
    a: /${opt:stage}/${self:service}/a
    b: /${opt:stage}/${self:service}/b
    c: /${opt:stage}/${self:service}/c
An error occurred: UserinfoDashauthorizerLambdaFunction - 1 validation error detected: Value at 'environment.variables' failed to satisfy constraint: Map keys must satisfy constraint: [Member must satisfy regular expression pattern: [a-zA-Z]([a-zA-Z0-9_])+] (Service: AWSLambda; Status Code: 400; Error Code: ValidationException; Request ID: f7d922f6-978f-11e8-aa91-7fa0b8dda0a

I think the feature is useful but obviously must be tweaked to sanitize characters rejected by AWS rules.

jasonkuhrt commented 6 years ago

Never mind, I misread the error message. Apparently AWS will not accept single-char env names!