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 is very small(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

OR
pip3 install --upgrade awscli



Question: What are the limit to objects in a S3 bucket?
Write, read, and delete objects containing from 0 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.


Tuesday, 24 April 2018

Agora.io WebRTC Basic Understanding


Question: What is Agora Recording Overview?
The Agora Recording SDK is an add-on to record and save voice calls, video calls and interactive broadcasts in server.

Support on below and above versions.
Agora Native SDK version 1.7.0
Agora Web SDK version 1.12.0
Support for CentOS x64 version 6.5 or later and Ubuntu x64 version 12.04 or later.


Question: What are benefits of using Agora Recording?
  1. High-quality recordings for Voice and video.
  2. Single OR Mix audio/video
  3. Raw data of Audio/Photo
  4. Screen Capture
  5. Customized



Question: What services does Agora CaaS provide?
Video/Audio SDKs: APIs for Real-time Audio and Video Communications with one-to-one and one-two-many.
A voice group can be a maximum of 10, 000 people online at the same time;
a video group supports up to seven people online at the same time.

Agora Cloud: We have deployed around 100 data centers in four continents, including thousands of servers.

Real-time Audio and Video Reports: tell you how many active users are using the call service, call duration, call success rate, ratio of low-quality contacts with cause analysis, and so on. In addition, distribution reports show the geographic distribution of users, of network conditions and users, and of time spent on the network. To help with operational and other business decisions, developers can check data by using daily, weekly, or background reports, anytime and anywhere.


Question: What communication functions can I implement in my application by using Agora CaaS?
1. App-App Communication
2. App-Web Communication
3. Web-Web Communication
4. App-Cellphone/Local PSTN Breakout Communication.


Question: What are the differences between Agora.io and WebRTC?
WebRTC is based on P2P, and Agora.io is based on proprietary cloud services architecture that work with P2P as required.
WebRTC may/may-not work on Mobile but Agora.io will work on mobiles.
Voice quality is better with Agora as compare to WebRTC.
WebRTC does not store the video/audio, but Agora.io save the media and stored on their server.


Question: Does Agora.io use WebRTC?
In Web, Agora use WebRTC but with lot of customization which is not available in Normal Webrtc.
In App, Agora does not use WebRTC.


Question: What is the difference between Agora CaaS and a content-delivery platform (CDN)?
In CDN, latency can be from 1-10 Seconds.
In Agora, Latency can be upto 400ms.


Question: Is Agora.io a video cloud?
No, A video cloud provides video on demand and live service. but Agora.io provide real-time live streaming.



Question: Where Agoro.io can be used?
In Call center(BPO) with recording.
LIVE Streaming Audio with available of audio.
LIVE Streaming Video with available of video.
App-Web Audio/Video communication.
App-App Audio/Video communication.
Web-Web Audio/Video communication.
Send Audio message.
Send Video message.
Can be used Educational area as its cheap in cost.


Question: is encryption available in Agora?
Yes.
Agora.io is a safe platform
When the signal is sent, it is encrypted (call setup).


Question: Can we do custom encryption?
By Default Agora built-in AES-128 encryption. but we can use customized data encryption algorithm.


Question: What are the fees for Agora services?
The first 10,000 minutes of each month are free (Audio and Video combined).
Starting from the 10,001 minute of each month, $0.00099/minute (Audio call).
Starting from the 10,001 minute of each month, $0.00399/minute(Video call).


Question: Is Agora.io HIPAA compliant?
Yes.


Question: How does the Agora.io network handle DDoS attacks?
Yes, an anti-DDoS firewall is present in each cloud data center.


Question: Which platforms does Agora.io support?
Android > 4.0
IOS > 6.0


Question: Which codecs are used by Agora.io?
Agora.io uses its own proprietary audio codec, NOVA, which is simple, low-bit-rate, and highly adaptive.


Question: How many people does Agora.io audio/video support at the same time in a call?
Audio Call: up to 10,000 people at the same time
Video Call: up to 7 people at the same time



Question: Does Agora.io provide echo cancellation?
Yes.
Question: How much bandwidth does the Agora.io SDK require?
With Wifi (4KB to 13KB per second)
With Non-Wifi (4KB to 6KB per second)


Question: Is a call interrupted when switching networks, as from Wi-Fi to 3G/4G?
Yes, Short interruption after switching networks in a call, for example, from Wi-Fi to 3G or 4G, due to the clients's needs to re-establish connection.


Question: What is command for recording the media?
/usr/bin/recorder_local --appId APPID --appliteDir "/opt/Agora_Recording_SDK_for_Linux_FULL/bin" --channel aruntest1 



Question: What is command for (Recording Auddio/Video combine)?
/usr/bin/recorder_local --appId APPID --appliteDir "/opt/Agora_Recording_SDK_for_Linux_FULL/bin" --channel aruntest2 --mixedVideoAudio 1 --isMixingEnabled 1
/usr/bin/recorder_local --appId APPID --appliteDir "/opt/Agora_Recording_SDK_for_Linux_FULL/bin" --channel aruntest3 --mixedVideoAudio 1 --isMixingEnabled 1
/usr/bin/recorder_local --appId APPID --appliteDir "/opt/Agora_Recording_SDK_for_Linux_FULL/bin" --channel aruntest7 --mixedVideoAudio 1 --isMixingEnabled 1



Question: Command to set idle time?
/usr/bin/recorder_local --appId APPID --appliteDir "/opt/Agora_Recording_SDK_for_Linux_FULL/bin" --channel aruntest10 --mixedVideoAudio 1 --isMixingEnabled 1 --idle 4



Question: Command to set the root directory?
/usr/bin/recorder_local --appId APPID --appliteDir "/opt/Agora_Recording_SDK_for_Linux_FULL/bin" --channel aruntest10 --mixedVideoAudio 1 --isMixingEnabled 1 --idle 4 --recordFileRootDir /var/www/html/recording_files/



Question: What is offical Website of agora.io?
Main Website: https://www.agora.io/
SDK: https://www.agora.io/en/sdk/
Downloads: https://www.agora.io/en/download/
Price: https://www.agora.io/en/price/



Tuesday, 17 April 2018

Rev: Online audio transcription, video captions and document translation services

Rev: Online audio transcription, video captions and document translation services

Question: What does Rev provide?
Rev provide the Online audio transcription, video captions and document translation services.


Question: What type of transcription they provide?
They provide transcription like immigration, business, legal, academic and personal needs.


Question: How much they charge?
Rev charges $1 per minute of audio. For example, a 30 minute clip costs $30.00. Timestamps and verbatim are options that cost $0.25 per minute each.


Question: How long will it take?
Audio files under 30 minutes long with good quality audio are typically delivered within 12 hours.


Question: Do they provide timestamps?
Yes, $0.25 per minute.


Question: What type of file format they accept?
We accept audio and video recordings in MP3, MP4, WMV, AIF, M4A, MOV, AVI, VOB, AMR, WMA, OGG, AAC, and WAV.


Question: What is endpoint for sandbox API?
https://api-sandbox.rev.com


Question: What is endpoint for Rev API?
https://www.rev.com


Question: What is documentation URL of API?
https://www.rev.com/api


Question: How to send order online for audio/video transcription?
Step 1
  1. Upload a source file to be used in an order via i.e. /api/v1/inputs
  2. Curl Example
curl -X POST
  https://api-sandbox.rev.com/api/v1/inputs
  -H 'authorization: AUTHORIZATION_STRING_HERE'
  -H 'cache-control: no-cache'
  -H 'content-type: application/json'
  -H 'postman-token: d6eee4bb-84ef-d54b-d15d-9ac9b3230fc2'
  -d '{
    "url": "https://useastpacificgeorama.blob.core.windows.net/useastpacifiddc/GM-qE2zq-1078-5525_720p.mp4"
}'


Response Headers
Location – URI identifying the newly uploaded media. This URI can be used to identify this media when submitting an order.


Step 2
  1. Now order online i.e. /api/v1/orders
  2. Curl Example
curl -X POST
  https://api-sandbox.rev.com/api/v1/orders
  -H 'authorization: AUTHORIZATION_STRING_HERE'
  -H 'cache-control: no-cache'
  -H 'content-type: application/json'
  -H 'postman-token: 10fa5ba8-3739-c3f2-ace9-b115f3bb6f96'
  -d '{
    "client_ref": "Georama-OvanTest",
    "transcription_options": {
        "inputs": [
            {
                "audio_length_seconds": 194,
                "uri": "urn:rev:inputmedia:U3VwbG9hZHMvMjAxOC0wNC0xMy8wMzQzOTY1MC0yMDVhLTQwMDYtYWZmMC01MjI0ZTdkNTQ2MTUvR00tcUUyenEtMTA3OC01NTI1XzcyMHAubXA0"
            }
        ],
        "verbatim": true,
        "timestamps": true
    },
    "notification": {
        "url": "http://example.com/callback/url",
        "level": "Detailed"
    }
}'

Response Headers
Location – URI identifying the newly created order. This URI can be used to request details (such as status) of the order. Only present if a 201 response code is returned.



Question: How rev will communicate to us once order is completed?
Once rev, received the request.
When they just start they will notify to us through callback function.
When they just complete they will notify to us through callback function.
All data will be sent in POST method, and have following parameters.
(
    [order_number] => TD0648810924
    [client_ref] => arunkumartest
    [status] => Complete
)



Question: How to GET order details online?
We can get the order details with API using orderId.
For Example.
curl -X GET
  https://api-sandbox.rev.com/api/v1/orders/TD0648810924
  -H 'accept: application/json'
  -H 'authorization: AUTHORIZATION_STRING_HERE'
  -H 'cache-control: no-cache'
  -H 'postman-token: aad7ead8-0b44-19b1-0f19-2b5baa4a2e6a'
Response Body
 
{
    "order_number": "TD0648810924",
    "client_ref": "OvanTest",
    "price": 4.86,
    "status": "Complete",
    "priority": "Normal",
    "non_standard_tat_guarantee": false,
    "transcription": {
        "verbatim": true,
        "timestamps": true,
        "total_length": 3,
        "total_length_seconds": 194
    },
    "comments": [
        {
            "by": "Georama I.",
            "timestamp": "2018-04-13T11:57:14.97Z"
        },
        {
            "timestamp": "2018-04-13T12:02:46.997Z",
            "text": "Order delivered"
        }
    ],
    "attachments": [
        {
            "kind": "media",
            "name": "GM-qE2zq-1078-5525_720p.mp4",
            "id": "5HYQOsWDAwAAAAAA",
            "audio_length_seconds": 194,
            "links": [
                {
                    "rel": "content",
                    "href": "https://api-sandbox.rev.com/api/v1/attachments/5HYQO2s2WDAwAAAAAA/content"
                }
            ]
        },
        {
            "kind": "transcript",
            "name": "sample_transcription.docx",
            "id": "5HYQOsqDAwAAAAAA",
            "links": [
                {
                    "rel": "content",
                    "href": "https://api-sandbox.rev.com/api/v1/attachments/5HYQO2sqDA2wAAAAAA/content",
                    "content-type": "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
                }
            ]
        }
    ]
}



Question: How to get transcriptions?
curl -X GET
  https://api-sandbox.rev.com/api/v1/attachments/5HYQO2s2WDAwAAAAAA/content
  -H 'accept: application/rev-transcription'
  -H 'authorization: AUTHORIZATION_STRING_HERE'
  -H 'cache-control: no-cache'
  -H 'postman-token: 4376e40d-9e6e-1e5a-e937-6337b9e1ade2'

Response
{"speakers":[{"id":1,"name":"Adam","icon":null,"color":null,"colorCoordinates":null,"note":null},{"id":2,"name":"Mike","icon":null,"color":null,"colorCoordinates":null,"note":null}],"monologues":[{"id":1,"speaker":1,"spans":[{"type":0,"value":"This is a sample first line"}],"startTime":null},{"id":2,"speaker":2,"spans":[{"type":0,"value":"This is a sample second line"}],"startTime":null}],"segments":[],"versionNumber":0,"offsetSeconds":0,"id":50,"name":"test.txt","metadata":{}}


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, Force.com, 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:
event['pathParameters']['param1']


You can access Header String as below:
event['requestContext']['identity']['userAgent']
event['requestContext']['identity']['sourceIP']



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": [
        "s3:GetObject"
      ],
      "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 .