Showing posts with label Amazon. Show all posts
Showing posts with label Amazon. Show all posts

Saturday, 24 February 2018

Amazon Web Service tutorial for beginners

Amazon Web Service tutorial for beginners

Question: What is Amazon EC2?
Full form of Amazon EC2 is Amazon Elastic Compute Cloud.
Amazon EC2 is a web service that provides secure, resizable compute capacity in the cloud.
You can use EC2 to launch as many as virtual servers as you need, and configure security and networking and manage storage.
EC2 enables you to scale up resource as per your requirements.


Question: What are features of Amazon EC2?
  1. Create instances (Virtual computing)
  2. Preconfigured templates for your instances.
  3. Configurations of CPU, memory, storage, and networking capacity for your instances, known as instance types
  4. Secure login information for your instances using key pairs
  5. Firewall Setting that enables you to specify the protocols, ports, and source IP ranges that can reach your instances
  6. Static IPv4 addresses for dynamic cloud computing, known as Elastic IP addresses



Question: What is Full form of Amazon ECS?
Full form of Amazon ECS is Amazon Elastic Container Service.
Amazon ECS is highly scalable, fast, container management service that is easy to manage containers.


Question: What are Feature of ECS?
Amazon ECS is a regional service that running application containers in a highly available manner across multiple Availability Zones within a region.
You can create Amazon ECS clusters within a new or existing VPC.


Question: What is Lambda?
Amazon Lambda is web service that runs code in response to events and automatically manages the compute resources required by that code.


Question: What Is Amazon Batch?
Amazon Batch enables you to run batch computing workloads on the Amazon Cloud.
Batch computing is a common way for engineers to manage large amounts of compute resources.


Question: What are components of Amazon Batch?
  1. Jobs
  2. Job Definitions
  3. Job Queues
  4. Compute Environment



Question: What is Amazon Elastic Beanstalk?
It is Service which can quickly deploy and manage applications in the Amazon Cloud.
Elastic Beanstalk automatically handles the details of capacity, load balancing, scaling, and application health monitoring.
Elastic Beanstalk supports applications developed in Java, PHP, .NET, Node.js, Python, and Ruby etc.


Question: What is Amazon Lightsail?
Lightsail is designed to be the easiest way to launch and manage a virtual private server (VPS).



Question: What is Amazon S3?
Full form of S3 is Amazon Simple Storage Service.
Amazon S3 is a web service which provides storage Service through web services interfaces.



Question: What is Amazon EFS?
Full form of Amazon EFS is Amazon Elastic File System.
EFS provides simple, scalable file storage for use with Amazon EC2 instances.



Question: What is Amazon Glacier?
Amazon Glacier is an online file storage web service that provides storage for data archiving and backup.


Question: What is Amazon Storage Gateway?
Amazon Storage Gateway is a service that connects an on-premises software appliance with cloud-based storage to provide seamless and secure integration in the cloud.



Question: What is Relational Database Service?
Amazon Relational Database Service (Amazon RDS) makes it easy to set up, operate, and scale a relational database in the cloud.



Question: What is AWS DynamoDB?
Amazon DynamoDB is a fully managed NoSQL database service that provides fast and predictable performance with seamless scalability.



Question: What is AWS ElastiCache?
ElastiCache is a web service that makes it easy to set up, manage, and scale a distributed in-memory data store in the cloud.



Question: What is Amazon Redshift?
Redshift is Web service which offers fast query performance using the same SQL-based tools and business intelligence applications.


Question: What is Elastic IP addresses in aws?
An Elastic IP address is a static IPv4 address designed for dynamic cloud computing.
An Elastic IP address is associated with your AWS account.
With an Elastic IP address, you can mask the failure of an instance by rapidly remapping the address to another instance in your account.



Question: What is IPv4?
Internet Protocol Version 4 (IPv4) is the fourth revision of the Internet Protocol and a widely used protocol in data communication over different kinds of networks.



Question: What is difference between IPv4 and IPv6?
Internet Protocol Version 4 (IPv4) is the fourth revision of the Internet Protocol where as IPv6 is the sixth revision to the Internet Protocol and the successor to IPv4



Question: What is EC2 instance in aws?
An EC2 instance is a virtual server in Amazon's Elastic Compute Cloud (EC2) for running applications on the Amazon Web Services (AWS) infrastructure.



Question: What is volume in aws?
An Amazon EBS volume is a durable, block-level storage device that you can attach to a single EC2 instance.
You can use EBS volumes as primary storage for data that requires frequent updates, such as the system drive for an instance or storage for a database application.



Question: What is Amazon EC2 Dedicated Hosts?
An Amazon EC2 Dedicated Host is a physical server with EC2 instance capacity fully dedicated to your use.
Dedicated Hosts can help you address compliance requirements and reduce costs by allowing you to use your existing server-bound software licenses.

Question: What is EBS Snapshots?
We back up the data on Amazon EBS volumes to Amazon S3 by taking point-in-time snapshots.
Snapshots are incremental backups, which means that only the blocks on the device that have changed after your most recent snapshot are saved.



Question: What is Elastic Load Balancing?
Elastic Load Balancing distributes incoming application traffic across multiple EC2 instances, in multiple Availability Zones.
The load balancer serves as a single point of contact for clients(like browser), which increases the availability of your application.
You can add and remove instances from your load balancer as your needs change, without disrupting the overall flow of requests to your application



Question: What Is Amazon VPC?
Amazon Virtual Private Cloud (Amazon VPC) enables you to launch AWS resources into a virtual network.
This virtual network closely resembles a traditional network that you'd operate in your own data center, with the benefits of using the scalable infrastructure of AWS.



Question: What is security groups in aws?
A security group acts as a virtual firewall that controls the traffic for one or more instances. When you launch an instance, you associate one or more security groups with the instance.
You add rules to each security group that allow traffic to or from its associated instances.


Tuesday, 1 August 2017

Amazon Web Services Tutorial - Terminology

Amazon Web Services Tutorial - Basic understanding

Question: What is Amazon Web Services(AWS)?
AWS is Amazon's cloud web hosting platform that offers flexible, reliable, scalable, easy-to-use, and cost-effective solutions.


Question: What is cloud computing?
Cloud computing is an computing service in which large groups of remote servers are setup to allow centralized data storage, and online access to computer services or resources.


Question: What are the the benefits of Cloud Computing?
  1. AWS cost efficient
  2. Instantly setup of unlimited server
  3. Highly reliable
  4. Unlimited Storage
  5. Backup & Recovery
  6. Easy Access to Information



Question: What are the types of Cloud Computing?
  1. Public Cloud: Cloud computing services are managed by third party.
  2. Private Cloud: Cloud computing services are managed by own organization.
  3. Hybrid Cloud: Its combination of public cloud and private cloud.



Question: What are the Cloud Service Models of Cloud Computing?
  1. IaaS (Infrastructure as a Service): It provides users with provision of processing, storage, and network connectivity as per requirement.
  2. PaaS (Platform as a Service): The service provider provides various services like databases, queues, workflow engines, e-mails, etc. to their customers.
  3. SaaS (Software as a Service): Third-party providers provide end-user applications to their customers with some administrative capability at the application level.



Question: What is AWS EC2?
Full form of EC2 is Elastic Compute Cloud.
EC2 allow use virtual machines of different configurations as per their requirement.


Question: What is Load Balancing?
Load balancing means to balance the load on web server through adding resources on system. Load balancer manage the load on the server so that it work efficiently.


Question: What is Elastic Load Balancing?
Elastic Load Balancing is dynamically growing and shrinking the load-balancing capacity depending on server.


Question: What is Elastic Load Balancer?
It spread the traffic to web servers, which improves performance.
It is used to distributed the traffic to EC2 instances over multiple available zones, and dynamic addition and removal of Amazon EC2 hosts from the load-balancing rotation.


Question: What is Elastic Caches?
Amazon Elastic Cache is a web service that manages the memory cache in the cloud.


Question: What is Amazon RDS?
Relational Database Service (RDS) provides access of database like MySQL, Oracle, or Microsoft SQL Server database engine.


Question: What is AWS Management Console?
AWS Management Console is a web application for managing Amazon Web Services. It provide you detail about all servers and its resources, user billing/payment etc.


Question: What is Auto Scaling?
Auto Scaling is enabled by Amazon CloudWatch.
AWS CloudWatch can be used to measure CPU utilization, network traffic, etc.
When traffic increase then resource added automatically.


Question: What is Amazon Virtual Private Cloud?
Amazon VPC allows the users to use AWS resources in a virtual network.


Question: What services we can use with Amazon Virtual Private Cloud?
  1. Amazon EC2
  2. Amazon Route 53
  3. Amazon WorkSpaces
  4. Auto Scaling
  5. Elastic Load Balancing
  6. AWS Data Pipeline
  7. Elastic Beanstalk
  8. Amazon Elastic Cache
  9. Amazon EMR
  10. Amazon OpsWorks
  11. Amazon RDS
  12. Amazon Redshift



Question: What is Amazon Route 53?
It is a highly available and scalable DNS web service.
corporates to route the end users to Internet applications by translating human readable names like www.facebook.com, into the numeric IP addresses like 192.0.2.1.


Question: What is CloudFront?
CloudFront is a CDN retrieves data from Amazon S3 bucket and distributes it to multiple datacenter locations though edge locations.


Question: What is Amazon DynamoDB?
It is NoSQL database that allows to create database tables, store data in table and retrieve any amount of data.
It automatically manages the data traffic of tables over multiple servers and maintains performance.


Question: What is Amazon Redshift?
It is data warehouse service in the cloud. Its datasets range from 100s of gigabytes to a petabyte.


Question: What is Amazon Kinesis?
Amazon Kinesis is a managed, scalable, cloud-based service that allows real-time processing of streaming large amount of data per second.


Question: What is Amazon Elastic MapReduce?
Amazon Elastic MapReduce is a web service that provides a managed framework to run data processing frameworks such as Apache Hadoop, Apache Spark, and Presto in an easy, cost-effective, and secure manner.


Question: What is Amazon Pipeline?
AWS Data Pipeline is a web service, designed to make it easier for users to integrate data spread across multiple AWS services and analyze it from a single location.


Monday, 31 July 2017

Server Architecture Interview Questions and Answer

Server Architecture Interview Questions and Answer

Question: What is VPC?
Full form of VPC is Virtual Private Cloud.
It is virtual network dedicated to AWS account.It is logically isolated to the other virtual network in the AWS cloud.


Question: Can a VPC of any size be created?
Yes, After selecting an option, you can modify the size and IP address range of the VPC and its subnets.
You can modify the VPC to add more subnets or add/remove gateways at any time after the VPC has been created.
Question: How do AWS VPC work?
It is logically isolated from other virtual networks. You can launch your AWS resources, such as Amazon EC2 instances, into your VPC.
You can configure your VPC and select its IP address range, create subnets, and configure route tables, network gateways, and security settings.

Question: What is route table in AWS?
A route table contains a set of rules, that are used to determine where network traffic is directed.
Each subnet in your VPC must be associated with a route table, the route table controls the routing for the subnet.


Question: What is an Internet gateway AWS?
An Internet gateway is a horizontally scaled, redundant, and highly available VPC component that allows communication between instances in your VPC and the Internet.


Question: What is an Amazon VPC?
Amazon VPC lets you provision a logically isolated section of the Amazon Web Services (AWS) cloud where you can launch AWS resources in a virtual network that you define.

Following are components of VPC
  1. A Virtual Private Cloud
  2. Subnet
  3. Internet Gateway
  4. NAT Gateway
  5. Hardware VPN Connection
  6. Virtual Private Gateway
  7. Customer Gateway
  8. Router



Question: What is an Elastic IP address?
An Elastic IP address is a static IPv4 address designed for dynamic cloud computing. With an Elastic IP address, you can mask the failure of an instance or software by rapidly remapping the address to another instance in your account.
Question: What is AWS VPN?
You can connect your VPC to remote networks by using a VPN connection.


Question: What is Route 53?
Amazon Route 53 (Route 53) is a scalable and highly available Domain Name System (DNS).


Question: What is a static route?
Static routing is a form of routing that occurs when a router uses a manually-configured routing entry, rather than information from a dynamic routing traffic.


Question: What do you mean by dynamic routing?
Dynamic routing is a networking technique that provides optimal data routing. dynamic routing enables routers to select paths according to real-time logical network layout changes.


Question: What is meant by API gateway?
The API Gateway will often handle a request by invoking multiple microservices and aggregating the results.
It can translate between web HTTP and WebSocket and web?unfriendly protocols that are used internally.


Question: What is an API management?
It is process of publishing, documenting and overseeing application programming interfaces (APIs) in a secure, scalable environment.


Question: What is Amazon MWS?
Full form of MWS is Amazon Marketplace Web Service. It is an integrated web service API that helps Amazon sellers to programmatically exchange data on listings, orders, payments, reports, and more. Data integration with Amazon enables high levels of selling automation, which can help sellers grow their business.


Question: What is cloud computing?
cloud computing is the delivery of computing services—servers, storage, databases, networking, software, analytics and more—over the Internet.


Question: what is load balancer?
A load balancer is a device that acts as a reverse proxy and distributes network or application traffic across a number of. servers.
Load balancers are used to increase capacity (concurrent users) and reliability of applications.


Question: What is load balancing on a router?
Network load balancing is the ability to balance traffic across two WAN links without using complex routing protocols like BGP.


Question: How do load balancing servers work?
A load balancer acts as the "traffic cop" sitting in front of your servers and routing client requests across all servers capable of fulfilling those requests in a manner that maximizes speed and capacity utilization and ensures that no one server is overworked.


Question: What is Lambda?
AWS Lambda lets you run code without managing servers, AWS states on the Lambda product page.
You can think of Lambda as an event-driven computing platform;
Lambda runs when triggered by an event and executes code that's been loaded into the system.


Friday, 13 May 2016

How to download image from URL with PHP?

How to download image from url with PHP?

Question: How to download image from url and save in server?
//Image path which we will download
$imageURL='http://domain.com/image.jpg';

//get extension of image
$ext = pathinfo($imageURL, PATHINFO_EXTENSION);

//Local path of image - where will we save the image
$downloadTo = fopen('import/image/file'.  rand(1, 9999).'.'.$ext, 'wb');

//Download and save image
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $imageURL);
curl_setopt($ch, CURLOPT_FILE, $downloadTo);
curl_setopt($ch, CURLOPT_HEADER, 0);
$output = curl_exec($ch);
curl_close($ch);

For http URL, http image will download.
For https URL, https image will download.




Question: How to get image extension from url?
$imageURL='http://domain.com/image.jpg';
$ext = pathinfo($imageURL, PATHINFO_EXTENSION); //.jpg



Question: Download image from URL and display in browser?
    //Image path which we will download
    $imageURL='http://domain.com/image.jpg';

    //get extension of image
    $ext = pathinfo($imageURL, PATHINFO_EXTENSION);

    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $imageURL);
    curl_setopt($ch, CURLOPT_HEADER, 0);
    $output = curl_exec($ch);
    curl_close($ch);
    switch( $ext ) {
        case "gif": $ctype="image/gif"; break;
        case "png": $ctype="image/png"; break;
        case "jpeg":
        case "jpg": $ctype="image/jpeg"; break;
        default:
    }
    header('Content-type: ' . $ctype);


For http URLhttp image will download.
For https URLhttps image will download.


Question: How to check if image is valid OR Not?
$imageURL='http://domain.com/image.jpg';
 list($width, $height, $type, $attr) = getimagesize($imageURL);
 if (!empty($width) && !empty($height)) {
    echo "Valid Image";
    }else{
    echo "In Valid Image";
    }



Question: Download image from external URL, instead of displaying in browser?
        $imageURL='https://s3.ap-south-1.amazonaws.com/cloud-front-s3/8_12.jpg';
        $imageURLArray = explode('/',$imageURL);
        $downloadFileName=$imageURLArray[count($imageURLArray)-1];
        
        //get extension of image
        $ext = pathinfo($imageURL, PATHINFO_EXTENSION);
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $imageURL);
        curl_setopt($ch, CURLOPT_HEADER, 0);
        $output = curl_exec($ch);
        curl_close($ch);
      
            
        header("Content-Type: application/octet-stream"); //
        // set it as an attachment and give a file name
        header('Content-Disposition: attachment; filename='.$downloadFileName);            
        echo $output;
        



Wednesday, 29 April 2015

How to upload Image in Amazon s3 with android SDK 2.0

How to upload Image Aman s3 in android SDK 2.0


Try below code
bucket_name='xxxxxx';
key='xxxxxxxxxxxxxxxxxxxxxxxxxxxx';
images3 = new File(uri.getPath())
ObjectMetadata metadata = new ObjectMetadata();
metadata.setContentEncoding("UTF-8");
imageSize = inputStream.available();
metadata.setContentLength(imageSize);
TransferManager transferManager = new TransferManager(credentialsProvider);
Upload upload = transferManager.upload(bucket_name, key, images3, metadata);
upload.waitForCompletion();




>