Skip to content

KMS lookups give values $VAL wrapped as "b'$VAL'" when using python 3 #755

Closed
@hauntingEcho

Description

@hauntingEcho

While attempting to encrypt a password 'hello!' per the directions here:

  1. the command given for encryption fails entirely
  2. after getting encryption working, Stacker populated incorrect values

using the suggested encryption command aws kms encrypt --key-id alias/DbConnectionKey --plaintext 'hello!' --output text --query CiphertextBlob results in:

Invalid base64: "hello!"

From there, I attempted to use aws kms encrypt --key-id alias/DbConnectionKey --plaintext fileb://<(echo -n 'hello!') --output text --query CiphertextBlob and used the result to create a secret via Stacker. In this secret, I see:

image

Does this need a different configuration than the one from the docs, or is there another way I should be doing this? I'm currently using Stacker 1.7.0 on python 3.5.3. I've also tried dropping the '!' off the end and received the same behavior with just "hello".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions