Skip to content

Commit 1406aa8

Browse files
committed
Update aws-lite, deps, and changelog
1 parent 7d83482 commit 1406aa8

File tree

7 files changed

+18
-22
lines changed

7 files changed

+18
-22
lines changed

_changelog.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Also see: [Architect changelog](https://github.com/architect/architect/blob/main
66

77
---
88

9-
## [8.0.0 - 8.0.1] 2024-02-03
9+
## [8.0.0 - 8.0.2] 2024-02-03
1010

1111
Architect Functions just got a lot faster. Gone are the days of 500-1000ms cold starts due to instantiating the AWS SDK – Functions v8 is now between 2-5x faster, and uses 2-4x less memory, courtesy of [aws-lite](https://aws-lite.org)!
1212

package.json

+12-12
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@
2525
"author": "Brian LeRoux <[email protected]>",
2626
"license": "Apache-2.0",
2727
"dependencies": {
28-
"@aws-lite/apigatewaymanagementapi": "^0.0.7",
29-
"@aws-lite/client": "^0.16.1",
30-
"@aws-lite/dynamodb": "^0.3.3",
31-
"@aws-lite/sns": "^0.0.4",
32-
"@aws-lite/sqs": "^0.2.0",
33-
"@aws-lite/ssm": "^0.2.2",
28+
"@aws-lite/apigatewaymanagementapi": "^0.0.8",
29+
"@aws-lite/client": "^0.17.1",
30+
"@aws-lite/dynamodb": "^0.3.4",
31+
"@aws-lite/sns": "^0.0.5",
32+
"@aws-lite/sqs": "^0.2.1",
33+
"@aws-lite/ssm": "^0.2.3",
3434
"cookie": "^0.6.0",
3535
"cookie-signature": "^1.2.1",
3636
"csrf": "^3.1.0",
@@ -40,14 +40,14 @@
4040
"uid-safe": "^2.1.5"
4141
},
4242
"devDependencies": {
43-
"@architect/asap": "^7.0.4",
43+
"@architect/asap": "^7.0.7",
4444
"@architect/eslint-config": "2.1.1",
4545
"@architect/req-res-fixtures": "git+https://github.com/architect/req-res-fixtures.git",
46-
"@architect/sandbox": "^6.0.0",
47-
"@aws-lite/apigatewaymanagementapi-types": "^0.0.9",
48-
"@aws-lite/dynamodb-types": "^0.3.4",
49-
"@aws-lite/sns-types": "^0.0.5",
50-
"@aws-lite/sqs-types": "^0.2.1",
46+
"@architect/sandbox": "^6.0.1",
47+
"@aws-lite/apigatewaymanagementapi-types": "^0.0.10",
48+
"@aws-lite/dynamodb-types": "^0.3.5",
49+
"@aws-lite/sns-types": "^0.0.6",
50+
"@aws-lite/sqs-types": "^0.2.2",
5151
"@types/aws-lambda": "^8.10.133",
5252
"@types/node": "18",
5353
"cross-env": "~7.0.3",

src/discovery/index.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ module.exports = function lookup (callback) {
1818
app = 'arc-app'
1919
}
2020

21-
let plugins = [ '@aws-lite/ssm' ]
21+
let plugins = [ import('@aws-lite/ssm') ]
2222
let config = { plugins }
2323
if (local) {
2424
let port = 2222
@@ -29,10 +29,7 @@ module.exports = function lookup (callback) {
2929
}
3030
port = ports._arc
3131
}
32-
config = {
33-
endpoint: `http://localhost:${port}/_arc/ssm`,
34-
plugins,
35-
}
32+
config.endpoint = `http://localhost:${port}/_arc/ssm`
3633
}
3734

3835
getAwsClient(config, (err, client) => {

src/events/publish.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ module.exports = function publishFactory (arc, type) {
4949
}
5050
else {
5151
getAwsClient({
52-
plugins: [ '@aws-lite/sns', '@aws-lite/sqs' ],
52+
plugins: [ import('@aws-lite/sns'), import('@aws-lite/sqs') ],
5353
}, (err, _client) => {
5454
if (err) callback(err)
5555
else {

src/lib/index.js

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ let nonLocalEnvs = [ 'staging', 'production' ]
77

88
function getAwsClient (params, callback) {
99
let awsLite = require('@aws-lite/client')
10-
params.autoloadPlugins = false
1110
params.region = process.env.AWS_REGION || 'us-west-2'
1211
awsLite(params)
1312
.then(client => callback(null, client))

src/tables/factory.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module.exports = function factory ({ services, options = {} }, callback) {
1111
let { ARC_ENV, AWS_REGION } = process.env
1212
let local = ARC_ENV === 'testing'
1313
let region = AWS_REGION || 'us-west-2'
14-
let plugins = [ '@aws-lite/dynamodb' ]
14+
let plugins = [ import('@aws-lite/dynamodb') ]
1515

1616
if (useAWS()) {
1717
getAwsClient({ region, plugins }, (err, aws) => {

src/ws/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ function instantiateAPI () {
66
if (client) res(client)
77

88
getAwsClient({
9-
plugins: [ '@aws-lite/apigatewaymanagementapi' ]
9+
plugins: [ import('@aws-lite/apigatewaymanagementapi') ]
1010
}, (err, _client) => {
1111
if (err) rej(err)
1212
else {

0 commit comments

Comments
 (0)