Skip to content
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

chore: upgrade sdkv3 to the newest version used by lambda distributions #31658

Merged
merged 4 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
"colors": "1.4.0",
"markdown-it": "^12.3.2",
"string-width": "^4.2.3",
"@types/babel__traverse": "7.18.2"
"@types/babel__traverse": "7.18.2",
"@smithy/types": "3.5.0"
},
"repository": {
"type": "git",
Expand Down
26 changes: 13 additions & 13 deletions packages/@aws-cdk-testing/cli-integ/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,19 @@
},
"dependencies": {
"@octokit/rest": "^18.12.0",
"@aws-sdk/client-codeartifact": "3.637.0",
"@aws-sdk/client-cloudformation": "3.637.0",
"@aws-sdk/client-ecr": "3.637.0",
"@aws-sdk/client-ecs": "3.637.0",
"@aws-sdk/client-iam": "3.637.0",
"@aws-sdk/client-lambda": "3.637.0",
"@aws-sdk/client-s3": "3.637.0",
"@aws-sdk/client-sns": "3.637.0",
"@aws-sdk/client-sso": "3.637.0",
"@aws-sdk/client-sts": "3.637.0",
"@aws-sdk/credential-providers": "3.637.0",
"@smithy/util-retry": "3.0.4",
"@smithy/types": "3.4.0",
"@aws-sdk/client-codeartifact": "3.632.0",
"@aws-sdk/client-cloudformation": "3.632.0",
"@aws-sdk/client-ecr": "3.632.0",
"@aws-sdk/client-ecs": "3.632.0",
"@aws-sdk/client-iam": "3.632.0",
"@aws-sdk/client-lambda": "3.632.0",
"@aws-sdk/client-s3": "3.632.0",
"@aws-sdk/client-sns": "3.632.0",
"@aws-sdk/client-sso": "3.632.0",
"@aws-sdk/client-sts": "3.632.0",
"@aws-sdk/credential-providers": "3.632.0",
"@smithy/util-retry": "3.0.7",
"@smithy/types": "3.5.0",
"axios": "^1.7.7",
"chalk": "^4",
"fs-extra": "^9.1.0",
Expand Down
7 changes: 3 additions & 4 deletions packages/@aws-cdk-testing/framework-integ/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/integ-runner": "^0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@aws-sdk/client-acm": "3.421.0",
"@aws-sdk/client-rds": "3.421.0",
"@aws-sdk/client-s3": "3.421.0",
"@aws-sdk/client-acm": "3.632.0",
"@aws-sdk/client-rds": "3.632.0",
"@aws-sdk/client-s3": "3.632.0",
"delay": "5.0.0"
},
"dependencies": {
Expand All @@ -43,7 +43,6 @@
"@aws-cdk/lambda-layer-kubectl-v29": "^2.1.0",
"@aws-cdk/lambda-layer-kubectl-v30": "^2.0.1",
"aws-cdk-lib": "0.0.0",
"aws-sdk-mock": "5.6.0",
"cdk8s": "2.69.0",
"cdk8s-plus-27": "2.9.5",
"constructs": "^10.0.0"
Expand Down
6 changes: 3 additions & 3 deletions packages/@aws-cdk/aws-amplify-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@
"@aws-cdk/integ-runner": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@aws-cdk/custom-resource-handlers": "0.0.0",
"@aws-sdk/client-amplify": "3.451.0",
"@aws-sdk/client-s3": "3.451.0",
"@aws-sdk/s3-request-presigner": "3.451.0",
"@aws-sdk/client-amplify": "3.632.0",
"@aws-sdk/client-s3": "3.632.0",
"@aws-sdk/s3-request-presigner": "3.632.0",
"@types/jest": "^29.5.12",
"aws-cdk-lib": "0.0.0",
"@aws-cdk/integ-tests-alpha": "0.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"devDependencies": {
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@aws-sdk/client-s3": "3.421.0",
"@smithy/types": "^2.12.0",
"@aws-sdk/client-s3": "3.632.0",
"@smithy/types": "3.5.0",
"@types/jest": "^29.5.12",
"jest": "^29.7.0"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/@aws-cdk/aws-redshift-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@
"@aws-cdk/integ-runner": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@aws-cdk/custom-resource-handlers": "0.0.0",
"@aws-sdk/client-redshift": "3.452.0",
"@aws-sdk/client-redshift-data": "3.451.0",
"@aws-sdk/client-secrets-manager": "3.451.0",
"@aws-sdk/client-redshift": "3.632.0",
"@aws-sdk/client-redshift-data": "3.632.0",
"@aws-sdk/client-secrets-manager": "3.632.0",
"@types/jest": "^29.5.12",
"aws-cdk-lib": "0.0.0",
"constructs": "^10.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/cloudformation-diff/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"devDependencies": {
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@aws-sdk/client-cloudformation": "^3.529.1",
"@aws-sdk/client-cloudformation": "3.662.0",
"@types/jest": "^29.5.12",
"@types/string-width": "^4.0.1",
"fast-check": "^3.22.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { EKS } from '@aws-sdk/client-eks';
// eslint-disable-next-line import/no-extraneous-dependencies
import { fromTemporaryCredentials } from '@aws-sdk/credential-providers';
// eslint-disable-next-line import/no-extraneous-dependencies
import { NodeHttpHandler } from '@aws-sdk/node-http-handler';
import { NodeHttpHandler } from '@smithy/node-http-handler';
// eslint-disable-next-line import/no-extraneous-dependencies
import { ProxyAgent } from 'proxy-agent';
import { ClusterResourceHandler } from './cluster';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Route53, waitUntilResourceRecordSetsChanged } from '@aws-sdk/client-route-53'; // eslint-disable-line import/no-extraneous-dependencies
import { Route53, RRType, waitUntilResourceRecordSetsChanged } from '@aws-sdk/client-route-53'; // eslint-disable-line import/no-extraneous-dependencies

interface ResourceProperties {
HostedZoneId: string;
RecordName: string;
RecordType: string;
RecordType: RRType;
}

export async function handler(event: AWSLambda.CloudFormationCustomResourceEvent) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/* eslint-disable no-console */

/* eslint-disable import/no-extraneous-dependencies */
import { Lambda, InvocationResponse } from '@aws-sdk/client-lambda';
import { NodeHttpHandler } from '@aws-sdk/node-http-handler';
import { Lambda, InvocationResponse, InvocationType } from '@aws-sdk/client-lambda';
import { NodeHttpHandler } from '@smithy/node-http-handler';

export type DecodedInvocationResponse = Omit<InvocationResponse, 'Payload'> & {
Payload?: string
}

export type InvokeFunction = (functionName: string, invocationType: string, timeout: number) => Promise<DecodedInvocationResponse>;
export type InvokeFunction = (functionName: string, invocationType: InvocationType, timeout: number) => Promise<DecodedInvocationResponse>;

const decodePayload = (payload?: Uint8Array): string | undefined => {
if (!payload) {
Expand Down
50 changes: 25 additions & 25 deletions packages/@aws-cdk/custom-resource-handlers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,26 @@
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@aws-cdk/aws-custom-resource-sdk-adapter": "0.0.0",
"@aws-sdk/client-ecs": "3.451.0",
"@aws-sdk/client-ssm": "3.453.0",
"@aws-sdk/client-kinesis": "3.451.0",
"@aws-sdk/client-codepipeline": "3.451.0",
"@aws-sdk/client-redshift": "3.452.0",
"@aws-sdk/client-account": "3.451.0",
"@aws-sdk/client-amplify": "3.451.0",
"@aws-sdk/s3-request-presigner": "3.451.0",
"@aws-sdk/client-ec2": "3.421.0",
"@aws-sdk/client-acm": "3.421.0",
"@aws-sdk/client-route-53": "3.421.0",
"@aws-sdk/client-cloudwatch-logs": "3.421.0",
"@aws-sdk/client-dynamodb": "3.421.0",
"@aws-sdk/client-eks": "3.476.0",
"@aws-sdk/client-sts": "3.421.0",
"@aws-sdk/node-http-handler": "^3.370.0",
"@smithy/util-stream": "^2.2.0",
"@aws-sdk/client-ecs": "3.632.0",
"@aws-sdk/client-ssm": "3.632.0",
"@aws-sdk/client-kinesis": "3.632.0",
"@aws-sdk/client-codepipeline": "3.632.0",
"@aws-sdk/client-redshift": "3.632.0",
"@aws-sdk/client-account": "3.632.0",
"@aws-sdk/client-amplify": "3.632.0",
"@aws-sdk/s3-request-presigner": "3.632.0",
"@aws-sdk/client-ec2": "3.632.0",
"@aws-sdk/client-acm": "3.632.0",
"@aws-sdk/client-route-53": "3.632.0",
"@aws-sdk/client-cloudwatch-logs": "3.632.0",
"@aws-sdk/client-dynamodb": "3.632.0",
"@aws-sdk/client-eks": "3.632.0",
"@aws-sdk/client-sts": "3.632.0",
"@smithy/node-http-handler": "3.2.4",
"@smithy/util-stream": "3.1.9",
"@types/jest": "^29.5.12",
"aws-sdk-client-mock": "^3.1.0",
"aws-sdk-client-mock-jest": "^3.1.0",
"aws-sdk-client-mock": "4.0.1",
"aws-sdk-client-mock-jest": "4.0.1",
"@cdklabs/typewriter": "^0.0.3",
"jest": "^29.7.0",
"sinon": "^9.2.4",
Expand All @@ -57,12 +57,12 @@
},
"dependencies": {
"@aws-cdk/asset-node-proxy-agent-v6": "^2.1.0",
"@aws-sdk/client-lambda": "3.421.0",
"@aws-sdk/client-synthetics": "3.421.0",
"@aws-sdk/client-ecr": "3.421.0",
"@aws-sdk/client-kms": "3.451.0",
"@aws-sdk/client-s3": "3.421.0",
"@aws-sdk/client-cloudwatch": "3.421.0",
"@aws-sdk/client-lambda": "3.632.0",
"@aws-sdk/client-synthetics": "3.632.0",
"@aws-sdk/client-ecr": "3.632.0",
"@aws-sdk/client-kms": "3.632.0",
"@aws-sdk/client-s3": "3.632.0",
"@aws-sdk/client-cloudwatch": "3.632.0",
"p-limit": "^3.1.0"
},
"repository": {
Expand Down
12 changes: 6 additions & 6 deletions packages/@aws-cdk/integ-tests-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@
"@aws-cdk/integ-runner": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@aws-cdk/aws-custom-resource-sdk-adapter": "0.0.0",
"@aws-sdk/client-ec2": "3.421.0",
"@aws-sdk/client-s3": "3.421.0",
"@aws-sdk/client-sfn": "3.421.0",
"@aws-sdk/types": "^3.433.0",
"@aws-sdk/client-ec2": "3.632.0",
"@aws-sdk/client-s3": "3.632.0",
"@aws-sdk/client-sfn": "3.632.0",
"@smithy/types": "3.5.0",
"@types/fs-extra": "^9.0.13",
"@types/jest": "^29.5.12",
"aws-sdk-client-mock": "^3.1.0",
"aws-sdk-client-mock-jest": "^3.1.0",
"aws-sdk-client-mock": "4.0.1",
"aws-sdk-client-mock-jest": "4.0.1",
"jest": "^29.7.0",
"nock": "^13.5.5",
"sinon": "^9.2.4",
Expand Down
42 changes: 21 additions & 21 deletions packages/aws-cdk-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,33 +142,33 @@
"@aws-cdk/pkglint": "0.0.0",
"@aws-cdk/aws-custom-resource-sdk-adapter": "0.0.0",
"@aws-cdk/spec2cdk": "0.0.0",
"@aws-sdk/client-acm": "3.421.0",
"@aws-sdk/client-account": "3.421.0",
"@aws-sdk/client-codepipeline": "3.421.0",
"@aws-sdk/client-cloudwatch-logs": "3.421.0",
"@aws-sdk/client-dynamodb": "3.421.0",
"@aws-sdk/client-ec2": "3.421.0",
"@aws-sdk/client-ecr": "3.421.0",
"@aws-sdk/client-eks": "3.421.0",
"@aws-sdk/client-iam": "3.421.0",
"@aws-sdk/client-lambda": "3.421.0",
"@aws-sdk/client-route-53": "3.421.0",
"@aws-sdk/client-s3": "3.421.0",
"@aws-sdk/client-sfn": "3.421.0",
"@aws-sdk/client-ssm": "3.421.0",
"@aws-sdk/client-sts": "3.421.0",
"@aws-sdk/credential-providers": "3.421.0",
"@aws-sdk/node-http-handler": "^3.370.0",
"@aws-sdk/types": "^3.433.0",
"@smithy/util-stream": "^2.2.0",
"@aws-sdk/client-acm": "3.632.0",
"@aws-sdk/client-account": "3.632.0",
"@aws-sdk/client-codepipeline": "3.632.0",
"@aws-sdk/client-cloudwatch-logs": "3.632.0",
"@aws-sdk/client-dynamodb": "3.632.0",
"@aws-sdk/client-ec2": "3.632.0",
"@aws-sdk/client-ecr": "3.632.0",
"@aws-sdk/client-eks": "3.632.0",
"@aws-sdk/client-iam": "3.632.0",
"@aws-sdk/client-lambda": "3.632.0",
"@aws-sdk/client-route-53": "3.632.0",
"@aws-sdk/client-s3": "3.632.0",
"@aws-sdk/client-sfn": "3.632.0",
"@aws-sdk/client-ssm": "3.632.0",
"@aws-sdk/client-sts": "3.632.0",
"@aws-sdk/credential-providers": "3.632.0",
"@smithy/node-http-handler": "3.2.4",
"@smithy/types": "3.5.0",
"@smithy/util-stream": "3.1.9",
"@types/aws-lambda": "^8.10.145",
"@types/jest": "^29.5.12",
"@types/lodash": "^4.17.7",
"@types/punycode": "^2.1.4",
"@types/mime-types": "^2.1.4",
"@aws-cdk/lazify": "0.0.0",
"aws-sdk-client-mock": "^3.1.0",
"aws-sdk-client-mock-jest": "^3.1.0",
"aws-sdk-client-mock": "4.0.1",
"aws-sdk-client-mock-jest": "4.0.1",
"cdk8s": "2.69.0",
"constructs": "^10.0.0",
"delay": "5.0.0",
Expand Down
31 changes: 10 additions & 21 deletions tools/@aws-cdk/cdk-build-tools/config/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
const { cpus } = require('os');

module.exports = {
// The preset deals with preferring TS over JS
moduleFileExtensions: [
// .ts first to prefer a ts over a js if present
'ts',
'js',
],
testMatch: [
'<rootDir>/test/**/?(*.)+(test).ts',
],
testMatch: ['<rootDir>/test/**/?(*.)+(test).ts'],

// Transform TypeScript using ts-jest. Use of this preset still requires the depending
// package to depend on `ts-jest` directly.
Expand All @@ -32,20 +28,13 @@ module.exports = {
},
},
collectCoverage: true,
coverageReporters: [
'lcov',
'html',
'text-summary',
['text', { file: 'coverage.txt' }],
],
coveragePathIgnorePatterns: [
'\\.generated\\.[jt]s$',
'<rootDir>/test/',
'.warnings.jsii.js$',
'/node_modules/',
],
reporters: [
'default',
['jest-junit', { suiteName: 'jest tests', outputDirectory: 'coverage' }],
],
coverageReporters: ['lcov', 'html', 'text-summary', ['text', { file: 'coverage.txt' }]],
coveragePathIgnorePatterns: ['\\.generated\\.[jt]s$', '<rootDir>/test/', '.warnings.jsii.js$', '/node_modules/'],
reporters: ['default', ['jest-junit', { suiteName: 'jest tests', outputDirectory: 'coverage' }]],
/**
* This will still show us helpful information when running tests but remove console statements.
* The exception is when we use our custom logger in the CLI or when other processes are spun up
* within tests. It has no impact there.
*/
silent: true,
};
Loading