Monday, September 29, 2014

SSL upload

Upload

aws iam upload-server-certificate --server-certificate-name mycertname --certificate-body file://mycert.cer --private-key file://mycert.key

or

aws iam upload-server-certificate --server-certificate-name mycertname --certificate-body file://mycert.cer --private-key file://mycert.key  --certificate-chain file://certificate_chain_file

Verify

aws iam get-server-certificate --server-certificate-name mycertname


Commands to convert .crt and .key to .pem
openssl rsa -in server.key -text > my-private-key.pem
openssl x509 -inform PEM -in server.crt > my-private-cert.pem

Setup Amazon RDS CLI on Windows


Download RDSCLI.zip from http://aws.amazon.com/developertools/2928
Extract  the zip file C:\......\RDSCli\RDSCli-1.15.001

Set the path
set JAVA_HOME=C:\Program Files\Java\jdk1.7.0_55

setx AWS_CREDENTIAL_FILE C:\...\RDSCli\RDSCli-1.15.001\credential
(this file contains access keys)

setx AWS_RDS_HOME C:\...\RDSCli\RDSCli-1.15.001

setx PATH "%PATH%;%AWS_RDS_HOME%\bin"

> rds --help

Tuesday, September 16, 2014

Setup Amazon CLI on Windows

1. Download the AWS CLI MSI installer (AWSCLI64.msi) for Windows (64-bit) from https://s3.amazonaws.com/aws-cli/AWSCLI64.msi

2. Execute the default installation AWSCLI64.msi

3. Download python (python-3.4.1.amd64.msi) )from http://python.org/download

4. From windows command line, execute these commands
   > set PATH=%PATH%;C:\Python34
   > python --help
   > python -m pip install -U pip --proxy [user:password]@proxyserver:proxyport
   > pip --help
   > aws help
   > aws --version

5. Configure AWS
    > aws configure
       AWS Access Key ID [None]: enter-your-access-key-id-here
       AWS Secret Access Key [None]: enter-your-secret-access-key-here
       Default region name [None]: us-east-1
       Default output format [None]: