Friday, September 27, 2019

10.1 GIT : Install GIT and push project to GitHub Repository

10.1 GIT : Install GIT and push project to GitHub Repository


##########################################################################

Step1 : Create HigHub account
            Create repository

Step2 : Install msysGIT
            Open GIT Bash and push project using below commands

             ----------------------------------------------------------------
            git init  (intialize)
            git add .  (add for staging)
            git status  (check status)
            git commit -m 'first commit'  (move to local repository)
            git remote add origin git@github.com:pavankumarmadhu123/NodeJSDemos.git  (add to           remote repository)
            git push origin master  (push to master)

                                 //If public key access issue comes then we have to do below things.
                                           ssh-keygen
                                             - enter all 3 below (for default setting)
                                             - go to C:/Users/pamr/.ssh/id_rsa -> copy entire thing
                                             - go to git Settings -> SSH and GPG keys
                                             - Add SSH key
                                             windows-key
                                             copy paster entier thing
             ----------------------------------------------------------------

St3p3: If new machin needs to download, then use below command to download and work on it

             ----------------------------------------------------------------
           git clone git@github.com:pavankumarmadhu123/NodeJSDemos.git  (to download from gitHub)
              ----------------------------------------------------------------
#########################################################################

Step1: Create GitHub account:


       
                username : pavan*****

                password : **********

               https://github.com   

Create Repository







Step2: Installing msysGit – Git for Windows


Followed Article: http://www.almguide.com/2014/12/installing-msysgit-git-for-windows/


https://gitforwindows.org/













Sunday, September 22, 2019

7.1 : S3 : Create S3 Bucket and Give Access to user

7.1 : S3 : Create S3 Bucket and Give Access to user


##########################################################################

-> Create S3 Bucket (upload image/video, give public access (but in real time we dont give public access)



-> Create User (get User ARN generated eg: arn:aws:iam::281979644754:user/sample-user)




-> Come to S3 and give access of image/video to that user by pasting jazn template in Bucket policy and also give CORS configuration




-> Go back to user and give permission (add inline policy) 




##########################################################################

End to End steps - https://github.com/keithweaver/python-aws-s3/





7.0 : S3 : Introduction

7.0 : S3 : Introduction

6.1 : EC2 : EC2 Creation & Install Apache

6.1 : EC2 : EC2 Creation & Install Apache

#########################################################################

-> Create EC2 (provide VPC, Subnet, Storage, Tag and download keyPair and launch EC2)
           Internally it creates
                IP address
                Security group
-> Create Inbound rule in Security group for HTTP (since we are installing appache)
-> Use EC2 IP and login using Putty and install Appache (use ppk downloaded file to login)
            ec2-user
            sudo su -
            yum install httpd
            systemctl start httpd
            systemctl status httpd
            systemctl stop firewalld
            vi /var/www/html/index.html

#########################################################################














































ec2-user
sudo su -
yum install httpd
systemctl start httpd
systemctl status httpd
systemctl stop firewalld
vi /var/www/html/index.html










6.0 : EC2 : Introduction

6.0 : EC2 : Introduction

4. IAM (User, UserGroup, Policy)

4. IAM (User, UserGroup, Policy)


##################################################################


USER:
-------

Create User "iamTest" -> Give Read Only policy on all AWS Resource(PolicyName - ReadOnlyResource)
   Go to S3 -> Try to delete one of the object -> Access denied
   Come back to user - "iamTest" -> create inline policy (Either wizard/script) -> Delete Policy on All(*)/particular ARN Resource
   Go to S3 -> Try to delete -> You can delete

USER GROUP:
----------

Create UserGroup "group1" ->
   Add user "iamTest" to "group1"
   Give Admin Policy to "myGroup" (policyName - AdministratorAccess)
   Go to S3 -> Try to Create new bucket -> you can create

POLICY:
-------

Create Policy - "mypolicy"
  - Same policy if we want to give it to multiple user then create new policy
  - If its only to particular user - then we can give inline policy

  -> Select AWS Service (eg: EC2),
  -> Select Action (eg: Start/stop),
  -> select Amazon resource (*/arn-resource)



####################################################################

Step by Step : https://www.youtube.com/watch?v=DXNS-EP9sXM































3.

3.

2.

2. 

1. AWS History & Services

1. AWS History & Services















Sunday, January 27, 2019

1. AWS : Code sample NodeJS and deploy

1. AWS : Code sample NodeJS and deploy


########################## LOGIN #####################################

https://aws.amazon.com/console/
Sign UP -> Sign in to an existing AWS account ->

UserName : ********@gmail.com
Password : ********

click AWS Logo.




########################## DATABASE #####################################


---------------------------------------------
For Database:
---------------------------------------------

-> AWS Logo

RDS ->
Right navigation -> Databases -> select "DB identifier" if it has
Under "Connectivity" section -> you will see "Endpoint" and "Port" use that to connect from SQL client outside.

Password : ******




########################## FUNCTION #####################################

---------------------------------------------
For Functions: (Functions you can create in any language (NodeJS, Java8, Python etc..) some support zip file to upload and some allow to write code directly there eg: NodeJS.
---------------------------------------------

-> AWS Logo

https://www.youtube.com/watch?v=PEatXsXIkLc

Lamda -> "Create function" ->

index.handler
--------------

console.log("Loading function..")
exports.handler = (event, context, callback) => {

callback(null, "Hello World");

};

Save -> Test







########################## GATEWAY #####################################

---------------------------------------------
For API Gateway: Gateway is to expose written above functions to end user though URL.
---------------------------------------------

-> AWS Logo

https://www.youtube.com/watch?v=DSrg7hG-jV4

API Gateway -> "Create API"
API name - "Testnodeapi"

Actions -> Create Resource
-> Create Method
-> Deploy API

Access URL