Practice Free CLF-C02 Exam Online Questions
A company is running an Amazon EC2 instance in a VPC.
An ecommerce company is using Amazon EC2 Auto Scaling groups to manage a fleet of web servers running on Amazon EC2.
This architecture follows which AWS Well-Architected Framework best practice?
- A . Secure the workload
- B . Decouple infrastructure components
- C . Design for failure
- D . Think parallel
C
Explanation:
Design for failure is one of the best practices of the AWS Well-Architected Framework. It means that the architecture should be resilient and fault-tolerant, and able to handle failures without impacting the availability and performance of the applications. By using Amazon EC2 Auto Scaling groups, the ecommerce company can design for failure by automatically scaling the number of EC2 instances up or down based on demand or health status. Amazon EC2 Auto Scaling groups can also distribute the EC2 instances across multiple Availability Zones, which are isolated locations within an AWS Region that have independent power, cooling, and network connectivity. This way, the company can ensure that their web servers can handle traffic spikes, recover from failures, and provide a consistent user experience
A company is running a monolithic on-premises application that does not scale and is difficult to maintain. The company has a plan to migrate the application to AWS and divide the application into microservices.
Which best practice of the AWS Well-Architected Framework is the company following with this plan?
- A . Integrate functional testing as part of AWS deployment.
- B . Use automation to deploy changes.
- C . Deploy the application to multiple locations.
- D . Implement loosely coupled dependencies.
D
Explanation:
The company is following the best practice of implementing loosely coupled dependencies by migrating the application to AWS and dividing the application into microservices. Loosely coupled dependencies are a design principle of the AWS Well-Architected Framework that helps to reduce the interdependencies between components and improve the scalability, reliability, and performance of the system. By breaking down the monolithic application into smaller, independent, and modular services, the company can reduce the complexity and maintenance costs, increase the agility and flexibility, and enable faster and more frequent deployments. AWS CloudFormation is an AWS service that provides the ability to manage infrastructure as code. Infrastructure as code is a process of defining and provisioning AWS resources using code or templates, rather than manual actions or scripts. AWS CloudFormation allows users to create and update stacks of AWS resources based on predefined templates that describe the desired state and configuration of the resources. AWS CloudFormation automates and simplifies the deployment and management of AWS resources, and ensures consistency and repeatability across different environments and regions. AWS CloudFormation also supports rollback, change sets, drift detection, and nested stacks features that help users to monitor andcontrol the changes to their infrastructure.
Reference: Implementing Loosely Coupled Dependencies, What is AWS CloudFormation?
A company has a single Amazon EC2 instance. The company wants to adopt a highly available architecture.
What can the company do to meet this requirement?
- A . Scale vertically to a larger EC2 instance size.
- B . Scale horizontally across multiple Availability Zones.
- C . Purchase an EC2 Dedicated Instance.
- D . Change the EC2 instance family to a compute optimized instance.
B
Explanation:
Scaling horizontally across multiple Availability Zones is a way to adopt a highly available architecture, as it increases the fault tolerance and resilience of the application. Scaling vertically to a larger EC2 instance size is a way to improve the performance of the application, but it does not improve the availability. Purchasing an EC2 Dedicated Instance is a way to isolate the instance from other AWS customers, but it does not improve the availability. Changing the EC2 instance family to a compute optimized instance is a way to optimize the instance type for the workload, but it does not improve the availability. These concepts are explained in the AWS Well-Architected Framework2.
A company wants to control the protection of its AWS resources. The company wants to block SQL injection attacks and cross-site scripting.
Which AWS service or feature meets these requirements?
- A . Amazon GuardDuty
- B . AWSWAF
- C . Security groups
- D . AWS Shield
Which AWS service or tool inspects a user’s AWS environment and makes recommendations for cost
savings and system performance improvements?
- A . Cost Explorer
- B . AWS Trusted Advisor
- C . Amazon Inspector
- D . AWS Budgets
Which AWS solution provides the ability for a company to run AWS services in the company’s on-premises data center?
- A . AWS Direct Connect
- B . AWS Outposts
- C . AWS Systems Manager hybrid activations
- D . AWS Storage Gateway
B
Explanation:
AWS Outposts is a fully managed service that extends AWS infrastructure, AWS services, APIs, and tools to virtually any datacenter, co-location space, or on-premises facility for a truly consistent hybrid experience. AWS Outposts enables you to run AWS services in your on-premises data center1.
A company wants to build a new web application by using AWS services. The application must meet the on-demand load for periods of heavy activity.
Which AWS services or resources provide the necessary workload adjustments to meet these requirements? (Select TWO.)
- A . Amazon Machine Image (AMI)
- B . Amazon EC2 Auto Scaling
- C . Amazon EC2 instance
- D . AWS Lambda
- E . EC2 Image Builder
B,D
Explanation:
Amazon EC2 Auto Scaling helps you ensure that you have the correct number of Amazon EC2 instances available to handle the load for your application. You create collections of EC2 instances, called Auto Scaling groups. You can specify the minimum number of instances in each Auto Scaling group, and Amazon EC2 Auto Scaling ensures that your group never goes below this size. You can specify the maximum number of instances in each Auto Scaling group, and Amazon EC2 Auto Scaling ensures that your group never goes above this size4. AWS Lambda lets you run code without provisioning or managing servers. You pay only for the compute time you consume. With Lambda, you can run code for virtually any type of application or backend service – all with zero administration. Just upload your code and Lambda takes care of everything required to run and scale your code with high availability. You can set up your code to automatically trigger from other AWS services or call it directly from any web or mobile app.
According to security best practices, how should an Amazon EC2 instance be given access to an Amazon S3 bucket?
- A . Hard code an IAM user’s secret key and access key directly in the application, and upload the file.
- B . Store the IAM user’s secret key and access key in a text file on the EC2 instance, read the keys, then upload the file.
- C . Have the EC2 instance assume a role to obtain the privileges to upload the file.
- D . Modify the S3 bucket policy so that any service can upload to it at any time.
C
Explanation:
According to security best practices, the best way to give an Amazon EC2 instance access to an Amazon S3 bucket is to have the EC2 instance assume a role to obtain the privileges to upload the file. A role is an AWS Identity and Access Management (IAM) entity that defines a set of permissions for making AWS service requests. You can use roles to delegate access to users, applications, or services that don’t normally have access to your AWS resources. For example, you can create a role that allows EC2 instances to access S3 buckets, and then attach the role to the EC2 instance. This way, the EC2 instance can assume the role and obtain temporary security credentials to access the S3 bucket. This method is more secure and scalable than storing or hardcoding IAM user credentials on the EC2 instance, as it avoids the risk of exposing or compromising the credentials. It also allows you to manage the permissions centrally and dynamically, and to audit the access using AWS CloudTrail. For more information on how to create and use roles for EC2 instances, see Using an IAM role to grant permissions to applications running on Amazon EC2 instances1. The other options are not recommended for security reasons. Hardcoding or storing IAM user credentials on the EC2 instance is a bad practice, as it exposes the credentials to potential attackers or unauthorized users who can access the instance or the application code. It also makes it difficult to rotate or revoke the credentials, and to track the usage of the credentials. Modifying the S3 bucket policy to allow any serviceto upload to it at any time is also a bad practice, as it opens the bucket to potential data breaches, data loss, or data corruption. It also violates the principle of least privilege, which states that you should grant only the minimum permissions necessary for a task.
: Using an IAM role to grant permissions to applications running on Amazon EC2 instances
A company website is experiencing DDoS attacks.
Which AWS service can help protect the company website against these attacks?
- A . AWS Resource Access Manager
- B . AWS Amplify
- C . AWS Shield
- D . Amazon GuardDuty
C
Explanation:
AWS Shield is a managed DDoS protection service that safeguards applications running on AWS from distributed denial of service (DDoS) attacks. DDoS attacks are malicious attempts to disrupt the normal functioning of a website or application by overwhelming it with a large volume of traffic from multiple sources. AWS Shield provides two tiers of protection: Standard and Advanced. AWS Shield Standard is automatically enabled for all AWS customers at no additional cost. It protects your AWS resources, such as Amazon CloudFront, AWS Global Accelerator, and Amazon Route 53, from the most common and frequently occurring network and transport layer DDoS attacks. AWS Shield Advanced is an optional paid service that provides additional protection for your AWS resources and applications, such as Amazon Elastic Compute Cloud (Amazon EC2), Elastic Load Balancing (ELB), Amazon Simple Storage Service (Amazon S3), Amazon Relational Database Service (Amazon RDS), and AWS Elastic Beanstalk. AWSShield Advanced offers enhanced detection and mitigation capabilities, 24/7 access to the AWS DDoS Response Team (DRT), real-time visibility and reporting, and cost protection against DDoS-related spikes in your AWS bill12
: AWS Shield, What is a DDOS Attack & How to Protect Your Site Against One
A company wants to migrate a company’s on-premises container Infrastructure to the AWS Cloud. The company wants to prevent unplanned administration and operation cost and adapt to a serverless architecture.
Which AWS service will meet these requirements?
- A . Amazon Connect
- B . AWS Fargate
- C . Amazon Lightsail
- D . Amazon EC2
B
Explanation:
AWS Fargateis a serverless compute engine for containers that allows users to run containers without having to manage the underlying infrastructure. Fargate eliminates the need for managing servers and reduces operational overhead, providing a fully managed, serverless approach to containerized applications. It helps avoid unplanned administration and operational costs and is ideal for companies migrating from on-premises container infrastructure.
Why other options are not suitable:
