Tuesday, April 25, 2023

Java8.0

 Java 8.0 IV

1. Describe the newly added features in Java 8?

Here are the newly added features of Java 8:

Feature Name Description
Lambda expression A function that can be shared or referred to as an object.
Functional Interfaces Single abstract method interface.
Method References Uses function as a parameter to invoke a method.
Default method It provides an implementation of methods within interfaces enabling 'Interface evolution' facilities.
Stream API Abstract layer that provides pipeline processing of the data.
Date Time API New improved joda-time inspired APIs to overcome the drawbacks in previous versions
Optional Wrapper class to check the null values and helps in further processing based on the value.
Nashorn, JavaScript Engine An improvised version of JavaScript Engine that enables JavaScript executions in Java, to replace Rhino.

2. In which programming paradigm Java 8 falls?

  • Object-oriented programming language.
  • Functional programming language.
  • Procedural programming language.
  • Logic programming language

3. What are the significant advantages of Java 8?

  • Compact, readable, and reusable code.
  • Less boilerplate code.
  • Parallel operations and execution.
  • Can be ported across operating systems.
  • High stability.
  • Stable environment.
  • Adequate support
You can download a PDF version of Java 8 Interview Questions.

4. What is MetaSpace? How does it differ from PermGen?

JVM

PremGen: MetaData information of classes was stored in PremGen (Permanent-Generation) memory type before Java 8. PremGen is fixed in size and cannot be dynamically resized. It was a contiguous Java Heap Memory.

MetaSpace: Java 8 stores the MetaData of classes in native memory called 'MetaSpace'. It is not a contiguous Heap Memory and hence can be grown dynamically which helps to overcome the size constraints. This improves the garbage collection, auto-tuning, and de-allocation of metadata.

5. What are functional or SAM interfaces?

Functional Interfaces are an interface with only one abstract method. Due to which it is also known as the Single Abstract Method (SAM) interface. It is known as a functional interface because it wraps a function as an interface or in other words a function is represented by a single abstract method of the interface.

Functional interfaces can have any number of default, static, and overridden methods. For declaring Functional Interfaces @FunctionalInterface annotation is optional to use. If this annotation is used for interfaces with more than one abstract method, it will generate a compiler error.

@FunctionalInterface // Annotation is optional 
public interface Foo() { 
// Default Method - Optional can be 0 or more 
public default String HelloWorld() { 
return "Hello World"; 
} 
// Static Method - Optional can be 0 or more 
public static String CustomMessage(String msg) { 
return msg; 
} 
// Single Abstract Method 
public void bar(); 
} 

public class FooImplementation implements Foo { 
// Default Method - Optional to Override
@Override
public default String HelloWorld() { 
return "Hello Java 8"; 
} 
// Method Override
@Override
public void bar() {
	System.out.println(“Hello World”);
} 
} 

public static void main(String[] args) { 

FooImplementation fi = new FooImplementation();
System.out.println(fi.HelloWorld());
System.out.println(fi.CustomMessage(“Hi”));
fi.bar();
}

6. Can a functional interface extend/inherit another interface?

A functional interface cannot extend another interface with abstract methods as it will void the rule of one abstract method per functional interface. E.g:

interface Parent { 
public int parentMethod(); 
} 
@FunctionalInterface // This cannot be FunctionalInterface 
interface Child extends Parent { 
public int childMethod(); 
// It will also extend the abstract method of the Parent Interface 
// Hence it will have more than one abstract method 
// And will give a compiler error 
}

It can extend other interfaces which do not have any abstract method and only have the default, static, another class is overridden, and normal methods. For eg:

interface Parent { 
public void parentMethod(){ 
System.out.println("Hello"); 
} 
} 
@FunctionalInterface 
interface Child extends Parent { 
public int childMethod(); 
}

7. What is the default method, and why is it required?

A method in the interface that has a predefined body is known as the default method. It uses the keyword default. default methods were introduced in Java 8 to have 'Backward Compatibility in case JDK modifies any interfaces. In case a new abstract method is added to the interface, all classes implementing the interface will break and will have to implement the new method. With default methods, there will not be any impact on the interface implementing classes. default methods can be overridden if needed in the implementation. Also, it does not qualify as synchronized or final.

@FunctionalInterface // Annotation is optional 
public interface Foo() { 
// Default Method - Optional can be 0 or more 
public default String HelloWorld() { 
return "Hello World"; 
} 
// Single Abstract Method 
public void bar(); 
}

8. What are static methods in Interfaces?

Static methods, which contains method implementation is owned by the interface and is invoked using the name of the interface, it is suitable for defining the utility methods and cannot be overridden.

9. What are some standard Java pre-defined functional interfaces?

Some of the famous pre-defined functional interfaces from previous Java versions are Runnable, Callable, Comparator, and Comparable. While Java 8 introduces functional interfaces like Supplier, Consumer, Predicate, etc. Please refer to the java.util.function doc for other predefined functional interfaces and its description introduced in Java 8.

Runnable: use to execute the instances of a class over another thread with no arguments and no return value. 

Callable: use to execute the instances of a class over another thread with no arguments and it either returns a value or throws an exception.

Comparator: use to sort different objects in a user-defined order

Comparable: use to sort objects in the natural sort order

10. What are the various categories of pre-defined function interfaces?

Function: To transform arguments in returnable value.

Predicate: To perform a test and return a Boolean value.

Consumer: Accept arguments but do not return any values.

Supplier: Do not accept any arguments but return a value. 

Operator: Perform a reduction type operation that accepts the same input types.

11. What is the lambda expression in Java and How does a lambda expression relate to a functional interface?

Lambda expression is a type of function without a name. It may or may not have results and parameters. It is known as an anonymous function as it does not have type information by itself. It is executed on-demand. It is beneficial in iterating, filtering, and extracting data from a collection.

As lambda expressions are similar to anonymous functions, they can only be applied to the single abstract method of Functional Interface. It will infer the return type, type, and several arguments from the signature of the abstract method of functional interface.

Java 8 Interview Questions for Experienced

12. What is the basic structure/syntax of a lambda expression?

FunctionalInterface fi = (String name) -> { 
System.out.println("Hello "+name); 
return "Hello "+name; 
}

Lambda expression can be divided into three distinct parts as below:

1. List of Arguments/Params:

(String name) 

A list of params is passed in () round brackets. It can have zero or more params. Declaring the type of parameter is optional and can be inferred for the context. 

2. Arrow Token:

-> 
Arrow token is known as the lambda arrow operator. It is used to separate the parameters from the body, or it points the list of arguments to the body. 3. Expression/Body:

{ 
System.out.println("Hello "+name); 
return "Hello "+name; 
}

A body can have expressions or statements. {} curly braces are only required when there is more than one line. In one statement, the return type is the same as the return type of the statement. In other cases, the return type is either inferred by the return keyword or void if nothing is returned.

13. What are the features of a lambda expression?

Below are the two significant features of the methods that are defined as the lambda expressions: 

  • Lambda expressions can be passed as a parameter to another method. 
  • Lambda expressions can be standalone without belonging to any class.

14. What is a type interface?

Type interface is available even in earlier versions of Java. It is used to infer the type of argument by the compiler at the compile time by looking at method invocation and corresponding declaration.

15. What are the types and common ways to use lambda expressions?

A lambda expression does not have any specific type by itself. A lambda expression receives type once it is assigned to a functional interface. That same lambda expression can be assigned to different functional interface types and can have a different type.

For eg consider expression s -> s.isEmpty() :

Predicate<String> stringPredicate = s -> s.isEmpty(); 
Predicate<List> listPredicate = s -> s.isEmpty();
Function<String, Boolean> func = s -> s.isEmpty();
Consumer<String> stringConsumer = s -> s.isEmpty();

Common ways to use the expression

Assignment to a functional Interface —> Predicate<String> stringPredicate = s -> s.isEmpty();
Can be passed as a parameter that has a functional type —> stream.filter(s -> s.isEmpty())
Returning it from a function —> return s -> s.isEmpty()
Casting it to a functional type —> (Predicate<String>) s -> s.isEmpty()

16. In Java 8, what is Method Reference?

Method reference is a compact way of referring to a method of functional interface. It is used to refer to a method without invoking it. :: (double colon) is used for describing the method reference. The syntax is class::methodName

For e.g.: 

Integer::parseInt(str) \\ method reference

str -> Integer.ParseInt(str); \\ equivalent lambda



17. What does the String::ValueOf expression mean?

It is a static method reference to method Valueof() of class String. It will return the string representation of the argument passed.

18. What is an Optional class?

Optional is a container type which may or may not contain value i.e. zero(null) or one(not-null) value. It is part of java.util package. There are pre-defined methods like isPresent(), which returns true if the value is present or else false and the method get(), which will return the value if it is present.

static Optional<String> changeCase(String word) {
if (name != null && word.startsWith("A")) {
   return Optional.of(word.toUpperCase());
  }
else {
return Optional.ofNullable(word); // someString can be null
}
}
Optional Class

19. What are the advantages of using the Optional class?

Below are the main advantage of using the Optional class: 

It encapsulates optional values, i.e., null or not-null values, which helps in avoiding null checks, which results in better, readable, and robust code It acts as a wrapper around the object and returns an object instead of a value, which can be used to avoid run-time NullPointerExceptions.

20. What are Java 8 streams?

A stream is an abstraction to express data processing queries in a declarative way. 

A Stream, which represents a sequence of data objects & series of operations on that data is a data pipeline that is not related to Java I/O Streams does not hold any data permanently.
The key interface is java.util.stream.Stream<T>. It accepts Functional Interfaces so that lambdas can be passed. Streams support a fluent interface or chaining. Below is the basic stream timeline marble diagram:

Java 8 Streams

21. What are the main components of a Stream?

Components of the stream are:

  • A data source
  • Set of Intermediate Operations to process the data source
  • Single Terminal Operation that produces the result
Components of Stream

22. What are the sources of data objects a Stream can process?

A Stream can process the following data:

  • A collection of an Array.
  • An I/O channel or an input device.
  • A reactive source (e.g., comments in social media or tweets/re-tweets) 
  • A stream generator function or a static factory.

23. What are Intermediate and Terminal operations?

Intermediate Operations:

  • Process the stream elements.
  • Typically transforms a stream into another stream.
  • Are lazy, i.e., not executed till a terminal operation is invoked.
  • Does internal iteration of all source elements.
  • Any number of operations can be chained in the processing pipeline.
  • Operations are applied as per the defined order.
  • Intermediate operations are mostly lambda functions.

Terminal Operations:

  • Kick-starts the Stream pipeline.
  • used to collect the processed Stream data.
int count = Stream.of(1, 2, 3, 4, 5)
.filter(i -> i <4) // Intermediate Operation filter
.count(); // Terminal Operation count

24. What are the most commonly used Intermediate operations?

Filter(Predicate<T>) - Allows selective processing of Stream elements. It returns elements that are satisfying the supplied condition by the predicate.

map(Funtion<T, R>) - Returns a new Stream, transforming each of the elements by applying the supplied mapper function.= sorted() - Sorts the input elements and then passes them to the next stage.

distinct() - Only pass on elements to the next stage, not passed yet.

limit(long maxsize) - Limit the stream size to maxsize.

skip(long start) - Skip the initial elements till the start.

peek(Consumer) - Apply a consumer without modification to the stream.

flatMap(mapper) - Transform each element to a stream of its constituent elements and flatten all the streams into a single stream.

25. What is the stateful intermediate operation? Give some examples of stateful intermediate operations.

To complete some of the intermediate operations, some state is to be maintained, and such intermediate operations are called stateful intermediate operations. Parallel execution of these types of operations is complex.

For Eg: sorted() , distinct() , limit() , skip() etc. 

Sending data elements to further steps in the pipeline stops till all the data is sorted for sorted() and stream data elements are stored in temporary data structures.

26. What is the most common type of Terminal operations?

  • collect() - Collects single result from all elements of the stream sequence.
  • reduce() - Produces a single result from all elements of the stream sequence
    • count() - Returns the number of elements on the stream.
    • min() - Returns the min element from the stream.
    • max() - Returns the max element from the stream.
  • Search/Query operations
    • anyMatch() , noneMatch() , allMatch() , ... - Short-circuiting operations.
    • Takes a Predicate as input for the match condition.
    • Stream processing will be stopped, as and when the result can be determined.
  • Iterative operations
    • forEach() - Useful to do something with each of the Stream elements. It accepts a consumer.
    • forEachOrdered() - It is helpful to maintain order in parallel streams.

27. What is the difference between findFirst() and findAny()?

findFirst() findAny()
Returns the first element in the Stream Return any element from the Stream
Deterministic in nature Non-deterministic in nature

28. How are Collections different from Stream?

Collections are the source for the Stream. Java 8 collection API is enhanced with the default methods returning Stream<T> from the collections.

Collections Streams
Data structure holds all the data elements No data is stored. Have the capacity to process an infinite number of elements on demand
External Iteration Internal Iteration
Can be processed any number of times Traversed only once
Elements are easy to access No direct way of accessing specific elements
Is a data store Is an API to process the data

29. What is the feature of the new Date and Time API in Java 8?

  • Immutable classes and Thread-safe 
  • Timezone support
  • Fluent methods for object creation and arithmetic
  • Addresses I18N issue for earlier APIs
  • Influenced by popular joda-time package
  • All packages are based on the ISO-8601 calendar system

30. What are the important packages for the new Data and Time API?

  • java.time
    • dates 
    • times 
    • Instants 
    • durations 
    • time-zones 
    • periods
  • Java.time.format
  • Java.time.temporal
  • java.time.zone

31. Explain with example, LocalDate, LocalTime, and LocalDateTime APIs.

LocalDate

  • Date with no time component
  • Default format - yyyy-MM-dd (2020-02-20)
  • LocalDate today = LocalDate.now();  // gives today’s date
  • LocalDate aDate = LocalDate.of(2011, 12, 30); //(year, month, date)

LocalTime

  • Time with no date with nanosecond precision
  • Default format - hh:mm:ss:zzz (12:06:03.015) nanosecond is optional
  • LocalTime now = LocalTime.now();  // gives time now
  • LocalTime aTime2 = LocalTime.of(18, 20, 30); // (hours, min, sec)

LocalDateTime

  • Holds both Date and Time
  • Default format - yyyy-MM-dd-HH-mm-ss.zzz (2020-02-20T12:06:03.015)
  • LocalDateTime timestamp = LocalDateTime.now(); // gives timestamp now
  • //(year, month, date, hours, min, sec)
  • LocalDateTime dt1 = LocalDateTime.of(2011, 12, 30, 18, 20, 30);

32. Define Nashorn in Java 8

Nashorn is a JavaScript processing engine that is bundled with Java 8. It provides better compliance with ECMA (European Computer Manufacturers Association) normalized JavaScript specifications and better performance at run-time than older versions.

33. What is the use of JJS in Java 8?

As part of Java 8, JJS is a command-line tool that helps to execute the JavaScript code in the console. Below is the example of CLI commands:

JAVA>jjs
jjs> print("Hello, Java 8 - I am the new JJS!")
Hello, Java 8 - I am the new JJS!
jjs> quit()
>>

Saturday, April 22, 2023

Questions:

Amazon Elastic Block Store

Amazon Elastic Block Store (Amazon EBS) provides block level storage volumes for use with EC2 instances. EBS volumes behave like raw, unformatted block devices. You can mount these volumes as devices on your instances. EBS volumes that are attached to an instance are exposed as storage volumes that persist independently from the life of the instance. You can create a file system on top of these volumes, or use them in any way you would use a block device (such as a hard drive). You can dynamically change the configuration of a volume attached to an instance.

We recommend Amazon EBS for data that must be quickly accessible and requires long-term persistence. EBS volumes are particularly well-suited for use as the primary storage for file systems, databases, or for any applications that require fine granular updates and access to raw, unformatted, block-level storage. Amazon EBS is well suited to both database-style applications that rely on random reads and writes, and to throughput-intensive applications that perform long, continuous reads and writes.

With Amazon EBS, you pay only for what you use. For more information about Amazon EBS pricing, see the Projecting Costs section of the Amazon Elastic Block Store page.

Explain in depth what AWS is?

AWS stands for Amazon Web Service. It is a group of remote computing services, which is also known as a cloud computing platform. This new dimension of cloud computing is also known as IAAS or infrastructure as a service.

What are the three varieties of cloud services?

The three different varieties of cloud services include:

·       Computing

·       Storage

·       Networking

Define Auto-scaling?

Auto-scaling is an activity that lets you dispatch advanced instances on demand. Moreover, auto-scaling helps you to increase or decrease resource capacity according to the application.

What do you mean by AMI?

AMI stands for Amazon Machine Image. It is a kind of template that provides you related information (an operating system, an application server, and applications) that is needed to launch the instance, which is indeed a copy of the AMI working as a virtual server in the cloud. With the help of different AMIs, you can easily launch instances.

Can you illustrate the relationship between an instance and AMI?

With the help of just a single AMI, you can launch multiple instances and that to even different types. At the same time, an instance type is characterized by the host computer’s hardware that is utilized for your instance. Each instance provides different computer and memory capabilities. Once the situation is launched, you will find it looking like a traditional host, and you can communicate with it as one would with any computer.

What does geo-targeting in CloudFront mean?

Suppose you want your business to produce and show personalized content to the audience based on their geographic location without making any changes to the URL, head straight to geo-targeting. Geo-targeting enables you to create customized content for the group of spectators of a specific geographical area, all by keeping their needs ahead.


What is AWS S3?

S3 stands for Simple Storage Service. AWS S3 can be utilized to store and get any amount of data at any time and the best part from anywhere on the web. The payment model for S3 is to pay as you go.


How can one send a request to Amazon S3?

You can send the request by utilizing the AWS SDK or REST API wrapper libraries

1.   AWS SDK

2.   REST API

 

What is a default storage class in S3?

The “standard frequency accessed” is the default storage class in S3.


What different storage classes accessible in Amazon S3?

Storage class that is accessible in Amazon S3 are:

·       Amazon S3 standard

·       Amazon S3 standard infrequent access

·       Amazon S3 reduced repetition storage

·       Amazon glacier

 

What are the ways to encipher the data in S3?

Three different methods will let you encipher the data in S3

 

·       Server-side encryption – C

·       Server-side encryption – S3

·       Server-side encryption – KMS

 

On what grounds the pricing policy of the S3 is decided?

Following factors are taken under consideration while deciding S3:

 

·       Transfer of data

·       Storage that is utilized

·       Number of requests made

·       Transfer acceleration

·       Storage management


What are the different types of routing policies that are available in Amazon route S3?

The various types of routing policies available are as follows:

1.   latency based

2.   Weighted

3.   Failover

4.   Simple

5.   Geolocation

 

What is the standard size of an S3 bucket?

The maximum size of an S3 bucket is five terabytes.

 

Is Amazon S3 an international service?

Yes, Definitely. Amazon S3 is an international service. Its main objective is to provide an object storage facility through the web interface, and it utilizes the Amazon scalable storage infrastructure to function its global network.

 

Block storage is a technology that stores data in fixed-sized blocks on storage devices or cloud-based environments12345. Each block has a unique address that is used by a management application to access and assemble data files45. Block storage is favored for fast, efficient, and reliable data transportation and editing

 

Image result for what is block storage. Size: 124 x 160. Source: www.esds.co.in

 

What are the important differences between EBS and S3?

 

·       EBS is highly scalable, whereas S3 is less scalable.

·       EBS has blocked storage; on the other hand, S3 is object storage.

·       EBS works faster than S3, whereas S3 works slower than EBS.

·       The user can approach EBS only through the given EC2 instance, but S3 can be accessible by anyone. It is a public instance.

·       EBS supports the file system interface, whereas S3 supports the web interface.

scal·able - able to be scaled or climbed

 

 

What is the process to upgrade or downgrade a system that involves near-zero downtime?

With the help of these following steps, one can upgrade or downgrade a system with near-zero downtime:

·       Start EC2 console

·       Select the AMI operating system

·       Open an instance with a recent instance type

·       Install the updates

·       Install applications

·       Analyze the instance to check whether it is working

·       If working then expand the new instance and cover it up with the older one

·       After it is extended the system with near-zero downtime can be upgraded and downgraded

[ AMI – Amazon Machine Image ]

 

What all is included in AMI?

AMI includes the following:

·       A template for the root volume for the instance

·       Opening permission

·       A block mapping which helps to decide on the capacity to be attached when it gets launched.

 

 
Are there any tools or techniques available that will help one understand if you are paying more than you should be and how accurate it is?

With the help of these below-mentioned resources, you will know whether the amount you are paying for the resource is accurate or not:

·       Check the top services table: You will find this on the dashboard in the cost management console that will display the top five most used services. This will also demonstrate how much you are paying on the resources in question.

·       Cost explorer: With the help of cost explorer, you can see and check the usage cost for 13 months. Moreover, know the amount of the next three months too.

·       AWS budget: This lets you plan your budget efficiently. 

·       Cost allocation tags: Get to view that resource that has cost you more in a particular month. Moreover, organize and track your resource as well.

Apart from the console, is there any substitute tool available that will help me log into the cloud environment?

·       AWS CLI for Linux

·       Putty

·       AWS CLI for Windows

·       AWS CLI for Windows CMD

·       AWS SDK

·       Eclipse

 
Can you name some AWS services that are not region-specific?

·       IAM

·       Route 53

·       Web application firewall

·       CloudFront

 

Can you define EIP?

EIP stands for Elastic IP address. It is a static Ipv4 address that is provided by AWS to administer dynamic cloud computing services. 

 

VPC – Virtual Private Cloud

What is VPC?

VPC stands for Virtual Private cloud. VPC enables you to open AWS resources into the world of virtual networks. With its help, network configuration, as per the users’ business requirements, can be build-up and personalized.

 

ap·pre·hend - understand or perceive

 

Illustrate some security products and features that are available in VPC?

·       Security groups: This plays the role of the firewall for the EC2 instances and helps to control inbound and outbound traffic at the instance grade.

·       Network access control lists: This represents the role of the firewall for the subnets and helps control inbound and outbound traffic at the subnet grade.

·       Flow logs: Flow logs help apprehend incoming and the outbound traffic from the network interfaces in your VPC

 

 

How can an Amazon VPC be monitored?

One can control VPC by using the following:

·       CloudWatch and CloudWatch logs

·       VPC flow logs

 

How many subnets can one have as per VPC?

One can have up to 200 subnets per VPC

 

Provide the default table that we get when one sets up AWS VPC?

The list of default tables are as follows:

·       Network ACL

·       Security group

·       Route table

 

 

How can security to your VPC be controlled?

One can utilize security groups, network access controls (ACLs), and flow logs to administer your AWS VPC security.

 

Does the property of the broadcast or multicast be backed up by Amazon VPC?

No. As of now, Amazon VPI does not provide any support for broadcast or multicast process.

 

Explain the difference between a Domain and a Hosted Zone?
This is the frequently asked question.
Domain

A domain is a collection of data describing a self-contained administrative and technical unit. For example www.vinsys.com is a domain and a general DNS concept.

Hosted zone

A hosted zone is a container that holds information about how you want to route traffic on the internet for a specific domain. For example fls.vinsys.com is a hosted zone.

 

 

What are NAT gateways?

NAT stands for Network Address Translation. NAT enables instances to associate in a private subnet with the help of the internet and other AWS services. Furthermore, NAT prohibits the internet from having a connection with the instances.

 

How many buckets can be set-up in AWS by default?

You can build-up up to 100 buckets in each AWS account by default.

 

 

How is SSH agent forwarding set-up so that you do not have to copy the key every time you log in?

Here are the steps to achieve the set-up for this:

·      Go to PuTTY configuration

·      Log in to category SSH — Auth

·      Allow SSH agent forwarding to your instance.

 

 

Amazon EC2

What are the different varieties of EC2 instances based on their expenditure?

The three varieties of EC2 instances based on their cost are:

On-demand instance: This comes in a lesser amount but is not recommended for long term use.

Spot instance: This is not much expensive and can be purchased through bidding.

Reserved instance: This one is recommended for those who are planning to utilize an instance for a year or more.

 

What is the best security practice for Amazon EC2?

Go through the following steps for secure Amazon EC2 best practice:

·      Utilize AWS identity and access management to control access to your AWS resource.

·      Forbid access by enabling only trusted hosts or networks to access ports on your instance.

·      Analyze the rules in your security groups regularly.

·      Open only permission that you need

·      Stop passport login, for instance, opened from your AMI

 

 

What are the steps to configure CloudWatch to reclaim EC2 instance?

Here are the steps that will help you restore EC2 instance:

·      Set up an alarm with the help of Amazon CloudWatch

·      In the alarm, go to Define alert and go to the action tab

·      Select recover this instance option

 

What are the various types of AMI designs?

The types are

·      Completely baked AMI

·      Slightly baked AMI (JeOS AMI)

·      Hybrid AMI

 

How can a user gain access to a specific bucket?

One needs to cover the below-mentioned steps to gain access:

·      Classify your instances

·      Elaborate on how licensed users can administer the specific server

·      Lockdown your tags

·      Attach your policies to IAM users

 

 How can a current instance be added to a new Autoscaling group?

Have a look at the steps how you can add an existing instance to a new auto-scaling group:

·      Launch EC2 console

·      Under instances select your instance

·      Select the action, instance setting and attach to the auto-scaling group

·      Choose a new auto-scaling group

·      Adhere to this group to the instance

·      If needed edit the instance

·      After you are done, you can add the instance to a new auto-scaling group successfully.

 

What is SQS?

SQS stands for Simple Queue Service. SQS administers the message queue service. Either you can move the data or message from one application to another even though it is not in an active state. With the help of SQS, one can be sent between multiple services.

 

What are the types of queues in SQS?

There are two types of queues in SQS:

·      Standard Queues: This type of queue provides a limitless number of transactions per second. Standard Queue is a default queue type.

·      FIFO Queues: FIFO queues ensure that the order of messages is received and is strictly conserved in the precise order that they sent.

 

 

What are the different types of instances available?

Below we have mentioned the following types of instances that are available:

·      General-purpose

·      Storage optimize

·      Accelerated computing

·      Computer-optimized

·      Memory-optimized

 

What aspects need to be considered while migrating to Amazon Web Services?

Have a look at the aspects that need to be taken into consideration:

·      Operational amount

·      Workforce Capacity

·      Cost evasion

·      Operational facility

·      Business quickness

 

What are the components of an AWS CloudFormation template?

YAML or JSON are the two AWS Cloud formation templates that consist of five essential elements.

·      Template framework

·      Output values

·      Data tables

·      Resources

·      File format version

 

 

What are the key pairs in AWS?

Secure logs in information for your virtual machine are key pairs. To associate with the instances, you can utilize the key pairs, which consist of a public key and private key.

 

How many Elastic IPs are granted you to set up by AWS?

VPC Elastic IP addresses are granted for each AWS account.

 

What are the advantages of auto-scaling?

Here are the various advantages of auto-scaling:

·      Autoscaling provides fault tolerance

·      Provides much-improved availability

·      Better cost management policy.

 

How can old snapshots be auto-deleted?

Have a look at the steps to auto-delete old snapshots:

·      For best practices snapshots needs to be taken of EBS volumes on Amazon S3

·      AWS Ops automaton is utilized to handle all the snaps naturally

·      This lets you set up, copy and delete Amazon EBS snapshots.

 

 

What is baked AMI?

What is fault tolerance?

 

 

 

 

 

If an organization splits its workload between public cloud and private servers, what do you call this approach?

 

"This is a hybrid cloud approach to cloud management. Some organizations use this because it may improve their speed or operating costs. In this approach, it's essential that the two servers work seamlessly together."

 

 

Explain how to scale an AWS instance vertically.

"To vertically scale on AWS, start by creating a new, larger instance of AWS, then pause the existing one. Remove and discard the root EBS volume from the server. Then, pause the live instance to remove its existing root volume. After noting the ID number, put the root volume into the new server and restart."

 

In simple terms, explain the difference between vertical and horizontal scaling?

"To vertically scale on AWS, start by creating a new, larger instance of AWS, then pause the existing one. Remove and discard the root EBS volume from the server. Then, pause the live instance to remove its existing root volume. After noting the ID number, put the root volume into the new server and restart."

 

What functionality lets you terminate unhealthy instances and replace them with new ones?

Terminating unhealthy instances typically leads to better performance. An employer may ask this to ensure you know standard methods for improving performance. For this question, craft a logical, descriptive answer that includes the benefits of that function.

 

What skills are important for an AWS developer

"Essential skills for an AWS developer include C#, Java, Python, advanced computer networking skills, hardware troubleshooting skills, understanding of security features and skills gained from experience with AWS."

 

 

 

 

 

Describe a time you used auto scaling.

"As a developer, I designed and developed a web service with auto scaling. I noticed that traffic patterns on the website were highest between 10:30 a.m. and 12:30 p.m. from Monday through Friday. Using auto scaling, I configured the service to support more users during peak hours. This resulted in better service delivery to all users."

 

 


Docker Swarn

Docker is a tool intended to make the process of creating, deploying and running applications easier by using container based virtualization...