diff --git a/packages/nodes-base/credentials/Aws.credentials.ts b/packages/nodes-base/credentials/Aws.credentials.ts index 26649c29b3f51..f0b454ab56a77 100644 --- a/packages/nodes-base/credentials/Aws.credentials.ts +++ b/packages/nodes-base/credentials/Aws.credentials.ts @@ -3,6 +3,120 @@ import { INodeProperties, } from 'n8n-workflow'; +export const regions = [ + { + name: 'af-south-1', + displayName: 'Africa', + location: 'Cape Town', + }, + { + name: 'ap-east-1', + displayName: 'Asia Pacific', + location: 'Hong Kong', + }, + { + name: 'ap-south-1', + displayName: 'Asia Pacific', + location: 'Mumbai', + }, + { + name: 'ap-southeast-1', + displayName: 'Asia Pacific', + location: 'Singapore', + }, + { + name: 'ap-southeast-2', + displayName: 'Asia Pacific', + location: 'Sydney', + }, + { + name: 'ap-southeast-3', + displayName: 'Asia Pacific', + location: 'Jakarta', + }, + { + name: 'ap-northeast-1', + displayName: 'Asia Pacific', + location: 'Tokyo', + }, + { + name: 'ap-northeast-2', + displayName: 'Asia Pacific', + location: 'Seoul', + }, + { + name: 'ap-northeast-3', + displayName: 'Asia Pacific', + location: 'Osaka', + }, + { + name: 'ca-central-1', + displayName: 'Canada', + location: 'Central', + }, + { + name: 'eu-central-1', + displayName: 'Europe', + location: 'Frankfurt', + }, + { + name: 'eu-north-1', + displayName: 'Europe', + location: 'Stockholm', + }, + { + name: 'eu-south-1', + displayName: 'Europe', + location: 'Milan', + }, + { + name: 'eu-west-1', + displayName: 'Europe', + location: 'Ireland', + }, + { + name: 'eu-west-2', + displayName: 'Europe', + location: 'London', + }, + { + name: 'eu-west-3', + displayName: 'Europe', + location: 'Paris', + }, + { + name: 'me-south-1', + displayName: 'Middle East', + location: 'Bahrain', + }, + { + name: 'sa-east-1', + displayName: 'South America', + location: 'São Paulo', + }, + { + name: 'us-east-1', + displayName: 'US East', + location: 'N. Virginia', + }, + { + name: 'us-east-2', + displayName: 'US East', + location: 'Ohio', + }, + { + name: 'us-west-1', + displayName: 'US West', + location: 'N. California', + }, + { + name: 'us-west-2', + displayName: 'US West', + location: 'Oregon', + }, +] as const + +export type AWSRegion = typeof regions[number]['name'] export class Aws implements ICredentialType { name = 'aws'; @@ -13,7 +127,11 @@ export class Aws implements ICredentialType { { displayName: 'Region', name: 'region', - type: 'string', + type: 'options', + options: regions.map(r => ({ + name: `${r.displayName} (${r.location}) - ${r.name}`, + value: r.name, + })), default: 'us-east-1', }, {