Skip to content

Commit

Permalink
Update to latest @aws-lite/client, including endpoint param
Browse files Browse the repository at this point in the history
Fix remaining issue where aws-lite client instantiation failure could lead to red herring destructuring error
  • Loading branch information
ryanblock committed Jan 30, 2024
1 parent 5afd809 commit 1fe72ce
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 13 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"src/*"
],
"dependencies": {
"@aws-lite/client": "^0.14.3",
"@aws-lite/client": "^0.15.1",
"@aws-lite/dynamodb": "^0.3.3",
"@aws-lite/ssm": "^0.2.2",
"@begin/hashid": "^1.0.0",
Expand Down
4 changes: 2 additions & 2 deletions src/helpers/_dynamo.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ module.exports = function getDynamo (callback) {

let local = ARC_ENV === 'testing' || ARC_LOCAL
if (!local) {
aws(function gotClient (err, { ddb }) {
aws(function gotClient (err, client) {
if (err) callback(err)
else {
db = ddb
db = client.dynamodb
callback(null, db)
}
})
Expand Down
6 changes: 1 addition & 5 deletions src/helpers/_get-ports.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,7 @@ module.exports = function getPorts (callback) {
}
let Name = `/${toLogicalID(`${app}-${env}`)}/ARC_SANDBOX/ports`
let config = {
protocol: 'http',
host: 'localhost',
port: 2222,
endpointPrefix: '_arc/ssm',
// endpoint: `http://localhost:${port}/_arc/ssm`,
endpoint: `http://localhost:2222/_arc/ssm`,
region: AWS_REGION || 'us-west-2',
}

Expand Down
6 changes: 1 addition & 5 deletions src/helpers/_get-table-name.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,7 @@ module.exports = function getTableName (callback) {
getPorts((err, ports) => {
if (err) callback(err)
else go({
protocol: 'http',
host: 'localhost',
port: ports._arc,
endpointPrefix: '_arc/ssm',
// endpoint: `http://localhost:${ports._arc}/_arc/ssm`,
endpoint: `http://localhost:${ports._arc}/_arc/ssm`,
region: AWS_REGION || 'us-west-2',
})
})
Expand Down

0 comments on commit 1fe72ce

Please sign in to comment.