def get_region_code(region_code):   
    """Returns region code corresponding to an AWS region abbreviation."""
    try:
        region_mapping = {'us-east-1': 'USE1', 'us-east-2': 'USE2',
                          'us-west-1': 'USW1', 'us-west-2': 'USW2',
                          'af-south-1': 'CPT',
                          'ap-northeast-1': 'APN1', 'ap-northeast-2': 'APN2',
                          'ap-northeast-3': 'APN3',
                          'ap-southeast-1': 'APS1', 'ap-southeast-2': 'APS2',
                          'ap-east-1': 'APE1',
                          'ap-south-1': 'APS3',
                          'ca-central-1': 'CAN1',
                          'eu-central-1': 'EUC1',
                          'eu-west-1': 'EU', 'eu-west-2': 'EUW2', 'eu-west-3': 'EUW3',
                          'eu-north-1': 'EUN1',
                          'me-south-1': 'MES1',
                          'sa-east-1': 'SAE1',
                          }
        return region_mapping.get(region_code)
    except Exception as e:
        return 'USE1'