-
Notifications
You must be signed in to change notification settings - Fork 136
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
Upgrade Code to AWS SDK v3 #409
Conversation
I added a new flag to set dummy creds if we do not have local credentials. (--dummy_creds, -D) Feel free to try again and review 😄 @rchl |
@@ -38,15 +38,16 @@ parser.add_argument('-p', '--port', { | |||
help: 'Port to run on (default: 8001)', | |||
}) | |||
|
|||
parser.add_argument('-D', '--dummy_creds', { | |||
parser.add_argument('-l', '--local_config', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's more common to use dashes in command line options instead of underscores.
@@ -46,41 +46,41 @@ function loadDynamoEndpoint(env, dynamoConfig) { | |||
* @param AWS - the AWS SDK object | |||
* @returns {{endpoint: string, sslEnabled: boolean, region: string, accessKeyId: string}} | |||
*/ | |||
function loadDynamoConfig(env, isDummy) { | |||
function loadDynamoConfig(env, local_config) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
camelCase
convention is being used in Javascript
Any update on this? |
@@ -405,7 +405,7 @@ | |||
|
|||
if (data.Items.length) { | |||
$('#items-container').append(data.Items.map(item => { | |||
const viewUrl = '/tables/<%= Table.TableName %>/items/' + encodeURIComponent(Object.values(item.__key).join(',')) | |||
const viewUrl = '/tables/<%= Table.TableName %>/items/' + encodeURIComponent(Object.values(Object.values(item.__key)[0]).join(',')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran this locally for my dataset, and this doesn't work properly when there are multiple keys involved, as this is only picking the first key.
I fixed this locally by doing:
Object.values(item.__key).map(function (i) { return Object.values(i)[0] }).join(',')
What:
Upgrade AWS SDK from v2 to v3
WHY:
Incompatibility with Node 18 based platforms as AWS SDK v2 does not work well.
Note:
Thanks to this PR from @garrettheel.
I used your idea of converting the
CapacityUnits
intoNumber
which saved me some work.