From 811730b73761258d6c3d6df6eefc0ec0340ef23f Mon Sep 17 00:00:00 2001 From: Emil Lerch Date: Fri, 2 Aug 2019 12:33:47 -0700 Subject: [PATCH] update get_authorized_keys to look at ddb table --- get_authorized_keys | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/get_authorized_keys b/get_authorized_keys index d3d68b1..4be8828 100755 --- a/get_authorized_keys +++ b/get_authorized_keys @@ -6,10 +6,16 @@ # Accomodate for local install PATH=$HOME/.local/bin:$PATH -aws codecommit get-file \ - --repository-name authorized_keys \ - --file-path authorized_keys \ - --query 'fileContent' \ - --cli-read-timeout 1 \ - --cli-connect-timeout 1 \ - --output text |base64 -d +# This is much slower than hitting DDB, so while it will work, we'll use +# our codecommit -> DDB lambda function and pull direct from DDB. Also helps +# with codecommit user count... + +# aws codecommit get-file \ +# --repository-name authorized_keys \ +# --file-path authorized_keys \ +# --query 'fileContent' \ +# --cli-read-timeout 1 \ +# --cli-connect-timeout 1 \ +# --output text |base64 -d + +aws dynamodb scan --table-name key --query 'Items[0].key.S' --output text