Skip to content

Commit

Permalink
feat: Add SSM endpoint to AWS credentials (#12212)
Browse files Browse the repository at this point in the history
  • Loading branch information
Stamsy authored Jan 21, 2025
1 parent fb4cb5a commit 565c7b8
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions packages/nodes-base/credentials/Aws.credentials.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ export type AwsCredentialsType = {
sesEndpoint?: string;
sqsEndpoint?: string;
s3Endpoint?: string;
ssmEndpoint?: string;
};

// Some AWS services are global and don't have a region
Expand Down Expand Up @@ -294,6 +295,19 @@ export class Aws implements ICredentialType {
default: '',
placeholder: 'https://s3.{region}.amazonaws.com',
},
{
displayName: 'SSM Endpoint',
name: 'ssmEndpoint',
description: 'Endpoint for AWS Systems Manager (SSM)',
type: 'string',
displayOptions: {
show: {
customEndpoints: [true],
},
},
default: '',
placeholder: 'https://ssm.{region}.amazonaws.com',
},
];

async authenticate(
Expand Down Expand Up @@ -356,6 +370,8 @@ export class Aws implements ICredentialType {
endpointString = credentials.sqsEndpoint;
} else if (service) {
endpointString = `https://${service}.${region}.amazonaws.com`;
} else if (service === 'ssm' && credentials.ssmEndpoint) {
endpointString = credentials.ssmEndpoint;
}
endpoint = new URL(endpointString!.replace('{region}', region) + path);
} else {
Expand Down

0 comments on commit 565c7b8

Please sign in to comment.