How do i get started with Amazon Web Services for this scenario?
First-time:
Create a Postgres db - Depending on size(small or large), might want RDS or Redshift
Connect to Amazon Server - EC2
Download code to server - upload your programs to an S3 bucket
Once a month:
Download large data file to server - Move data to S3, if using redshift data can be loaded directly from s3 to redshift
Run code (written in python) to load database with data 
Run code (written in Java) to create a Lucene Search Index file from data in the database - might want to look into EMR with this
Continuously:
Run Java code in servlet container, this will use lucense search index file but DOES NOT require access to the database - If you have a java WAR file, you can host this using Elasticbean stalk
In order to connect to your database, you must make sure the security group allows for this connection, and for an ec2 you must make sure port 22 is open to your IP to conncet to it. It sounds like the security group for RDS isn't opening up port 3306.
I'm used to having a remote server I can use via ssh but I am looking at using Amazon Web Services for a new project to give me better performance and resilience at reduced costs but I'm struggling to understand how to  use it.
This is what I want to do:
First-time:

Create a Postgres db
Connect to Amazon Server
Download code to server

Once a month:

Download large data file to server
Run code (written in python) to load database with data
Run code (written in Java) to create a Lucene Search Index file from data in the database

Continuously:

Run Java code in servlet container, this will use lucense search index file but DOES NOT require access to the database.

Note: Technically I could create do the database population locally the trouble is the resultant lucene index file is about 5GB and I dont have a good enough Internet connection 
to upload a file of that size to Amazon.
All that I have managed to do so far is create a Postgres database but I don't understand how to connect to it or get a ssh/telnet connection to my server (I requested a Direct Connect but this seems to be a different service).
Update so far
FYI:

So I created a Postgres database using RDS
I created a Ubuntu linux installation using EC2
I connected to the linux installation using ssh
I installed required software (using apt-get)  
I downloaded data file to my linux installation

I think according to the installation should be able to connect to my Postgres db from my EC2 instance and even from my local machine however in both cases it just times out.
* Update 2 **
Probably security related but I cannot for the life of me understand what I'm meant to do with security groups ands why they don't make the EC2 instance able to talk to my database by default.
Ive checked both RDS and EC2 have the3 same vpc id, and both are in the same availability zone. Postgres is using port 5432 (not 3306) but havent been able to access it yet. So taking my working EC2 instance as the starting point should I create a new security group before creating a database, and if so what values do I need to put into it so I can access the db with psql from within my ec2 ssh session - thats all that is holding me up for now and all I need to do 
* Update 3 *
At last I have access to my database, my database had three security groups ( I think the other two were created when I created a new EC2 instance) I removed two of them and in the remaining on the inbound tab I set rule to

All Traffic
Ports 0-65535
Protocol All
IPAddress 0.0.0.0/0

(The outbound tab already had the same rule) and it worked !
I realize this is not the most secure setup but at least its progress.
I assume to only allow access from my EC2 instance I can change the IPAddress of the inbound rule but I don't how to calculate the CIDR for the ipaddress ?
My new problem is having successfully downloaded my datafile to my EC2 instance I am unable to unzip it because I don't not have enough diskspace. I assume I have to use S3 Ive created a bucket but how do I make it visible as diskspace from my EC2 instance so I can

Move my datafile to it
Unzip the datafile into it
Run my code against the unzipped datafile to load the database

(Note the datafile is an Xml format and has to be processed with custom code to get it into the database it cannot just be loaded directly into the database using some generic tool)  
Update 4
S3 is the wrong solution for me instead I can use EBS which is basically disc storage accessible not as a service but by clicking Volumes in EC2 Console. Ensure create the volume in the same Availability zone as the instance, there maybe more than one in each location, for example my EC2 instance was created in eu-west-1a but the first time I created a volume it was in eu-west-1b and therefore could not be used.
Then attach volume to instance
But I cannot see the volume from the linux commandline, seems there is something else required.
Update 5
Okay, have to format the disk and mount it in linux for it to work
I now have my code for uploading the data to database working but it is running incredibly slow, much slower than my cheap local server I have at home. I'm guessing that because the data is being loaded one record at a time that the bottleneck is not the micro database but my micro instance, looks like I need to redo with a more expensive instance
Update 6
Updated to a large Computative instance still very slow. Im now thinking the issue is the network latency between server and database perhaps need to install a postgres server directly onto my instance to cut that part out.