Skip to content

Commit 7d483b4

Browse files
ShadowCat567Vieltojarviaws-amplify-bot
authored
Add warnings for Pinpoint categories (#14218)
* chore: add warnings for pinpoint categories * chore: updated warning messages, added warnings for interactions * chore: update warnings --------- Co-authored-by: Vieltojarvi <[email protected]> Co-authored-by: aws-amplify-bot <[email protected]>
1 parent 018856a commit 7d483b4

File tree

8 files changed

+27
-1
lines changed

8 files changed

+27
-1
lines changed

packages/amplify-category-analytics/src/commands/analytics/add.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ let options: $TSAny;
1616
export const run = async (context: $TSContext): Promise<$TSAny> => {
1717
const { amplify } = context;
1818
const servicesMetadata = amplify.readJsonFile(`${__dirname}/../../provider-utils/supported-services.json`);
19+
printer.warn(`Amazon Pinpoint is reaching end of life on October 30, 2026 and no longer accepts new customers as of May 20, 2025.
20+
It is recommended you use Kinesis for event collection and mobile analytics instead.\n`);
21+
1922
return amplify
2023
.serviceSelectionPrompt(context, category, servicesMetadata, 'Select an Analytics provider')
2124
.then((result) => {

packages/amplify-category-analytics/src/commands/analytics/push.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { $TSAny, $TSContext } from '@aws-amplify/amplify-cli-core';
2+
import { printer } from '@aws-amplify/amplify-prompts';
23

34
const subcommand = 'push';
45
const category = 'analytics';
@@ -11,6 +12,8 @@ export const run = async (context: $TSContext): Promise<$TSAny> => {
1112
const { amplify, parameters } = context;
1213
const resourceName = parameters.first;
1314
context.amplify.constructExeInfo(context);
15+
printer.warn(`Amazon Pinpoint is reaching end of life on October 30, 2026 and no longer accepts new customers as of May 20, 2025.
16+
If you are using Pinpoint, it is recommended you use Kinesis for event collection and mobile analytics instead.\n`);
1417
return amplify.pushResources(context, category, resourceName);
1518
};
1619

packages/amplify-category-analytics/src/commands/analytics/update.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ const category = 'analytics';
1212
export const run = async (context: $TSContext): Promise<$TSAny> => {
1313
const { amplify } = context;
1414
const servicesMetadata = amplify.readJsonFile(`${__dirname}/../../provider-utils/supported-services.json`);
15+
printer.warn(`Amazon Pinpoint is reaching end of life on October 30, 2026 and no longer accepts new customers as of May 20, 2025.
16+
If you are using Pinpoint, it is recommended you use Kinesis for event collection and mobile analytics instead.\n`);
1517

1618
return amplify
1719
.serviceSelectionPrompt(context, category, servicesMetadata)

packages/amplify-category-interactions/src/commands/interactions/push.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ module.exports = {
77
const { amplify, parameters } = context;
88
const resourceName = parameters.first;
99
context.amplify.constructExeInfo(context);
10+
context.print
11+
.warning(`Amazon Lex V1 is reaching end of life on September 15, 2025 and no longer allows creation of new bots as of March 31, 2025.
12+
It is recommended that you migrate your bot to Amazon Lex V2 before September 15. \n`);
1013
return amplify.pushResources(context, category, resourceName).catch((err) => {
1114
context.print.info(err.stack);
1215
context.print.error('There was an error pushing the interactions resource');

packages/amplify-category-interactions/src/commands/interactions/update.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ module.exports = {
77
alias: ['configure'],
88
run: async (context) => {
99
const { amplify } = context;
10+
context.print
11+
.warning(`Amazon Lex V1 is reaching end of life on September 15, 2025 and no longer allows creation of new bots as of March 31, 2025.
12+
It is recommended that you migrate your bot to Amazon Lex V2 before September 15. \n`);
1013

1114
return amplify
1215
.serviceSelectionPrompt(context, category, servicesMetadata)

packages/amplify-category-notifications/src/commands/notifications/add.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ export const run = async (context: $TSContext): Promise<$TSContext> => {
5757
});
5858
}
5959

60+
printer.warn(`Amazon Pinpoint is reaching end of life on October 30, 2026 and no longer accepts new customers as of May 20, 2025.
61+
It is recommended you use use AWS End User Messaging for push notifications and SMS, Amazon Simple Email Service for sending emails, Amazon Connect for campaigns, journeys, endpoints, and engagement analytics.
62+
For more information see: https://docs.aws.amazon.com/pinpoint/latest/userguide/migrate.html \n`);
63+
6064
const availableChannels: Array<string> = getAvailableChannels();
6165
const disabledChannels: Array<string> = await getDisabledChannelsFromAmplifyMeta();
6266

packages/amplify-category-notifications/src/commands/notifications/configure.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { $TSContext, AmplifyError } from '@aws-amplify/amplify-cli-core';
2-
import { prompter } from '@aws-amplify/amplify-prompts';
2+
import { prompter, printer } from '@aws-amplify/amplify-prompts';
33
import * as pinpointHelper from '../../pinpoint-helper';
44
import * as notificationManager from '../../notifications-manager';
55
import { IChannelAPIResponse } from '../../channel-types';
@@ -25,6 +25,10 @@ export const alias = 'update';
2525
* @returns context with notifications metadata updated
2626
*/
2727
export const run = async (context: $TSContext): Promise<$TSContext> => {
28+
printer.warn(`Amazon Pinpoint is reaching end of life on October 30, 2026 and no longer accepts new customers as of May 20, 2025.
29+
It is recommended you use use AWS End User Messaging for push notifications and SMS, Amazon Simple Email Service for sending emails, Amazon Connect for campaigns, journeys, endpoints, and engagement analytics.
30+
For more information see: https://docs.aws.amazon.com/pinpoint/latest/userguide/migrate.html \n`);
31+
2832
const availableChannelViewNames = getAvailableChannelViewNames();
2933
let channelViewName = context.parameters.first ? getChannelViewName(context.parameters.first) : undefined;
3034

packages/amplify-category-notifications/src/commands/notifications/status.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ const viewStyles = {
2121
};
2222

2323
const getDeployedStyledStatus = (deployedChannel: string, deployedChannels: IChannelAvailability, configuredState: string): string => {
24+
printer.warn(`Amazon Pinpoint is reaching end of life on October 30, 2026 and no longer accepts new customers as of May 20, 2025.
25+
It is recommended you use use AWS End User Messaging for push notifications and SMS, Amazon Simple Email Service for sending emails, Amazon Connect for campaigns, journeys, endpoints, and engagement analytics.
26+
For more information see: https://docs.aws.amazon.com/pinpoint/latest/userguide/migrate.html \n`);
27+
2428
if (deployedChannels.enabledChannels.includes(deployedChannel)) {
2529
if (configuredState === 'Enabled') {
2630
return viewStyles.deployed('Deployed');

0 commit comments

Comments
 (0)