Skip to content

Commit a536cb3

Browse files
committed
feat(integ-runner): add profile support to toolkit-lib engine
1 parent 8ac049e commit a536cb3

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

packages/@aws-cdk/integ-runner/lib/engines/toolkit-lib.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ export interface ToolkitLibEngineOptions {
3333
* The region the CDK app should synthesize itself for
3434
*/
3535
readonly region: string;
36+
37+
/**
38+
* The AWS profile to use when authenticating
39+
*
40+
* @default - no profile is passed, the default profile is used
41+
*/
42+
readonly profile?: string;
3643
}
3744

3845
/**
@@ -56,6 +63,7 @@ export class ToolkitLibRunnerEngine implements ICdk {
5663
ioHost: this.showOutput ? this.ioHost : new NoopIoHost(),
5764
sdkConfig: {
5865
baseCredentials: BaseCredentials.awsCliCompatible({
66+
profile: options.profile,
5967
defaultRegion: options.region,
6068
}),
6169
},

packages/@aws-cdk/integ-runner/lib/runner/engine.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export function makeEngine(options: IntegRunnerOptions): ICdk {
2020
showOutput: options.showOutput,
2121
env: options.env,
2222
region: options.region,
23+
profile: options.profile,
2324
});
2425
case 'cli-wrapper':
2526
default:

0 commit comments

Comments
 (0)