Skip to content
Draft
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
77a1e9e
refactor: start provider-cloudformation
Jul 11, 2025
aca2d07
refactor: category storage
Jul 14, 2025
28e12ba
chore: returning aws-sdk for now
Jul 15, 2025
6bb961e
fix: yarn lock
Jul 15, 2025
4b26596
fix: some adjustments
Jul 16, 2025
53cb005
fix: fixed some tests
Jul 16, 2025
ba3238d
refactor: most of provider-awscloudformation
Jul 17, 2025
d2a8a87
fix: import lex
Jul 17, 2025
ef3fe96
refactor: last set of non-test files
Jul 17, 2025
ccb5895
refactor: updated some unit tests
Jul 18, 2025
6da13ea
Merge branch 'dev' into sdk-migrations-2.5
Jul 18, 2025
b4cc448
chore: post merge removals
Jul 18, 2025
c780d67
refactor: unit tests
Jul 18, 2025
953656f
fix: lint, api, yarn
Jul 18, 2025
558de09
fix: init, delete, and push commands
Aug 5, 2025
da54da4
fix: publish, add hosting
Aug 6, 2025
9d833a1
chore: debugging
Aug 6, 2025
5f9abfc
fix: pull
Aug 7, 2025
3bf519a
fix: push and pull
Aug 7, 2025
2c57be9
fix: pull and debugging
Aug 7, 2025
94c5f03
Merge branch 'dev' into sdk-migrations-2.5
Aug 7, 2025
c353d50
chore: debugging
Aug 8, 2025
30d0f93
fix: update
Aug 8, 2025
dafab7a
fix: typing
Aug 9, 2025
4ed8adc
refactor: switch credentials object over to sdk v3 object
Aug 12, 2025
de651f2
fix: sdk v3 creds config in tests
Aug 12, 2025
ff3706b
fix: legacy sdk v2 creds, api
Aug 12, 2025
7164c6a
fix: feedback
Aug 19, 2025
8033901
fix: update types to 20, function mocks
Aug 19, 2025
237554d
fix: test
Aug 19, 2025
d10ec78
fix: another test
Aug 19, 2025
af3919b
refactor: console hosting
Aug 20, 2025
56c3fed
chore: fix yarn and debugging
Aug 20, 2025
5074543
fix: function secrets
Aug 21, 2025
f297ef5
fix: secrets
Aug 21, 2025
e85dea9
chore: debugging
Aug 21, 2025
033b301
chore: debugging
Aug 22, 2025
2521f89
chore: update tests
Aug 22, 2025
6e51d20
chore: debugging
Sep 3, 2025
a4981ee
chore: debugging
Sep 3, 2025
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
"@types/glob": "^7.1.1",
"@types/jest": "^29.0.0",
"@types/js-yaml": "^4.0.0",
"@types/node": "^18.16.1",
"@types/node": "^20.9.0",
"@types/yargs": "^17",
"@typescript-eslint/eslint-plugin": "^5.34.0",
"@typescript-eslint/parser": "^5.34.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/amplify-appsync-simulator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"@aws-amplify/amplify-graphiql-explorer": "2.6.2",
"@types/cors": "^2.8.6",
"@types/express": "^4.17.3",
"@types/node": "^12.12.6",
"@types/node": "^20.9.0",
"@types/ws": "^8.2.2",
"jose": "^5.2.0"
},
Expand Down
3 changes: 2 additions & 1 deletion packages/amplify-category-storage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@
"@aws-amplify/amplify-prompts": "2.8.7",
"@aws-amplify/amplify-util-import": "2.8.3",
"@aws-amplify/cli-extensibility-helper": "3.0.39",
"@aws-sdk/client-dynamodb": "^3.515.0",
"@aws-sdk/client-s3": "^3.515.0",
"amplify-headless-interface": "1.17.8",
"amplify-util-headless-input": "1.9.19",
"aws-cdk-lib": "~2.189.1",
"aws-sdk": "^2.1464.0",
"chalk": "^4.1.1",
"constructs": "^10.0.5",
"enquirer": "^2.3.6",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
} from '@aws-amplify/amplify-cli-core';
import { printer } from '@aws-amplify/amplify-prompts';
import { IS3Service } from '@aws-amplify/amplify-util-import';
import { Bucket } from 'aws-sdk/clients/s3';
import { Bucket } from '@aws-sdk/client-s3';
import Enquirer from 'enquirer';
import _ from 'lodash';
import { v4 as uuid } from 'uuid';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { $TSContext, $TSObject } from '@aws-amplify/amplify-cli-core';
import { IDynamoDBService, IS3Service } from '@aws-amplify/amplify-util-import';
import { Bucket } from 'aws-sdk/clients/s3';
import { TableDescription } from 'aws-sdk/clients/dynamodb';
import { Bucket } from '@aws-sdk/client-s3';
import { TableDescription } from '@aws-sdk/client-dynamodb';

// parameters.json
export type S3ResourceParameters = {
Expand Down
2 changes: 1 addition & 1 deletion packages/amplify-cli-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"@types/hjson": "^2.4.2",
"@types/json-schema": "^7.0.5",
"@types/lodash": "^4.14.149",
"@types/node": "^12.12.6",
"@types/node": "^20.9.0",
"@types/rimraf": "^3.0.0",
"@types/uuid": "^8.0.0",
"@types/yarnpkg__lockfile": "^1.1.5",
Expand Down
3 changes: 2 additions & 1 deletion packages/amplify-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
"@aws-amplify/amplify-util-mock": "5.10.16",
"@aws-amplify/amplify-util-uibuilder": "1.14.20",
"@aws-cdk/cloudformation-diff": "~2.68.0",
"@aws-sdk/client-amplify": "^3.624.0",
"amplify-codegen": "^4.10.3",
"amplify-dotnet-function-runtime-provider": "2.1.5",
"amplify-go-function-runtime-provider": "2.3.52",
Expand Down Expand Up @@ -112,7 +113,7 @@
"@types/fs-extra": "^8.0.1",
"@types/glob": "^7.1.1",
"@types/gunzip-maybe": "^1.4.0",
"@types/node": "^12.12.6",
"@types/node": "^20.9.0",
"@types/node-fetch": "^2.6.12",
"@types/progress": "^2.0.3",
"@types/promise-sequential": "^1.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,27 +31,29 @@ jest.mock('@aws-amplify/amplify-cli-core', () => ({
jest.mock('../../../extensions/amplify-helpers/get-plugin-instance', () => ({
getPluginInstance: jest.fn().mockReturnValue({
getConfiguredAmplifyClient: jest.fn().mockResolvedValue({
listBackendEnvironments: jest.fn().mockReturnValue({
promise: jest
.fn()
.mockImplementationOnce(() => ({
send: jest
.fn()
// first ListBackendEnv Call
.mockImplementationOnce(() =>
Promise.resolve({
backendEnvironments: [],
}))
.mockImplementationOnce(() => {
throw new Error('listBackendEnvironments error');
})
.mockImplementationOnce(() => {
// eslint-disable-next-line no-throw-literal
throw {
name: 'BucketNotFoundError',
message: 'Bucket not found',
link: 'https://docs.aws.amazon.com/',
};
}),
}),
deleteApp: jest.fn().mockReturnValue({
promise: jest.fn().mockResolvedValue(true),
}),
)
// DeleteApp call
.mockImplementationOnce(() => Promise.resolve(true))
// second ListBackendEnv Call
.mockImplementationOnce(() => {
throw new Error('listBackendEnvironments error');
})
// third ListBackendEnv Call
.mockImplementationOnce(() => {
// eslint-disable-next-line no-throw-literal
throw {
name: 'BucketNotFoundError',
message: 'Bucket not found',
link: 'https://docs.aws.amazon.com/',
};
}),
}),
}),
}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/* eslint-disable @typescript-eslint/no-var-requires */
import ora from 'ora';
import chalk from 'chalk';
import { ListBackendEnvironmentsCommand, DeleteAppCommand } from '@aws-sdk/client-amplify';
import { FeatureFlags, $TSContext, AmplifyFault } from '@aws-amplify/amplify-cli-core';
import { printer, prompter } from '@aws-amplify/amplify-prompts';
import { removeEnvFromCloud } from './remove-env-from-cloud';
Expand Down Expand Up @@ -37,7 +38,7 @@ export const deleteProject = async (context: $TSContext): Promise<void> => {
const amplifyClient = await awsCloudPlugin.getConfiguredAmplifyClient(context, {});
const environments = await amplifyBackendEnvironments(amplifyClient, appId);
if (environments.length === 0) {
await amplifyClient.deleteApp({ appId }).promise();
await amplifyClient.send(new DeleteAppCommand({ appId }));
} else {
printer.warn('Amplify App cannot be deleted, other environments still linked to Application');
}
Expand Down Expand Up @@ -77,11 +78,7 @@ const removeLocalAmplifyDir = (context: $TSContext): void => {
};

const amplifyBackendEnvironments = async (client, appId): Promise<string[]> => {
const data = await client
.listBackendEnvironments({
appId,
})
.promise();
const data = await client.send(new ListBackendEnvironmentsCommand({ appId }));
return data.backendEnvironments;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"which": "^2.0.2"
},
"devDependencies": {
"@types/node": "^12.12.6",
"@types/node": "^20.9.0",
"@types/which": "^1.3.2"
},
"berry": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"devDependencies": {
"@types/inquirer": "^6.5.0",
"@types/lodash": "^4.14.149",
"@types/node": "^12.12.6"
"@types/node": "^20.9.0"
},
"berry": {
"plugins": [
Expand Down
2 changes: 1 addition & 1 deletion packages/amplify-e2e-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"@types/body-parser": "^1.19.2",
"@types/express": "^4.17.3",
"@types/lodash": "^4.14.149",
"@types/node": "^18.16.1",
"@types/node": "^20.9.0",
"@types/openpgp": "^4.4.18",
"@types/ws": "^7.4.4",
"jest": "^29.7.0",
Expand Down
5 changes: 5 additions & 0 deletions packages/amplify-e2e-tests/src/init-special-cases/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,17 @@ export async function initWithoutCredentialFileAndNoNewUserSetup(projRoot) {
}
await initWorkflow(projRoot, settings);
} finally {
console.log('resetting credentials and config files');
if (fs.existsSync(configFilePathHide)) {
fs.renameSync(configFilePathHide, configFilePath);
}
if (fs.existsSync(credentialsFilePathHide)) {
fs.renameSync(credentialsFilePathHide, credentialsFilePath);
}
process.env.AWS_ACCESS_KEY_ID = settings.accessKeyId;
process.env.AWS_SECRET_ACCESS_KEY = settings.secretAccessKey;
process.env.AWS_DEFAULT_REGION = settings.region;
process.env.AWS_REGION = settings.region;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
},
"devDependencies": {
"@types/archiver": "^5.1.1",
"@types/node": "^12.12.6",
"@types/node": "^20.9.0",
"@types/semver": "^7.1.0",
"@types/which": "^1.3.2"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
"devDependencies": {
"@types/fs-extra": "^8.0.1",
"@types/lodash": "^4.14.149",
"@types/node": "^12.12.6"
"@types/node": "^20.9.0"
}
}
2 changes: 1 addition & 1 deletion packages/amplify-graphiql-explorer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"devDependencies": {
"@semantic-ui-react/css-patch": "^1.0.0",
"@types/jest": "^29.5.1",
"@types/node": "^12.12.6",
"@types/node": "^20.9.0",
"@types/react": "^17.0.39",
"@types/react-dom": "^17.0.11"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"which": "^2.0.2"
},
"devDependencies": {
"@types/node": "^12.12.6",
"@types/node": "^20.9.0",
"@types/semver": "^7.1.0",
"@types/which": "^1.3.2"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
},
"devDependencies": {
"@types/exit": "^0.1.31",
"@types/node": "^12.12.6",
"@types/node": "^20.9.0",
"@types/semver": "^7",
"semver": "^7.5.4"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"devDependencies": {
"@types/fs-extra": "^8.0.1",
"@types/inquirer": "^6.5.0",
"@types/node": "^12.12.6"
"@types/node": "^20.9.0"
},
"berry": {
"plugins": [
Expand Down
2 changes: 1 addition & 1 deletion packages/amplify-opensearch-simulator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"wait-port": "^0.2.7"
},
"devDependencies": {
"@types/node": "^12.12.6",
"@types/node": "^20.9.0",
"@types/openpgp": "^4.4.19",
"uuid": "^8.3.2"
},
Expand Down
16 changes: 9 additions & 7 deletions packages/amplify-provider-awscloudformation/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,30 @@
import { $TSAny } from '@aws-amplify/amplify-cli-core';
import { $TSContext } from '@aws-amplify/amplify-cli-core';
import { $TSObject } from '@aws-amplify/amplify-cli-core';
import * as AWS_2 from 'aws-sdk';
import { CognitoIdentityProviderClient } from '@aws-sdk/client-cognito-identity-provider';
import { IAmplifyResource } from '@aws-amplify/amplify-cli-core';
import { LocationClient } from '@aws-sdk/client-location';
import { NodeHttpHandler } from '@smithy/node-http-handler';
import { SSMClient } from '@aws-sdk/client-ssm';
import { Template } from '@aws-amplify/amplify-cli-core';

// @public (undocumented)
export interface AwsSdkConfig {
// (undocumented)
accessKeyId: string;
// (undocumented)
expiration?: Date;
credentials: {
accessKeyId: string;
secretAccessKey: string;
sessionToken?: string;
expiration?: Date;
};
// (undocumented)
httpOptions?: {
agent: $TSAny;
};
// (undocumented)
region: string;
// (undocumented)
secretAccessKey: string;
// (undocumented)
sessionToken?: string;
requestHandler?: NodeHttpHandler;
}

// @public (undocumented)
Expand Down
28 changes: 26 additions & 2 deletions packages/amplify-provider-awscloudformation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,34 @@
"@aws-amplify/cli-extensibility-helper": "3.0.39",
"@aws-amplify/graphql-transformer-core": "^2.11.1",
"@aws-amplify/graphql-transformer-interfaces": "^3.12.0",
"@aws-sdk/client-amplify": "^3.624.0",
"@aws-sdk/client-api-gateway": "^3.624.0",
"@aws-sdk/client-appsync": "^3.624.0",
"@aws-sdk/client-cloudformation": "^3.624.0",
"@aws-sdk/client-cognito-identity": "^3.624.0",
"@aws-sdk/client-cognito-identity-provider": "^3.624.0",
"@aws-sdk/client-dynamodb": "^3.624.0",
"@aws-sdk/client-ec2": "^3.624.0",
"@aws-sdk/client-ecr": "^3.624.0",
"@aws-sdk/client-iam": "^3.624.0",
"@aws-sdk/client-lambda": "^3.624.0",
"@aws-sdk/client-lex-model-building-service": "^3.624.0",
"@aws-sdk/client-location": "^3.624.0",
"@aws-sdk/client-polly": "^3.624.0",
"@aws-sdk/client-route-53": "^3.624.0",
"@aws-sdk/client-s3": "^3.624.0",
"@aws-sdk/client-sagemaker": "^3.624.0",
"@aws-sdk/client-secrets-manager": "^3.624.0",
"@aws-sdk/client-sns": "^3.624.0",
"@aws-sdk/client-ssm": "^3.624.0",
"@aws-sdk/client-sts": "^3.624.0",
"@aws-sdk/credential-provider-node": "^3.624.0",
"@aws-sdk/credential-providers": "^3.624.0",
"@aws-sdk/lib-dynamodb": "^3.624.0",
"@aws-sdk/lib-storage": "^3.624.0",
"@aws-sdk/s3-request-presigner": "^3.624.0",
"@aws-sdk/types": "^3.624.0",
"@smithy/node-http-handler": "^4.0.6",
"@smithy/node-http-handler": "^4.1.0",
"amplify-codegen": "^4.10.3",
"archiver": "^7.0.1",
"aws-cdk-lib": "~2.189.1",
Expand Down Expand Up @@ -80,8 +102,10 @@
"@types/deep-diff": "^1.0.0",
"@types/folder-hash": "^4.0.1",
"@types/lodash.throttle": "^4.1.6",
"@types/node": "^18.16.0",
"@types/node": "^20.9.0",
"@types/uuid": "^8.0.0",
"aws-sdk-client-mock": "^4.1.0",
"aws-sdk-client-mock-jest": "^4.1.0",
"jest": "^29.7.0",
"typescript": "^4.9.5"
},
Expand Down
Loading
Loading