Showing posts with label AWS. Show all posts
Showing posts with label AWS. Show all posts

Wednesday, 9 May 2018

How to backup of wordpress into S3?

How to backup of wordpress into S3?

Question: How to Store the backup of wordpress into S3?
aws s3 cp /var/www/html s3://website-bucket-akg/wordpress/ --recursive

Question: How to upload images in S3?
 aws s3 cp --recursive /var/www/html/wp-content/uploads s3://cloud-front-s3/wp-media

Question: How to Upload images to S3 Sync?
Lets test with --dryrun, first
aws s3 sync --delete /var/www/html/wp-content/uploads s3://cloud-front-s3/wp-media --dryrun

Now Run the command
aws s3 sync --delete /var/www/html/wp-content/uploads s3://cloud-front-s3/wp-media

Question: How to sync the images with S3 with help of cron?
*/3 * * * * aws s3 sync --delete /var/www/html/wp-content/uploads s3://cloud-front-s3/wp-media >> /var/www/html/cron/cron.log 2>&1

It run every 3 mins.

Wednesday, 25 April 2018

AWS Tutorial Terminology page 4

Question: Difference between Amazon ec2 and AWS Elastic Beanstalk?
Amazon ec2EC2 is Amazon's service that allows you to create a server (AWS calls these instances) in the AWS cloud.

Elastic Beanstalk: Elastic Beanstalk is one layer of abstraction away from the EC2 layer.
Elastic Beanstalk number will have number of EC2 instances, an optional database, as well as a few other AWS components such as a Elastic Load Balancer, Auto-Scaling Group, Security Group.

Question: How can we clone of EC2 Instance?
You can make an AMI of an existing instance, and then launch number of instances using that AMI.

Question: How to copy files OR folder From one bucket to another?
aws s3 cp s3://source_folder/ s3://destination_folder/ 

Question: How to rename file present in Amazon S3?
aws s3 cp s3://source_folder/image.png s3://source_folder/newName.png

Question: What is Burstable Performance Instances?
AWS EC2 has 2 different type of instances.
A) Fixed Performance Instances(e.g. M3, C3 etc)
B) Burstable Performance Instances (e.g. T2).
Fixed Performance Instances provides a consistent CPU performance whereas Burstable Performance Instances provide a baseline CPU performance.
When the workload increased in Burstable Performance Instances, Burstable Performance Instances have the ability to burst, i.e. increase the CPU performance.

Question: What is CPU Credit Balance in EC2?
CPU Credit regulates the amount CPU burst of an instance.
CPU Credit Balance is simply the amount of "CPU Credit available" in your account at any moment.

Question: How to rename AWS S3 Bucket name?
You can not rename a bucket name. But you can do following.
1. Create new bucket
2. Copy all items from old bucket to this new bucket.
3. Delete the old bucket.

You can do above with commands also
aws s3 mb s3://[new-bucket]
aws s3 sync s3://[old-bucket] s3://[new-bucket]
aws s3 rb --force s3://[old-bucket]

Question: How do I increase the EBS volume size of a running instance?
Not possible to increase the size of an Amazon EBS root device storage volume while the Amazon EC2 instance is running.

Question: What is a TTL 0 in CloudFront useful for?
Full form of TTL is Time-To-Live.
When you set the TTL for a particular origin to 0, CloudFront will still cache the content.
It will then make a GET request with an If-Modified-Since header, thereby giving the origin a chance to signal that CloudFront can continue to use the cached content.

Question: What is Difference between a snapshot and AMI?
Full form of AMI is An Amazon Machine Image.
AMI is an encrypted machine image of a specific computer running an operating system that is configured and that it can contain a set of applications and services for accomplishing a specific purpose.
An AMI contains all the information necessary to start up and run the software in the image.
You can take a snapshot of an EBS boot volume and turn it into an EBS boot AMI by registering it with the appropriate metadata.

Question: How much Cost of storing AMI?
Charged for the storage of the bits that make up your AMI (Charge for only storage), there are no charges for creating an AMI in AWS Account.

Question: How to upgrade AWS CLI to the latest version?
pip install --upgrade awscli

pip3 install --upgrade awscli

Question: S3 limit to objects in a bucket?
Write, read, and delete objects containing from 1 byte to 5 terabytes.
The number of objects you can store is unlimited.

Question: What is the maximum length of a filename in S3?
These names are the object keys. The name for a key is a sequence of Unicode characters whose UTF-8 encoding is at most 1024 bytes long.

Question: What is Amazon Polly?
Amazon Polly is a service that turns text into speech.
With use of this service you can create applications like talk, and build entirely new categories of speech-enabled products.
Amazon Polly is a Text-to-Speech service that uses advanced deep learning technologies to synthesize speech that sounds like a human voice.

Question: What is VPC Peering?
Amazon Virtual Private Cloud (Amazon VPC) enables you to launch Amazon Web Services (AWS) resources into a virtual network that you've defined.
A VPC peering connection is a networking connection between two VPCs that enables you to route traffic between them using private IPv4 addresses or IPv6 addresses.

Friday, 13 April 2018

AWS Tutorial Terminology page 3

AWS Tutorial Terminology page 3

Question: What are routing table?
A routing table is a set of rules, is used to determine where data packets will be directed over the internet protocol. Internet protocol will contain the necessary information.
Each packet contains information about its origin and destination.
When a packet is received, a network device examines the packet and matches it to the routing table for its destination.

  1. Destination: this is final destination.
  2. Next hop: The IP address to which the packet is forwarded
  3. Interface: The outgoing network interface the device should use when forwarding the packet
  4. Metric: Assigns a cost to each.
  5. Routes

Question: What is subnets in VPC?
A subnet is a range of IP addresses in your VPC.
You can launch AWS resources into a specified subnet.

Question: What is IAAS PAAS SAAS?
IaaS (Infrastructure as a Service), as the name suggests, provides you the computing infrastructure, physical or (quite often) virtual machines and other resources like virtual-machine disk image library, block and file-based storage, firewalls, load balancers, IP addresses, virtual local area networks etc.
Examples: Amazon EC2, Windows Azure, Rackspace, Google Compute Engine.

PaaS (Platform as a Service), as the name suggests, provides you computing platforms which typically includes operating system, programming language execution environment, database, web server etc.
Examples: AWS Elastic Beanstalk, Windows Azure, Heroku,, Google App Engine, Apache Stratos.

While in SaaS (Software as a Service) model you are provided with access to application software often referred to as "on-demand software". You don't have to worry about the installation, setup and running of the application. Service provider will do that for you. You just have to pay and use it through some client.
Examples: Google Apps, Microsoft Office 365.

Question: How to Pass query string to AWS lamba?
You can access Query String as below:

You can access Header String as below:

Question: How to Make all S3 object public?
Now go to your AWS S3 console, At the bucket level, click on Properties, Expand Permissions, then Select Add bucket policy.
Following are Generate Policy.
  "Id": "Policy1397632521960",
  "Statement": [
      "Sid": "Stmt1397633323327",
      "Action": [
      "Effect": "Allow",
      "Resource": "arn:aws:s3:::bucketnm/*",
      "Principal": {
        "AWS": [

Question: Can't ping AwS ec2 instance. How to Fix?
Add a new EC2 security group inbound rule:
Type: Custom ICMP rule
Protocol: Echo Request
Port: N/A
Source: your choice (I would select Anywhere to be able to ping from any machine)

Question: Why to use S3?
Amazon S3 is designed for large-capacity, low-cost file storage in one specific geographical region.* The storage and bandwidth costs are quite low.

Amazon CloudFront is a Content Delivery Network (CDN) which proxies and caches web data at edge locations as close to users as possible.

Question: How to download entire S3 bucket?
Execute following command from Console.
aws s3 sync s3://mybucket .

Wednesday, 28 March 2018

AWS Tutorial Terminology page 2

AWS Tutorial Terminology page 2

Question: What Is AWS Media Services?
AWS Media Services are a family of fully-managed services that make it easy to build reliable, broadcast-quality video workflows in the Cloud.

Question: What Is Amazon Simple Notification Service(SNS)?
Amazon Simple Notification Service is a notification service provided by AWS.
It provides a low-cost infrastructure for the mass delivery of messages, predominantly to mobile users.
It can send notification for below
  1. Mobile Push Notifications
  2. SMS
  3. Email
  4. Http/Https
  5. SQS
  6. Lambda functions

Question: What Is Amazon Simple Queue Service (SQS)?
Amazon Simple Queue Service message queuing service that makes it easy to decouple and scale microservices, distributed systems, and serverless applications.
With SQS you can send, store, and receive messages between software components without losing messages to be always available.

Question: What Is Amazon SWF?
Amazon SWF helps developers build, run, and scale background jobs that have parallel or sequential steps.

Question: What is CloudFormation?
AWS CloudFormation provides a common language to describe and provision all the infrastructure resources in your cloud environment.
It allows you to use a simple text file to model and provision, in an automated and secure manner, all the resources needed for your applications across all regions.

Question: What are difference between cloudtrail and cloudwatch?
  1. It helps to visibility into your user and resource activity by recording AWS API calls.
  2. Used to log the API calls across your AWS infrastructure.
  3. it keeps the history of API calls of your account, AWS Management console, AWS SDKs, command line tools, and every other AWS services etc.

  1. it monitoring service for AWS cloud resources and the applications you run on AWS
  2. Collect and track metrics.
  3. System-wide visibility into resource utilization, application performance, and operational health.

Question: What is Sagemaker?
We use Sagemaker to Build, train, and deploy machine learning models & algorithms at scale.

Question: What is Amazon athena?
Amazon Athena is a serverless, interactive query service that makes it easy to analyze big data in S3 using standard SQL.

Question: What is System manager?
AWS Systems Manager gives you visibility and control of your infrastructure on AWS.

Question: What is Amazon EMR?
Amazon EMR provides a managed Hadoop framework that makes it easy, fast, and cost-effective to process vast amounts of data across dynamically scalable Amazon EC2 instances.

Question: What is Amazon CloudSearch?
Amazon CloudSearch is a fully-managed search service in the AWS Cloud that lets you easily integrate fast and highly scalable search functionality into your apps.

Question: What is Amazon Kinesis?
Amazon Kinesis Data Streams enables you to build custom applications that process or analyze streaming data for specialized needs.

Question: What is Amazon QuickSight?
Amazon QuickSight is a fast, cloud-powered business analytics service that makes it easy to build visualizations, perform ad-hoc analysis, and quickly get business insights from your data

Question: What does an AWS Region consist of?
An independent collection of AWS computing resources in a defined geography.

Question: What is Elastic Map Reduce?
Amazon EMR processes big data across a Hadoop cluster of virtual servers on Amazon Elastic Compute Cloud (EC2) and Amazon Simple Storage Service (S3).

Question: How to Install AWS command line in Winows
  1. Download the installer from
  2. After download, install the software in windows.
  3. Now, Go to windows command line.
  4. In command prompt type
     aws configure
    It will ask AWS access key, and Secret key.
  5. for Region Name and Default format just enter key.

Question: How to configure Aws in console?
aws configure

Question: How to get list configured aws account?
aws configure list

Question: How to list name of all the bucket?
aws s3 ls

Question: How to list all the files in S3 Bucket?
aws s3 ls s3://mybucket

Question: How to list all the files recursively in S3 Bucket?
aws s3 ls s3://mybucket --recursive

v Question: How to Rename a file?
aws s3 mv s3://mybucket/filename.png  s3://mybucket/newname.png 

Question: What is EBS?
Full form of EBS is Amazon Elastic Block Store.
It provides persistent block storage volumes for use with Amazon EC2 instances in the AWS Cloud.

Question: What is EFS?
Full form of EBS is Amazon Elastic File System .
It provides provides simple, scalable file storage for use with Amazon EC2 instances.
EFS offers a simple interface that allows you to create and configure file systems quickly and easily.
It growing and shrinking automatically as you add and remove files. You can use this in shared.

Question: AWS command to Describe the EC2 instances?
aws ec2 describe-instances

Question: AWS command to Describe the Start EC2 instances?
aws ec2 start-instances --instance-ids i-1348636c

Question: AWS command to sync the myfolder with S3 bucket in recursive?
aws s3 cp myfolder s3://mybucket/myfolder --recursive

It will move local files to S3 bucket(if does not exist in bucket)

Question: AWS command to sync the myfolder with S3 bucket in recursive but exclude the temp file?
aws s3 cp myfolder s3://mybucket/myfolder --recursive

It will move local files to S3 bucket(if does not exist in bucket)

Monday, 19 March 2018

AWS Tutorial Terminology page 1

AWS Tutorial Terminology page 1

Question: what is lightsail in AWS?
Lightsail is designed to be the easiest way to launch and manage a virtual private server(VPS) with AWS.
With Amazon Lightsail, you can deploy a VPS with just a few clicks using preconfigured templates for your favorite Linux distribution application.

Question: What is Amazon Elastic Container Service?
Amazon Elastic Container Service (Amazon ECS) is a highly scalable, fast, container management service that makes it easy to run, stop, and manage Docker containers on a cluster.

Amazon ECS lets you launch and stop container-based applications with simple API calls.

Question: What are Features of Amazon ECS?
  1. Cost-efficient
  2. Improved Compatibility
  3. More Secure

Question: What is Lambda?
AWS Lambda is a compute service that lets you run code without managing servers.
AWS Lambda executes your code only when needed and scales automatically, from a few requests per day to thousands per second.

Question: What is Elastic beanstack?
AWS Elastic Beanstalk makes it even easier for developers to quickly deploy and manage applications in the AWS Cloud.

Question: What is Amazon CloudWatch?
Amazon CloudWatch is a monitoring service for cloud resources and the applications.

Question: What is Amazon CloudTrail?
AWS CloudTrail is a web service that records AWS API calls for your account and delivers log files to you.

Question: What is Amazon Autoscaling?
An AWS service that can launch Amazon EC2 instances automatically as per traffic and stop the EC2 instances when traffic decrease.

Question: What is AWS CloudFormation?
AWS CloudFormation is a service that helps you model and set up your AWS resources so that you can spend less time managing resources and more time focusing on your applications.

Question: What is Amazon OpsWorks?
AWS OpsWorks is a configuration management service that helps you configure and operate applications in a cloud.

Question: What is AWS Service Catalog?
AWS Service Catalog allows organizations to create and manage catalogs of IT services that are approved for use on AWS.

Question: What is AWS Trusted Advisor?
It is Web Service which monitor your account and gives suggestions regarding below:

1) Security
2) Cost Optimization
3) Performance
4) Fault Tolerance
5) Service Limits

Question: What is AWS Managed Service Provider?
AWS Managed Service Provider (MSP) Partners are skilled at cloud infrastructure/application migration, and deliver value to customers by offering proactive monitoring, automation, and management.

Question: What is AWS EFS?
Amazon EFS provides simple, scalable file storage for use with Amazon EC2 instances in the AWS Cloud.
Amazon EFS, storage capacity is elastic, growing and shrinking automatically as you add and remove files.

Question: What is Amazon Glacier?
Amazon Glacier is an online file storage web service that provides storage for data archiving and backup. this is very-ver cheap as compare to S3 and EFS but it is not available everytime.
When you request for data in Amazon Glacier, data will available after 3-4 hours.

Question: What is Storage Gateway?
AWS Storage Gateway is a hybrid storage service that enables your on-premises applications to seamlessly use AWS cloud storage.
You can use for archiving and backup, recovery, cloud bursting, storage tiering, and migration.

Question: What is Elastic transcoder?
Amazon Elastic Transcoder lets you convert media files that stored in S3 into media files in the formats required by client devices.
For example
You have upload the audio file in AWS S3, you can play the audio in all the application (IOS/Android).

Question: What is Amazon Kinesis Video Streams?
Amazon Kinesis Video Streams makes it easy to securely stream video from connected devices to AWS for analytics, machine learning and other processing.

Question: What are Benefits of Kinesis Video Streams?
  1. Stream video from millions of edge devices
  2. Easily build vision-enabled apps
  3. Secure
  4. Durable, Searchable storage
  5. No infrastructure to manage
  6. Build both real-time and batch applications

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

Question: What is AWS MFA?
Full form of MFA is Multi-Factor Authentication.
MFA adds an extra layer of protection on top of your username and password in Login.

Question: What Is IAM? - AWS Identity and Access Management?
Full form of IAM is AWS Identity and Access management.
IAM would have following component
  1. IAM Groups: An IAM group is a collection of IAM users.
  2. IAM Users: A user which is going to use access the credentials.
  3. IAM Roles: An IAM role is very similar to a user but does not have credentials.An IAM user can assume a role to temporarily take on different permissions for a specific task.
  4. Temporary Credentials: Temporary credentials are primarily used with IAM roles. User can request temporary credentials that have a more restricted set of permissions than your standard IAM user.

Question: What are IAM roles?
IAM roles are a secure way to grant permissions to entities that you trust.

Question: Question: What is ARN?
An Amazon Resource Name (ARN) is a file naming convention used to identify a particular resource in the Amazon Web Services (AWS).
ARNs, which are specific to AWS, help an administrator track and use AWS items and policies across AWS products and API calls.

Question: Question: Difference between Scaling up and Scaling out?
Scaling up is when you change the instance types within your Auto Scaling Group to a higher type (for example: changing an instance from a m4.large to a m4.xlarge), scaling down is to do the reverse.
Scaling out is when you add more instances to your Auto Scaling Group and scaling in is when you reduce the number of instances in your Auto Scaling Group.

Question: Question: Difference between SNS and SQS?
Both are Messaging Services in AWS.
SNS is push type notification whereas SQS is Pull type notification.

Question: Question: What is Mounting?
Mounting is the act of associating a storage device to a particular location.

Question: How to get the URL of meta data?

Question: What is Load balancing?
Load balancing distributes incoming application traffic and scales resources to meet traffic demands.

Question: How does Load balancing works?
The load balancer serves as a single point(e.g for clients, which increases the availability of your application.
You can add and remove instances (application server) from your load balancer as your needs change, without disrupting the overall flow of requests.
Question: From where we can Accessing Elastic Load Balancing?
  1. AWS Management Console
  2. AWS Command Line Interface (AWS CLI)
  3. AWS SDKs
  4. Query API

Question: What are different type of Load balancer?
  1. Application Load Balancers
  2. Network Load Balancers
  3. Classic Load Balancers.

Question: What is Application Load Balancers?
We use Application Load Balancer for your web applications with HTTP and HTTPS traffic.
Operating at the request level, Application Load Balancers provide advanced routing, TLS termination and visibility features targeted at application architectures, including microservices and containers.

Question: What is Network Load Balancer?
We use Network Load Balancer for ultra-high performance and static IP addresses for your application.
Operating at the connection level, Network Load Balancers are capable of handling millions of requests per second while maintaining ultra-low latencies.

Question: What is Classic Load Balancer?
We use Classic Load Balancer for existing application running in the EC2-Classic network.

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, into the numeric IP addresses like

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, 27 May 2016

Upload Image from URL to S3 in Zend Framework

Upload Image from URL to S3 in Zend Framework

$imageURL = '';
$extension = 'png';

$myAwsSecretKey = 'YJiKlVFERFuF/sadfzgS2jgj6z/Qhjkhsh'; //S3 Secret Key
$s3Media = 's3mediafolder'; //S3 Folder path

$s3 = new Zend_Service_Amazon_S3($myAwsKey, $myAwsSecretKey);
$uploadTo = 'clientProfileImages/thumb/205_test_push.png';

try {
    $s3->putFile($imageURL, "$s3Media/$uploadTo", array(
        Zend_Service_Amazon_S3::S3_ACL_HEADER => Zend_Service_Amazon_S3::S3_ACL_PUBLIC_READ,
        'x-amz-storage-class' => 'REDUCED_REDUNDANCY',
        'ContentType' => $extension
} catch (Exception $e) {
    echo $e->getMessage();
echo 'Image Uploaded Successfully in S3';

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
images3 = new File(uri.getPath())
ObjectMetadata metadata = new ObjectMetadata();
imageSize = inputStream.available();
TransferManager transferManager = new TransferManager(credentialsProvider);
Upload upload = transferManager.upload(bucket_name, key, images3, metadata);


Wednesday, 14 May 2014

PHP Upload File In Amazon S3 Bucket - Code Snippets

PHP Upload File In Amazon S3 Bucket - Code Snippets

Get List of buckets in Amazon S3 bucket and upload a file in Amazon S3 bucket with Zend Framework.

Uploading files in zend framework is very simple because zend framework provides the API which is very simple to use.

Please use following code to upload photos in zend framework.
$my_aws_key = 'AWS_KEY';
$my_aws_secret_key = 'AWS_SECRET_KEY';
$s3 = new Zend_Service_Amazon_S3($my_aws_key, $my_aws_secret_key);

/** Get List of buckets * */
$list = $s3->getBuckets();
foreach ($list as $bucket) {
    echo "Bucket: $bucket\n";
/** Get List of buckets * */

/** get Bucket Files **/
$files = $s3->getObjectsByBucket("BUCKET_NAME");
foreach ($files as $file) {
    echo "File: $file\n";
/** get Bucket Files **/

$imageName = '';
try {
    $s3->putFile($imageName, "BUCKET_NAME/ZFCE-logo-XS.jpg", array(
        Zend_Service_Amazon_S3::S3_ACL_HEADER => Zend_Service_Amazon_S3::S3_ACL_PUBLIC_READ,
        'x-amz-storage-class' => 'REDUCED_REDUNDANCY'
die('uploaded successfully');
} catch (Exception $e) {

Monday, 16 September 2013

Amazon S3 Introduction - Basics

Amazon S3 Introduction - Basics

Important Terms

S3: Simple Storage Services
AWS: Amazon Web Services
SDK: Software Development Kit
IAM: Identity Access Management

What is AmazonS3

It is Simple Stored Service provided by Amazon where you can manage files and can put authorized on these files.
Amazon will charge only when you upload/download the files. These files can be easily managed through SOAP, HTTP OR with use of third party Services.

Benefits of S3

  1. Available through API REST/SOAP.
  2. Durability
  3. Economic
  4. Fast
  5. Scalable
  6. Web store not FileSystem

Amazon S3 Concepts 

Bucket: A Bucket is Amazon terminology for what amounts to a folder or directory of files. Bucket names have to be unique across the service. Its in the root and you can create many bucket as you want. You can places data or directory inside the bucket. You can create 100-150 bucket per account. For each bucket, you can control access to the bucket (who can create, delete, and list objects in the bucket), view access logs for the bucket and its objects, and choose the geographical region where Amazon S3 will store the bucket and its contents.

Bucket Naming Convention

  1. Can’t have slahes
  2. It can have lowercase character, number, period(.) and hypen(-)
  3. Should be between 3-255 characters
  4. Must be start with number or letter
  5. Should not have underscore(_)
  6. Must not be inform of IP (
  7. Must not end with –
  8. Should not be .- or -. together

Object: When you upload file or folder in the bucket that is known as object. You can also set the permission on that ozbject. To upload folder you must enable “Enable Enhanced Uploader” of java applet. Objects consist of object data and metadata. The data portion is opaque to Amazon S3

Key: It is unique identifier for an object within the bucket. Every object in a bucket has exactly one key. Because the combination of bucket, key and version Id form uniquely object.
 For example, in the URL, 
here "doc" is the name of the bucket and "2006-03-01/AmazonS3.wsdl" is the key

Region: You can choose the geographical Region where Amazon S3 will store the buckets you create. You might choose a Region to optimize latency, minimize costs, or address regulatory requirements.

Features of S3

Reduced Redundancy Storage (RSS): RRS enables customers to reduce their costs by storing non-critical, reproducible data at lower levels of redundancy than Amazon S3's standard storage.

Bucket Policies: Create bucket with permission. An account can grant one application limited read and write access, but allow another to create and delete buckets as well. An account could allow several field offices to store their daily reports in a single bucket, allowing each office to write only to a certain set of names (e.g. "Nevada/*" or "Utah/*") and only from the office's IP address range. 

AWS Identity and Access Management :
Create users and groups under your organization's AWS account
Easily share your AWS account resources between the users in the account
Assign unique security credentials to each user
Granularly control users access to services and resources
Get a single AWS bill for all users under the AWS account

Access Control Lists


Create Bucket
Write object in bucket
Read bucket
Delete Object
Listing keys

Amazon S3 API

REST Interface: In REST, you use standard HTTP requests to create, fetch, and delete buckets and objects.

SOAP Interface: The most common way to use SOAP is to download the WSDL (go to, use a SOAP toolkit such as Apache Axis or Microsoft .NET to create bindings, and then write code that uses the bindings to call Amazon S3

Paying For Amazon S3
You need not to pay in starting and need to choose any plan. Just use as you need and they will charge @ the end of the month.