Udemy Flashcards
What are the two required “items” to use AWS Inspector on the host?
- Inspector Agent
- Instance must be tagged
What are the two types of assessments for inspector?
Network Assessment (checks for open ports) Host Assessment
What are the two runtime options for Inspector?
Run once and run weekly
What cannot be done with AWS managed CMKs?
Manage the keys yourself,
rotate them manually
change the key policies
use them in your own operations
How are AWS manages KMS keys priced?
No monthly fee
Free tier
Above that: usage of key
How often is a Customer managed CMK / AWS managed CMK automatically rotated?
Customer managed: 1 year (optional)
AWS managed: 3 years
What are the benefits of CloudHSM (in comparison to KMS)
Complete control of the keys, AWS has no access
Single Tenancy
Higher FIPS 140-2 rating
What are Web ACL?
Rules made by AWS WAF.
Can Count, Allow or Block if criteria is met
A company plans to expand its use of AWS services across its product portfolios. To ensure separation of business processes for billing, security, and compliance, the SysOps Administrator must provide each department with new AWS accounts having governance guardrails and a defined baseline in place. An efficient and scalable provisioning process is required to optimize the workflow and save time.
Which of the following options can satisfy the given requirement?
- Use AWS Batch and AWS Organizations to automatically provision new resources and accounts.
- Use AWS Control Tower to generate templates in the Account Factory and to provision new accounts in AWS Service Catalog.
- Use AWS Service Catalog and AWS Config to automate account creation and configuration.
- Use AWS OpsWorks for Chef Automate and bootstrapping scripts to handle the configuration management and provisioning tasks.
- Use AWS Control Tower to generate templates in the Account Factory and to provision new accounts in AWS Service Catalog.
AWS Control Tower provides three methods for creating member accounts:
- Through the Account Factory console that is part of AWS Service Catalog.
- Through the Enroll account feature within AWS Control Tower.
- From your AWS Control Tower landing zone’s management account, using Lambda code and appropriate IAM roles.
As part of the yearly AWS data cleanup, you need to delete all unused S3 buckets and their contents. The tutorialsdojo bucket, which contains several educational video files, has both the Versioning and MFA Delete features enabled. One of your Systems Engineers who has an Administrator account tried to delete an S3 bucket using the aws s3 rb s3://tutorialsdojo command. However, the operation fails even after repeated attempts.
Which of the following are valid options that you can implement to properly delete the bucket? (Select TWO.)
- Delete all markers from the S3 bucket and then run the aws s3 rb s3://tutorialsdojo command again to fully delete the bucket and its contents.
- Use the <code>aws s3 rb s3://tutorialsdojo</code> command again with an additional <code>--force</code> option to forcibly delete the bucket via the CLI.
- Use the AWS SDK to send deletion requests to S3 to remove all objects in your bucket. Ensure that you include the <code>x-amz-mfa</code> header in all requests which contains the MFA authentication code. Afterwards, retry to delete the bucket with the same CLI command that you used before.
- Remove the policy that requires MFA Delete on your S3 bucket. Use the AWS SDK to remove all of the bucket’s delete markers and object versions. Delete the bucket again using the same CLI command that you used before.
- Use the AWS SDK to send deletion requests to S3 to remove all objects in your bucket. Ensure that you include the <code>x-amz-mfa</code> header in all requests which contains the MFA authentication code. Afterwards, retry to delete the bucket with the same CLI command that you used before.
- Remove the policy that requires MFA Delete on your S3 bucket. Use the AWS SDK to remove all of the bucket’s delete markers and object versions. Delete the bucket again using the same CLI command that you used before.
A company deployed a fleet of Linux-based EC2 instances to run an e-commerce website. The SysOps Administrator needs to monitor the CPU utilization of individual processes that are running in each server.
Which of the following options fulfills this requirement?
- Install Amazon Inspector agent on EC2 instances.
- Enable detailed monitoring on EC2 instances.
- Use AWS Systems Manager agent <code>procstat</code> plugin to collect process metrics on EC2 instances.
- Use Amazon CloudWatch agent <code>procstat</code> plugin to collect process metrics on EC2 instances.
- Use Amazon CloudWatch agent <code>procstat</code> plugin to collect process metrics on EC2 instances.
You are tasked to prepare a CloudFormation template which should automatically roll back in the event that the entire stack failed to launch. The application stack requires the pre-requisite packages to be installed first in order for it to run properly, which could take about an hour or so to complete.
What should you add in the template to accomplish this requirement?
- In the ResourceSignal parameter of the CreationPolicyresource attribute, add a Timeout property with a value of 2 hours.
- In the ResourceSignal parameter of the DependsOnresource attribute, add a Timeout property with a value of 2 hours.
- In the ResourceSignal parameter of the UpdatePolicy resource attribute, add a Timeout property with a value of 2 hours.
- In the ResourceSignal parameter of the Conditions resource attribute, add a Timeout property with a value of 2 hours
1.In the ResourceSignal parameter of the CreationPolicyresource attribute, add a Timeout property with a value of 2 hours.
It is a requirement in your work that you produce regular reports and statistics on your EC2 resource consumption across different regions. In an upcoming meeting, you are asked to present these findings to your CTO and Data Analytics team. Aggregating these statistics would detail a lot of information on your resource consumption with ease.
What is the procedure for viewing aggregation statistics in CloudWatch?
- Create a Lambda function that collects metrics from your EC2 instances, computes your desired statistical output, and sends it to CloudWatch for viewing.
- Use CloudWatch Metric Math to query metrics and apply mathematical operations on these metrics.
- There is no way to view aggregate statistics in CloudWatch. CloudWatch cannot aggregate data across Regions.
- Enable detailed monitoring on your EC2 instances.
- Use CloudWatch Metric Math to query metrics and apply mathematical operations on these metrics.
You can also use CloudWatch metric math to aggregate and transform metrics from multiple accounts and Regions. Metric math enables you to query multiple CloudWatch metrics and use math expressions to create new time series based on these metrics. You can visualize the resulting time series on the CloudWatch console and add them to dashboards.
Why are Disk Read Operations and Disk Write Operations not correct metrics to check whether a EBS backed EC2 instance is slow?
the instances are being overloaded.
Disk Read Operations and Disk Write Operations are both incorrect because the Disk Read and Write Operations metrics are only applicable for instance store-backed AMI instances.
You work for a government agency as their Cloud Infrastructure Consultant and were given the task of automating the recurring tasks in their finance department such as data synchronizaton, infrastructure selection, and patch management, which will improve their current processes. You need to use a tool that can coordinate multiple AWS services into serverless workflows.
Which of these options is the most cost-effective service that you should use?
1´. AWS Batch
- Lambda
- Amazon SWF
- AWS Step Functions
AWS Step Functions provides serverless orchestration for modern applications. Orchestration centrally manages a workflow by breaking it into multiple steps, adding flow logic, and tracking the inputs and outputs between the steps. As your applications execute, Step Functions maintains application state, tracking exactly which workflow step your application is in, and stores an event log of data that is passed between application components. That means that if networks fail or components hang, your application can pick up right where it left off.
A mobile development company has various AWS resources to support its various mobile products. To keep control of costs, they have requested for you to get the billing alerts for your AWS account once it reaches a certain limit.
Which of the following should you enable before you can receive billing alerts in AWS?
- Enable billing alerts in Account Preferences of the AWS Console.
- Request AWS support to notify you on estimated charges.
3 .Enable billing alerts in CloudWatch Console.
- Enable billing alerts in Account Preferences of the AWS Console.
Before you can create an alarm for your estimated charges, you must enable billing alerts on your Accounts Preferences page first, so that you can monitor your estimated AWS charges and create an alarm using billing metric data. After you enable billing alerts, you cannot disable data collection, but you can delete any billing alarms that you created.
A popular online graphic design tool startup uses a standard S3 bucket that has versioning enabled to store the user-generated images on its platform. They have millions of users around the globe that store their logos, graphics, infographics, and other designs on their platform. Lately, there are a lot of users complaining that they receive a lot of HTTP 503 responses on the platform.
Which of the following options could be the reason why this issue exists?
- The cross-origin resource sharing (CORS) option is not enabled.
- S3 could not handle simultaneous access to the bucket since the S3 transfer acceleration option is not enabled.
- You might have one or more objects in the bucket for which there are millions of versions.
- The Cross-Region Replication (CRR) option is not enabled, which is required if the S3 bucket is being accessed from multiple regions.
- You might have one or more objects in the bucket for which there are millions of versions.
When you have objects with millions of versions, Amazon S3 automatically throttles requests to the bucket to protect the customer from an excessive amount of request traffic, which could potentially impede other requests made to the same bucket.
What is the use case of AD Connector?
To connect to AWS using a self-managed Active Directory
A Company uses LDAP and needs to implement access control in AWS as part of an integration between internal and cloud
Need to configure SAM federation of IAM users and groups with the LDAP DB and map LDAP user and groups to IAM roles
What route53 queries are charged and which are not
CNAME: charged
ALIAS: free
What are the key facts to Cost-Explorer?
- Free Tool
- Charts about costs
- 13month in the past + 3 month of predictions
- Sectioned by Account, AZ, Service etc.
- discovers patterns to identify cost problems
What are the key facts to Cost Allocation Tags?
- Must be activated on the Billing and Cost Management console
- used to organize resources to track costs
- Tags can be created in the Tag Editor
What are the key facts to Cost and Usage Report?
- csv in S3
- Lists all items that generate costs
What are the key facts to Cost Allocation Tags?
- Must be activated on the Billing and Cost Management console
- used to organize resources to track costs
What are the key facts to AWS Budgets
- alerts when costs or usage exceed (or are forecasted to exceed) budgeted amount
How to make sure that a S3 bucket cannot be deleted in an AWS Organization?
Deny s3:DeleteBucket in an SCP
What is the process to create a custom dashboard in CloudWatch for custom metrics?
- Create Dashboard
- Create metric filters
- Select custom metrics
What would happen to the metrics if the EC2 Instances server time is set incorrectly?
CloudWatch will still accept the metrics if it’s below 30min
What would happen to the metrics if the EC2 Instances server time is set incorrectly?
CloudWatch will still accept the metrics
How to determine the source of requests to an SQS queue?
CloudTrail - since they are API calls
How to ensure that newly created S3 buckets have logging enabled?
Use AWS Config with the Auto remediate rule S3_BUCKET_LOGGING_ENABLED
How to limit the AMIs that can be used?
Add a (custom) Config rule to check the AMIs
How to limit the AMIs that can be used?
Add a (custom
How to automatically disable access key that are > 90 days
Use Config to identify the keys and Systems Manager Automation to disable the keys.
A replica of an existing infrastructure, using AWS Service Catalog, should be made
Share the Service Catalog portfolio and import it to the new account
How to monitor costs per user in an account?
Use Cost Explorer, activate the createdBy tag and filter by it
How to check for underutilized EC2 instances?
Use Cost Explorer to generate a recommendation report
You need to check that security best practices are being followed for the AWS account root user
Use Trusted Advisor security checks
What are the protocols a Network Load Balancer works on?
TCP, TLS, UDP
Can you put EC2 instances in private subnets and still connect them to an ALB?
Yes, it will target the private IP addresses, but the ALB must be put into a public subnet in the same AZ
Can you put EC2 instances in private subnets and still connect them to an ALB?
Yes, it will target the private IP addresses
What is the Termination Policy and how is it done per default?
Decides which instance will be terminated (if the target group gets scaled in)
- From AZ with the most instances
- From the Spot/on Demand strategy
- Oldest launch template
- Oldest launch configuration
- Closets to the next billing hour
What are the three types of scaling?
Target scaling - CPU load should be at 50%
Simple scaling - If CPU > 50% launch new instance
Step Scaling Policy - If CPU >50% launch 1 new instance if CPU>70% launch 2
(Auto Scaling)
What are the Pending:Wait & Terminating:Wait states
Gives time to do some work, like saving log files (with Lamda) or sending a message to SNS
What are the SurgeQueueLength & SpilloverCount?
SurgeQueueLength: Number of requests pending
SpilloverCount: Number of requests dropped
When a launch configuration is created from the CLI, which monitoring tier is selected per default?
Detailed.
If done from Console: basic
What happens to the EC2 instances if you delete an Auto Scaling Group
They get deleted as well.
What could be a reason if there are HTTPCode_ELB_5XX_Count metrics in an ALB?
There are no healthy instances in the target group
What are the reasons why there are no new instances launched even though max. capacity is not reached?
- Service Limits
- RunInstance checks in CloudTrail
What are the numbers of AZs and instances to create HA?
At least 3 AZs
desired. 2, min.2, max. >= 2
ALB is expecting a large spike in traffic for a memory heavy application.
How to scale?
Use the RequestCountPerTarget, since you cannot use RAM
What is EBS Multi-Attach?
Possibility to connect one EBS drive to up to 16 instances.
For Nitro system-based EC2 instances and PIOPS drives.
What is termination protection?
Option to not delete the root drive
(EBS) How does encryption affect performance?
It should not.
Even though there’s an overhead - it is taken care in a separate process
Who can be the user of a Customer Managed Key?
User
Role
Another account
Can you add/remove users from a Customer Managed Key?
Yes, for example to share an encrypted snapshot with another account
(EFS) What are the two performance and and throughput modes?
Performance: General Purpose & Max I/O
Throughput: Bursting (scales with size) & Provisioned (fixed amount)
What are the characteristics of File Gateway?
- Mounted with SMB / NFS
- optional local cache
- files are stored in S3
- can make use of S3 storage classes, such as S3 I.A.
What is the process of a Tape Gateway?
- Mounted as iSCSI to the Gateway
- When data is written it is stored in S3
- After ejecting the tape the data is then pushed to Glacier (deep archive)
What can you do to get notified when an EBS volume runs out of space?
- Install the CloudWatch agent on the EC2 instance
- Monitor disk size with an CloudWatch Alarm
(Cached Gateway)
What should be done if the CacheHitPercent is < 50% and the CachePercentUsed is >95%?
- Create a larger disk for cache volume
Describe the five deployment types in Beanstalk
All at once: Will replace the entire infrastructure at once. Will cause downtime.
Rolling: will replace infrastructure piece by piece. Can cause performance issues. Batch size can be set.
Rolling with additional batch: Rolling plus more instances. No performance issues to be expected.Batch size can be set.
Immutable: Will create a separate stack and switch once its healthy
Green/Blue Deployment: Creates a test environment which gives a portion of traffic to the new environment. Done by Route53.
How to use a custom domain with ElasticBeanstalk?
Create an ALIAS record to the environment URL
What is needed for Systems Manager to utilize EC2 instances?
- SSM Manager on the instance
- Role to talk to SSM
- (optional) tags
What can be done in order to avoid an instance to slow down while using AWS SSM Run Command or Patches
Lower the targets Rate Control -> Concurrency