Monday, 28 October 2019

Cloud - VI

In this post, we take a look at AWS Lambda, a good example of serverless compute. As with any serverless application, there is no need to manage any servers and related server activities like OS installation, patching, etc. Scaling is handled automatically in that AWS Lambda code is triggered in response to an event. If more events occur, then, for each event, AWS Lambda code is executed. Similarly, if lesser events occur, lesser corresponding amount of AWS Lambda code are executed. If no events occur, no Lambda is executed. Billing for Lambda is for the number of times the code is executed and code execution time in multiples of 100 milliseconds.  We will see a few simple examples on AWS Lambda below.

After logging into Management Console, call AWS Lambda, click on Create Function:
















We will not write any code from scratch. Instead, we will borrow code from an existing blueprint. In the next window, after clicking Use a blueprint, using the filter under Blueprints, bring up hello-world-python blueprint. Select it and click Configure:












Under Function name, enter FirstLambda. Select Create a new role with basic Lambda permissions under Execution role. Observe the code and click Crate Function at the bottom of the page:





















Click on Save button. Then, click on Test button to the left of Save button. In the Configure test event window, replace value1 to Hello, world! and enter LambdaEvent under Event name and click Create button at bottom:

























Once the event test event details are saved, click on Test button:











The results can be seen below:














Click on Details to see more details:













See the results output that is in line with the code. Click on Monitoring to see CloudWatch metric details:














Then, click on View logs in CloudWatch:










Click on the only record under Log Streams to see more details:












Create a second function using existing role as shown below:














Then, click Create Function at bottom of page. Default code generated is shown below:



Modify the code to include context properties as shown below including handler name:









Then, click Test to configure Text event details:

























Then, save and test the function. Results are shown below:












Execution results are shown below:














This concludes the introduction to AWS Lambda


Saturday, 14 September 2019

Cloud - V

In the fifth and final post on questions for AWS Cloud Practitioner Exam, we see the last set of questions for preparation towards AWS Cloud Practitioner accreditation. The answers to the last post are given at the start of the post followed by the last batch of questions. The answers to these questions follow these questions. These questions may be helpful for preparation of other AWS Certification Exams as well

Answers to questions in last post are given below:

46. d
47. a
48. b
49. d
50. c
51. d
52. a
53. b
54. c
55. a,c,d
56. a,b,d
57. c
58. a
59. b
60. a

The next set of questions are:

61. __________ is a fast, reliable, fully-managed graph database service that makes it easy to build and run applications that work with highly connected datasets

a) Amazon Quantum Ledger Database
b) Amazon Neptune
c) AWS Storage Gateway
d) Amazon Elastic File System

62. An easy way to get an idea of the costs incurred for moving to AWS Cloud Services is:

a) Use Simple Monthly Calculator at https://calculator.s3.amazonaws.com/index.html
b) Call AWS Region Representative and check with him
c) Call up local AWS Data Center and set up a meeting
d) Use AWS Cost Management

63. __________ is a AWS product with which we can add user sign-up, sign-in, and access control to web and mobile apps quickly

a) AWS Device Farm
b) AWS AppSync
c) Amazon Cognito
d) AWS Amplify

64. Using __________ one can create and publish interactive dashboards to deliver insights to users in an organization

a) AWS Device Farm
b) Amazon Pinpoint
c) AWS Batch
d) Amazon QuickSight
65. Amazon Elastic Block Store, Amazon Elastic File System, Amazon FSx for Lustre and Amazon FSx for Windows File Server are associated with

a) design
b) storage
c) compute
d) networking

66. __________ is a free AWS service that simplifies the billing for multiple accounts by setting up a single payment method for all the accounts in an organization through consolidated billing

a) AWS Budgets
b) AWS Cost & Usage Report
c) AWS Cost Explorer
d) AWS Organizations

67. When Amazon EC2 Reserved Instances are used, upto __ percent over equivalent capacity purchased in an On-Demand model may be realized

a) 45
b) 60
c) 75
d) 90

68. __________ is a service that monitors applications and automatically adjusts capacity to maintain steady, predictable performance at the lowest possible cost

a) AWS Auto Scaling
b) Elastic Load Balancing
c) Amazon Elastic File System
d) Amazon ElastiCache

69. Which of the following load balancers are related to Elastic Load Balancing in AWS: (Choose all that apply)

a) Classic Load Balancer
b) Advanced Load Balancer
c) Network Load Balancer
d) Application Load Balancer

70. __________ gives complete control over virtual networking environment, including selection of IP address range, creation of subnets, and configuration of route tables and network gateways

a) Amazon CloudFront
b) Amazon Virtual Private Cloud
c) AWS PrivateLink
d) AWS Cloud Map

71. When Amazon EC2 Spot Instances are used, upto __ percent over equivalent capacity purchased in an On-Demand model may be realized

a) 45
b) 60
c) 75
d) 90

72. Advantages offered by Amazon EC2 Dedicated Host include: (Choose all that apply)

a) instance running on different physical servers
b) saving money on existing server-bound licensing costs
c) rotating license usage between multiple instances
d) meeting compliance and regulatory requirements

73. __________ are best recommended for steady-state applications and customers are confident of running EC2 for periods as one or three years:

a) Dedicated Hosts
b) On-Demand Instances
c) Reserved Instances
d) Spot Instances
e) A judicious combination of above

74. Visibility of sockets, cores, and host ID are characteristics of which EC2 type:

a) Dedicated Hosts
b) On-Demand Instances
c) Dedicated Instances
d) Reserved Instances
e) Spot Instances

75. __________ gives 24x7 access to the AWS DDoS Response Team and protection against DDoS related spikes in Amazon Elastic Compute Cloud (EC2), Elastic Load Balancing (ELB), Amazon CloudFront, and Amazon Route 53 charges

a) AWS Shield Standard
b) Amazon GuardDuty
c) AWS Shield Advanced 
d) Amazon Inspector

Answers to the above questions are:

61. b
62. a
63. c
64. d
65. b
66. d
67. c
68. a
69. a,c,d
70. b
71. d
72. b,d
73. c
74. a
75. c

All the best for AWS Cloud Practitioner Exam ...

Friday, 13 September 2019

Cloud - IV

In the fourth post on Cloud topic, we see the next bunch of questions towards AWS Cloud Practitioner accreditation. The answers to the last post are given at the start of the post followed by the next set of questions. These questions may be helpful for preparation of other AWS Certification Exams as well

Answers to questions in last post are given below:

31. c
32. d
33. a
34. b
35. d
36. a
37. c
38. b
39. a
40. d
41. b
42. b
43. d
44. c
45. c

The next set of questions are:

46. __________ is an interactive query serverless service that makes it easy to analyze data in Amazon S3 using standard SQL

a) Amazon Glue
b) Amazon Aurora
c) Amazon Redshift
d) Amazon Athena

47. __________ comprises the most comprehensive set of AWS cost and usage data available, including additional metadata about AWS services, pricing, and reservations

a) AWS Cost & Usage Report
b) AWS Budgets
c) AWS Expense Report
d) AWS Forecast Report

48. __________ allows a user to run code without provisioning or managing servers paying only for compute time

a) AWS Fargate
b) AWS Lambda
c) Amazon Lightsail
d) AWS Outposts

49. __________ can be used to collect, process, and analyze real-time, streaming data to obtain timely insights and also react quickly to new information

a) Amazon Kinesis Data Firehose
b) AWS Lake Formation
c) Amazon CloudSearch
d) Amazon Kinesis

50. __________ to detect anomalous behavior in your environments, set alarms, visualize logs and metrics side by side, take automated actions, and troubleshoot issues

a) AWS Systems Manager
b) AWS Config
c) Amazon CloudWatch
d) AWS Service Catalog

51. __________ is a fast content delivery network (CDN) service that securely delivers data, videos, applications, and APIs to customers globally with low latency, and high transfer speeds

a) Amazon VPC
b) AWS PrivateLink
c) AWS Direct Connect
d) Amazon CloudFront

52. __________ is an online resource to reduce cost, increase performance, and improve security by optimizing AWS environment

a) AWS Trusted Advisor 
b) AWS OpsWorks
c) AWS License Manager
d) AWS Auto Scaling

53. __________ makes it easy to establish a dedicated network connection from customer premises to AWS to reduce reduce network costs, increase bandwidth throughput, and provide a more consistent network experience than regular Internet-based connections

a) AWS Global Accelerator
b) AWS Direct Connect
c) AWS PrivateLink
d) Amazon Route 53

54. Which of the following does not contribute to Amazon RDS cost:

a) Number of database instances
b) Database characteristics
c) Inbound data transfer
d) Clock hours of server time

55. The three modes of accessing data in Amazon S3 Glacier are:

a) Standard
b) Non-Standard
c) Bulk
d) Expedited
e) Immediate

56. Which of the following are valid cost saving measures using reservations? (Choose all that apply)

a) Amazon ElastiCache Reserved Nodes
b) Amazon RDS Reserved Instances
c) Amazon Athena Reserved Nodes
d) Amazon Redshift Reserved Nodes
e) Amazon Simple Queue Service Reserved Instances

57. __________ lets customers view and manage a select set of resources to support incident response while on-the-go

a) AWS Management Console 
b) AWS Command Line Interface
c) AWS Console Mobile Application
d) Amazon CloudWatch

58. Under the Shared Responsibility Model, Amazon is responsible for security of the cloud while the customer is responsible for security in the cloud

a) True
b) False

59. Using which AWS product can we send notifications in the form of SMS and emails?

a) Amazon SWF
b) Amazon SNS
c) Amazon SQS
d) Amazon MQ

60. __________ is the industry leading cloud-native big data platform, allowing teams to process vast amounts of data quickly, and cost-effectively at scale

a) Amazon EMR 
b) Amazon CloudSearch
c) Amazon Kinesis Data Streams
d) AWS Lake Formation
Answers in next post ...