Remebering As a Free Account We Get

Total Page:16

File Type:pdf, Size:1020Kb

Remebering As a Free Account We Get

http://aws.amazon.com/free/

Sign up for an account (will require credit card details, in case you exceed limits of a free account). You can use an existing Amazon.com.account

Identity verification remebering as a free account we get : - EC2 (virtual server operating system usage) - S3 (storage) - RDS (database usage) - DynamoDB (db storage and usage)

First thing: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/get-set-up-for-amazon-ec2.html set up user, key pair for SSHr, vpc group and security group.

Connecting to your linux instance using SSH https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AccessingInstancesLinux.html instance id: i-e99ba9e3 ec2-54-200-14-139.us-west-2.compute.amazonaws.com

OR FOR WINDOWS – PUTTY INSTRUCTIONS. Download the PUTTY.ZIP file from the putty website (1st google result) and follow these instructions http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/putty.html Conect using SSH, file transfter using SFTP/SCP. adam@Brian:~/Documents/teaching fall 15$ ls *.pem Adam-key-pair.pem adam@Brian:~/Documents/teaching fall 15$ ssh -i Adam-key-pair.pem ec2-user@ec2- 54-200-14-139.us-west-2.compute.amazonaws.com

__| __|_ )

_| ( / Amazon Linux AMI

___|\___|___|

https://aws.amazon.com/amazon-linux-ami/2014.09-release-notes/ installing a wordpress blog: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/hosting-wordpress.html

Databases Setting up for Amazon RDS http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_SettingUp.html

Creating a PostgreSQL DB Instance and Connecting to a Database on a PostgreSQL DB Instance http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_GettingStarted.CreatingConnecting.Postgr eSQL.html Create the RDS Instance password: dbPassword

Then the database itself

Install PgAdmin and connect or from command line: psql -h myhost -d mydb -U myuserbask

Don't forget a firewall rule

Use your database. Some basic statements are here http://www.postgresql.org/docs/8.2/static/plpgsql-statements.html example here: http://www.tutorialspoint.com/postgresql/postgresql_create_table.htm

CREATE TABLE COMPANY( ID INT PRIMARY KEY NOT NULL, NAME TEXT NOT NULL, AGE INT NOT NULL, ADDRESS CHAR(50), SALARY REAL );

CREATE TABLE DEPARTMENT( ID INT PRIMARY KEY NOT NULL, DEPT CHAR(50) NOT NULL, EMP_ID INT NOT NULL ); insert into company(id, name, age, address, salary) VALUES('01', 'Adam', '32', '3234 Main St', '10.65'); then run: select * from company and see the output.

TO CONNECT WITH PYTHON http://www.tutorialspoint.com/postgresql/postgresql_python.htm install python-psychopg2 ^^^^^ follow this tutorial for more info.

Recommended publications