AWS-101 Flashcards
How can start with AWS?
Need to have am account and AWS Secret access keys or Root Creds
How Many AccessKeys can an IAM user has?
2
What is the only way of getting the AKeys
By downloading or recreating the user
What is the default region?
us-east-1
What is Provider chain related to ?
It is related to obtaining creds and connection to aws
How to handle the ResetException , while uploading the stream to aws?
Mark the SetReadLimit to one byte < the size of object
What is ServiceClient ?
To conenct to AWS services , each has a service client
How we can have a Service Client
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();
What facilities the Builder provides?
The Builder provides to set the prop or configs while init and provides a build method to create client
Can we have Asyn client for all AWS services?
Except for S3 we can have for all , just need to add [Async]ClientBuilder
Can we have ExceutoFactory also, while invoking the ServiceClient?
Yes We can have…AysncClientBuilder.standard().withExecutorFactory(() -> Executors.newFixedThreadPool(10)).build()
Do we have a defaultClient()
Yes Offcourse like [service]ClientBuilder.defaultClient()
Are ServiceClients thread safe?
Yes , each client has its own connection pool,
How can we explicitly shut down a ServiceClient?
{ServiceClient client } = {Service}ClientBuilder.defaultClient();
client.shutdown()
What are the ways to connect to AWS?
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
Explain the DefaultCreds Provider?
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
What do for Exception in thread “main” com.amazonaws.SdkClientException: Unable to find a region via the region provider chain
add the “region=region-name” in config file located at .aws dir
What are the 3 params for a client to obtain successfully?
aws_secret_key_id and aws_access_key_id in cred file
and region in config file