Skip to content

Commit b20e150

Browse files
authored
fix(sam): link to "sam sync" documentation #3196
1 parent a62f179 commit b20e150

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

src/shared/constants.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ export const samDeployDocUrl: string = isCloud9()
4949
? 'https://docs.aws.amazon.com/cloud9/latest/user-guide/serverless-apps-toolkit.html#deploy-serverless-app'
5050
: 'https://docs.aws.amazon.com/toolkit-for-vscode/latest/userguide/serverless-apps.html#serverless-apps-deploy'
5151
export const lambdaFunctionUrlConfigUrl: string = 'https://docs.aws.amazon.com/lambda/latest/dg/urls-configuration.html'
52+
// URLs for "sam sync" wizard.
53+
export const samSyncUrl: string =
54+
'https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/accelerate-getting-started.html'
5255

5356
// URLs for CDK
5457
export const cdkProvideFeedbackUrl: string = `${githubUrl}/issues/new/choose`

src/shared/sam/sync.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ import { parse } from 'semver'
4040
import { isAutomation } from '../vscode/env'
4141
import { getOverriddenParameters } from '../../lambda/config/parameterUtils'
4242
import { addTelemetryEnvVar } from './cli/samCliInvokerUtils'
43+
import { samSyncUrl } from '../constants'
4344

4445
export interface SyncParams {
4546
readonly region: string
@@ -68,7 +69,7 @@ function createBucketPrompter(client: DefaultS3Client) {
6869
return createQuickPick(items, {
6970
title: 'Select an S3 Bucket',
7071
placeholder: 'Filter or enter a new bucket name',
71-
buttons: createCommonButtons(),
72+
buttons: createCommonButtons(samSyncUrl),
7273
filterBoxInputSettings: {
7374
label: 'Create a New Bucket',
7475
// This is basically a hack. I need to refactor `createQuickPick` a bit.
@@ -100,7 +101,7 @@ function createStackPrompter(client: DefaultCloudFormationClient) {
100101
label: 'Create a New Stack',
101102
transform: v => v,
102103
},
103-
buttons: createCommonButtons(),
104+
buttons: createCommonButtons(samSyncUrl),
104105
})
105106
}
106107

@@ -118,7 +119,7 @@ function createEcrPrompter(client: DefaultEcrClient) {
118119
return createQuickPick(items, {
119120
title: 'Select an ECR Repository',
120121
placeholder: 'Filter or enter an existing repository URI',
121-
buttons: createCommonButtons(),
122+
buttons: createCommonButtons(samSyncUrl),
122123
filterBoxInputSettings: {
123124
label: 'Existing repository URI',
124125
transform: v => v,
@@ -137,7 +138,7 @@ export function createEnvironmentPrompter(config: SamConfig, environments = conf
137138

138139
return createQuickPick(items, {
139140
title: 'Select an Environment to Use',
140-
buttons: createCommonButtons(),
141+
buttons: createCommonButtons(samSyncUrl),
141142
})
142143
}
143144

@@ -166,7 +167,7 @@ function createTemplatePrompter() {
166167
const trimmedItems = folders.size === 1 ? items.map(item => ({ ...item, description: undefined })) : items
167168
return createQuickPick(trimmedItems, {
168169
title: 'Select a CloudFormation Template',
169-
buttons: createCommonButtons(),
170+
buttons: createCommonButtons(samSyncUrl),
170171
})
171172
}
172173

0 commit comments

Comments
 (0)