AWS-101 Flashcards

1
Q

How can start with AWS?

A

Need to have am account and AWS Secret access keys or Root Creds

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How Many AccessKeys can an IAM user has?

A

2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the only way of getting the AKeys

A

By downloading or recreating the user

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the default region?

A

us-east-1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is Provider chain related to ?

A

It is related to obtaining creds and connection to aws

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How to handle the ResetException , while uploading the stream to aws?

A

Mark the SetReadLimit to one byte < the size of object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is ServiceClient ?

A

To conenct to AWS services , each has a service client

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How we can have a Service Client

A

So each service has a service Interface and a client builder, for e.g. AmazonDynamoDB ddb = AmazonDynamoDBClientBuilder.standard()
.withRegion(Regions.US_WEST_2)
.withCredentials(new ProfileCredentialsProvider(“myProfile”))
.build();

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What facilities the Builder provides?

A

The Builder provides to set the prop or configs while init and provides a build method to create client

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Can we have Asyn client for all AWS services?

A

Except for S3 we can have for all , just need to add [Async]ClientBuilder

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Can we have ExceutoFactory also, while invoking the ServiceClient?

A

Yes We can have…AysncClientBuilder.standard().withExecutorFactory(() -> Executors.newFixedThreadPool(10)).build()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Do we have a defaultClient()

A

Yes Offcourse like [service]ClientBuilder.defaultClient()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Are ServiceClients thread safe?

A

Yes , each client has its own connection pool,

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How can we explicitly shut down a ServiceClient?

A

{ServiceClient client } = {Service}ClientBuilder.defaultClient();
client.shutdown()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are the ways to connect to AWS?

A

Use a Default credential Provider Chain, Create a specific Credential provider, or ytou may crwate your own, Supply the creds root or IAM or temp creds by STS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Explain the DefaultCreds Provider?

A

By using DefaultAWSCredentailsProviiderChain class, which serach for ENV vars , looking for AWS_SECRET_KEY_ID and AWS_SECRET_ACCESS_KEY(EnvironmentVarableCredentiealsProvider)
OR aws.accessKeyId and aws.secretKey in System Props(SystemPropertiesCredentialsProvider) OR
ProfileCredentialsProvider from ~./aws/credentials

17
Q

What do for Exception in thread “main” com.amazonaws.SdkClientException: Unable to find a region via the region provider chain

A

add the “region=region-name” in config file located at .aws dir

18
Q

What are the 3 params for a client to obtain successfully?

A

aws_secret_key_id and aws_access_key_id in cred file

and region in config file