Question : Company B provides an online image recognition service and utilizes SQS to decouple system components for scaleability . The SQS consumers poll the imaging queue as often as possible to keep end-to-end throughput as high as possible. However, Company B is realizing that polling in tight loops is burning CPU cycles and increasing costs with empty responses. How can Company B reduce the number empty responses? "Hint: these are API calls; if you're using an SDK, the SDK might use a different method name to make this API call but still executes the same API call below against AWS." "Tip: Understand why the message is correct and what the other API calls do. You might expect to see a question worded differently, with a different answer, but have the exact same answer options."
1. Set the imaging queue VisibilityTimeout attribute to 20 seconds 2. Set the imaging queue ReceiveMessageWaitTimeSeconds Attribute to 20 seconds 3. Access Mostly Uused Products by 50000+ Subscribers 4. Set the DelaySeconds parameter of a message to 20 seconds
Enabling long polling reduces the amount of false and empty responses from SQS service. It also reduces the number of calls that need to be made to a queue by staying connected to the queue until all messages have been received or until timeout. In order to enable long polling the ReceiveMessageWaitTimeSeconds attribute needs to be set to a number greater than 0. If it is set to 0 then short polling is enabled.
Question : Company Acmeshell is using Amazon SQS to decouple their systems for scaleability. However, they need to send messages up to Kb in size. What might Company Acmeshell do in order to send more than 256KB of data? 1. Request an increase of the message limit by contacting Amazon 2. Set the MaximumMessageSize attribute to 456KB 3. Access Mostly Uused Products by 50000+ Subscribers 4. Any of the above
Exp: There is no AWS mechanism to automatically publish SQS messages to DynamoDB. You will have to create a service that pulls SQS messages and writes these to DynamoDB or SES. DynamoDB is great, doing for scalable databases what EC2 does for hardware. One of the biggest complaints I hear though is that the pricing model doesnt work well for everybody.
DynamoDB requires you to specify up front how much capacity you think youre going to need and this is what you pay for. If I say I want to be able to handle 500 writes a second then this is what I pay for no matter if I do 1 write per second or 500.
This is all well and good if you have consistent needs throughout the day and can provision accordingly, but most companies dont. Here at Shazam we see our traffic ebb and flow throughout the day as different countries are using our application. With DynamoDB we have to provision our throughput to handle the worst case scenario, which is typically when the US is active meaning that were paying for the capacity required for the US even when we dont need it.
In order to reduce DynamoDB costs we make use of the AWS queuing service SQS to handle any DynamoDB overflow. This is a fairly straightforward process whereby we will attempt to write to DynamoDB once and once only and if this fails, dump the data onto SQS for background threads to pick up and write.
Code sends data to the SQS Fallback Writer SQS Fallback Writer attempts to write to DynamoDB Failure to write to DynamoDB triggers writing the data to SQS Draining threads poll SQS to see if there is new data to process Draining threads write to DynamoDB One of the other major benefits of using DynamoDB is the ability to alter your throughput capacity, mostly at will. Utilising the above flow allows us to shift seamlessly between costs and responsiveness by moving the DynamoDB throughput slider.
Finally, if your traffic is subject to spikes that you cant anticipate, using this technique will ensure you dont lose data and your systems remain responsive, albeit with some delay in writing.
Question :
The unique ID for an IAM entity is not available in the IAM console. To get the unique ID, you can use the CLI or API calls. Which of the following API call will help to get unique ID as per their resources.
Correct Answer : Get Lastest Questions and Answer : Exp: ListInstanceProfiles : Lists the instance profiles that have the specified path prefix. If there are none, the action returns an empty list. ListInstanceProfilesForRole: Lists the instance profiles that have the specified associated role. If there are none, the action returns an empty list. ListGroups: Lists the groups that have the specified path prefix ListRoles: Lists the roles that have the specified path prefix. If there are none, the action returns an empty list ListServerCertificates: Lists the server certificates that have the specified path prefix. If none exist, the action returns an empty list. ListSigningCertificates: Returns information about the signing certificates associated with the specified user. If there are none, the action returns an empty list.
1. You have to terminate and delete this instance. As you will never be able to connect again. 2. As you still have private key with you, you can connect with the instance. 3. Once instance is launched with the key pair, it can never be deleted from AWS 4. None