06 - Management and Governance Flashcards

1
Q

Auto Scaling New Rules

A

1) It is now possible to define ”better” auto scaling rules that are directly managed by EC2
• Target Average CPU Usage
• Number of requests on the ELB per instance
• Average Network In
• Average Network Out

2) These rules are easier to set up and can make more sense

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Auto Scaling Groups – Dynamic Scaling Policies

A

1) Target Tracking Scaling
• Most simple and easy to set-up
• Example: I want the average ASG CPU to stay at around 40%

2) Simple / Step Scaling
• When a CloudWatch alarm is triggered (example CPU > 70%), then add 2 units
• When a CloudWatch alarm is triggered (example CPU < 30%), then remove 1

3) Scheduled Actions
• Anticipate a scaling based on known usage patterns
• Example: increase the min capacity to 10 at 5 pm on Fridays

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

CloudWatch Custom Metrics

A
  • Possibility to define and send your own custom metrics to CloudWatch
  • Example: memory (RAM) usage, disk space, number of logged in users …
  • Use API call PutMetricData
  • Ability to use dimensions (attributes) to segment metrics
    • Instance.id
    • Environment.name
  • Metric resolution (StorageResolution API parameter – two possible value):
    • Standard: 1 minute (60 seconds)
    • High Resolution: 1/5/10/30 second(s) – Higher cost

• Important: Accepts metric data points two weeks in the past and two hours in the future (make sure to configure your EC2 instance time correctly)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Amazon EventBridge (Amazon CloudWatch Events)

A
  • EventBridge is the next evolution of CloudWatch Events
  • Default event bus: generated by AWS services (CloudWatch Events)

• Partner event bus: receive events from SaaS service or applications (Zendesk, DataDog, Segment, Auth0…)

  • Custom Event buses: for your own applications
  • Event buses can be accessed by other AWS accounts
  • Rules: how to process the events (similar to CloudWatch Events)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

AWS CloudTrail

• Provides governance, compliance and audit for your AWS Account

A

• CloudTrail is enabled by default!

  • Get an history of events / API calls made within your AWS Account by:
    • Console
    • SDK
    • CLI
    • AWS Services
  • Can put logs from CloudTrail into CloudWatch Logs or S3
  • A trail can be applied to All Regions (default) or a single Region.
  • If a resource is deleted in AWS, investigate CloudTrail first!
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

CloudTrail Insights

A
  • Enable CloudTrail Insights to detect unusual activity in your account:
    • inaccurate resource provisioning
    • hitting service limits
    • Bursts of AWS IAM actions
    • Gaps in periodic maintenance activity

• CloudTrail Insights analyzes normal management events to create a baseline

  • And then continuously analyzes write events to detect unusual patterns
    • Anomalies appear in the CloudTrail console
    • Event is sent to Amazon S3
    • An EventBridge event is generated (for automation needs)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

AWS Config

A
  • Helps with auditing and recording compliance of your AWS resources
  • Helps record configurations and changes over time
  • Questions that can be solved by AWS Config:
    • Is there unrestricted SSH access to my security groups?
    • Do my buckets have any public access?
    • How has my ALB configuration changed over time?
  • You can receive alerts (SNS notifications) for any changes
  • AWS Config is a per-region service
  • Can be aggregated across regions and accounts
  • Possibility of storing the configuration data into S3 (analyzed by Athena)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Config Rules – Remediations

A

• Automate remediation of non-compliant resources using SSM Automation Documents

  • Use AWS-Managed Automation Documents or create custom Automation Documents
    • Tip: you can create custom Automation Documents that invokes Lambda function

• You can set Remediation Retries if the resource is still non-compliant after auto-remediation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

CloudWatch vs CloudTrail vs Config

A

CloudWatch
• Performance monitoring (metrics, CPU, network, etc…) & dashboards
• Events & Alerting
• Log Aggregation & Analysis

CloudTrail
• Record API calls made within your Account by everyone
• Can define trails for specific resources
• Global Service

Config
• Record configuration changes
• Evaluate resources against compliance rules
• Get timeline of changes and compliance

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

AWS Organizations

A
  • Global service
  • Allows to manage multiple AWS accounts
  • The main account is the master account – you can’t change it
  • Other accounts are member accounts
  • Member accounts can only be part of one organization
  • Consolidated Billing across all accounts - single payment method
  • Pricing benefits from aggregated usage (volume discount for EC2, S3…)
  • API is available to automate AWS account creation
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Service Control Policies (SCP)

A
  • Whitelist or blacklist IAM actions
  • Applied at the OU or Account level
  • Does not apply to the Master Account
  • SCP is applied to all the Users and Roles of the Account, including Root user
  • The SCP does not affect service-linked roles
    • Service-linked roles enable other AWS services to integrate with AWS Organizations and can’t be restricted by SCPs.

• SCP must have an explicit Allow (does not allow anything by default)

  • Use cases:
    • Restrict access to certain services (for example: can’t use EMR)
    • Enforce PCI compliance by explicitly disabling services
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

AWS Resource Access Manager (RAM)

A
  • Share AWS resources that you own with other AWS accounts
  • Share with any account or within your Organization
  • Avoid resource duplication!
  • VPC Subnets:
    • allow to have all the resources launched in the same subnets
    • must be from the same AWS Organizations.
    • Cannot share security groups and default VPC
    • Participants can manage their own resources in there
    • Participants can’t view, modify, delete resources that belong to other participants or the owner
  • AWS Transit Gateway
  • Route53 Resolver Rules
  • License Manager Configurations
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

AWS Backup

A
  • Fully managed service
  • Centrally manage and automate backups across AWS services
  • No need to create custom scripts and manual processes
  • Supported services:
    • Amazon FSx
    • Amazon EFS
    • Amazon DynamoDB
    • Amazon EC2
    • Amazon EBS
    • Amazon RDS (All DBs engines)
    • Amazon Aurora
    • AWS Storage Gateway (Volume Gateway)
  • Supports cross-region backups
  • Supports cross-account backups
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

AWS CloudFormation

A

• CloudFormation is a declarative way of outlining your AWS Infrastructure, for any resources (most of them are supported).

  • For example, within a CloudFormation template, you say:
    • I want a security group
    • I want two EC2 machines using this security group
    • I want two Elastic IPs for these EC2 machines
    • I want an S3 bucket
    • I want a load balancer (ELB) in front of these machines

• Then CloudFormation creates those for you, in the right order, with the
exact configuration that you specify

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

AWS Opsworks

• Managing configuration as code

A
  • Chef & Puppet help you perform server configuration automatically, or repetitive actions
  • They work great with EC2 & On Premise VM
  • AWS Opsworks = Managed Chef & Puppet
  • It’s an alternative to AWS SSM
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

AWS Trusted Advisor

• No need to install anything – high level AWS account assessment

A

• Analyze your AWS accounts and provides recommendation: Cost Optimization, Performance, Security, Fault Tolerance, Service Limits

  • Core Checks and recommendations – all customers
  • Can enable weekly email notification from the console
  • Full Trusted Advisor – Available for Business & Enterprise support plans
    • Ability to set CloudWatch alarms when reaching limits
    • Programmatic Access using AWS Support API