Attempt 1 Flashcards
(49 cards)
SCP is used for
SCP is used to create limited in AWS accounts. For larger account organizations.
SCPs alone are not sufficient to granting permissions to the accounts in your organization. No permissions are granted by an SCP
An SCP defines a guardrail, or sets limits, on the actions that the account’s administrator can delegate to the IAM users and roles in the affected accounts.
The administrator must still attach identity-based or resource-based policies to IAM users or roles, or to the resources in your accounts to actually grant permissions.
SCPs DON’T GIVE permission - they just control what an account CAN and CANNOT grant via identity policies.
Which accounts are affected by SCP policy
Member accounts can only be affected,
MANAGEMENT accounts cannot.
SCP are applied to
orginization OU
SCP FullAWSAccess
allows by default. need to add deny policy to restrict.
SCP Allow LIst
to implement, you will need to remove the FullAWSAccess and by doing that, only the SCP implicit default deny is in place and active. This leave room to explicitly add any allow policy.
How does SCP overlaps with Identity Policy?
SCP Limits before the Identity Policy
Terminate instance in ASG
terminate-instance-in-auto-scaling-group –instance-id
Following required option
–should-decrement-desired-capacity
–no-should-decrement-desired-capacity
ASG process - Launch
Adds instances to the Auto Scaling group when the group scales out, or when Amazon EC2 Auto Scaling chooses to launch instances for other reasons, such as when it adds instances to a warm pool
ASG process - Terminate
Removes instances from the Auto Scaling group when the group scales in, or when Amazon EC2 Auto Scaling chooses to terminate instances for other reasons, such as when an instance is terminated for exceeding its maximum lifetime duration or failing a health check.
ASG process - AddToLoadBalancer
Adds instances to the attached load balancer target group or Classic Load Balancer when they are launched. For more information, see Use Elastic Load Balancing to distribute traffic across the instances in your Auto Scaling group.
ASG process - AlarmNotification
Accepts notifications from CloudWatch alarms that are associated with dynamic scaling policies. For more information, see Dynamic scaling for Amazon EC2 Auto Scaling.
ASG process - AZRebalance
Balances the number of EC2 instances in the group evenly across all of the specified Availability Zones when the group becomes unbalanced, for example, when a previously unavailable Availability Zone returns to a healthy state. For more information, see Rebalancing activities.
ASG process - HealthCheck
Checks the health of the instances and marks an instance as unhealthy if Amazon EC2 or Elastic Load Balancing tells Amazon EC2 Auto Scaling that the instance is unhealthy. This process can override the health status of an instance that you set manually. For more information, see Health checks for Auto Scaling instances.
ASG process - InstanceRefresh
Terminates and replaces instances using the instance refresh feature. For more information, see Replace Auto Scaling instances based on an instance refresh.
ASG process - ReplaceUnhealthy
Terminates instances that are marked as unhealthy and then creates new instances to replace them. For more information, see Health checks for Auto Scaling instances.
ASG process - ScheduledActions
Performs the scheduled scaling actions that you create or that are created for you when you create an AWS Auto Scaling scaling plan and turn on predictive scaling. For more information, see Scheduled scaling for Amazon EC2 Auto Scaling.
Scenario 1: Launch is suspended
AlarmNotification is still active, but your Auto Scaling group can’t initiate scale-out activities for alarms that are in breach.
ScheduledActions is active, but your Auto Scaling group can’t initiate scale-out activities for any scheduled actions that occur.
AZRebalance stops rebalancing the group.
ReplaceUnhealthy continues to terminate unhealthy instances, but does not launch replacements. When you resume the Launch process, Amazon EC2 Auto Scaling immediately replaces any instances that it terminated during the time that Launch was suspended.
InstanceRefresh does not replace instances.
Scenario 2: Terminate is suspended
AlarmNotification is still active, but your Auto Scaling group can’t initiate scale-in activities for alarms that are in breach.
ScheduledActions is active, but your Auto Scaling group can’t initiate scale-in activities for any scheduled actions that occur.
AZRebalance is still active but does not function properly. It can launch new instances without terminating the old ones. This could cause your Auto Scaling group to grow up to 10 percent larger than its maximum size, because this is allowed temporarily during rebalancing activities.
Your Auto Scaling group could remain above its maximum size until you resume the Terminate process.
ReplaceUnhealthy is inactive but not HealthCheck. When Terminate resumes, the ReplaceUnhealthy process immediately starts running. If any instances were marked as unhealthy while Terminate was suspended, they are immediately replaced.
InstanceRefresh does not replace instances.
Scenario 3: AddToLoadBalancer is suspended
Amazon EC2 Auto Scaling launches the instances but does not add them to the load balancer target group or Classic Load Balancer. When you resume the AddToLoadBalancer process, it resumes adding instances to the load balancer when they are launched. However, it does not add the instances that were launched while this process was suspended. You must register those instances manually.
Scenario 4: AlarmNotification is suspended
Amazon EC2 Auto Scaling does not invoke scaling policies when a CloudWatch alarm threshold is in breach. When you resume AlarmNotification, Amazon EC2 Auto Scaling considers policies with alarm thresholds that are currently in breach.
Scenario 5: AZRebalance is suspended
Amazon EC2 Auto Scaling does not attempt to redistribute instances after certain events. However, if a scale-out or scale-in event occurs, the scaling process still tries to balance the Availability Zones. For example, during scale out, it launches the instance in the Availability Zone with the fewest instances. If the group becomes unbalanced while AZRebalance is suspended and you resume it, Amazon EC2 Auto Scaling attempts to rebalance the group. It first calls Launch and then Terminate.
Scenario 6: HealthCheck is suspended
Amazon EC2 Auto Scaling stops marking instances unhealthy as a result of EC2 and Elastic Load Balancing health checks. Your custom health checks continue to function properly. After you suspend HealthCheck, if you need to, you can manually set the health state of instances in your group and have ReplaceUnhealthy replace them.
Scenario 7: InstanceRefresh is suspended
Amazon EC2 Auto Scaling stops replacing instances as a result of an instance refresh. If there is an instance refresh in progress, this pauses the operation without canceling it.
Scenario 8: ReplaceUnhealthy is suspended
Amazon EC2 Auto Scaling stops replacing instances that are marked as unhealthy. Instances that fail EC2 or Elastic Load Balancing health checks are still marked as unhealthy. As soon as you resume the ReplaceUnhealthly process, Amazon EC2 Auto Scaling replaces instances that were marked unhealthy while this process was suspended. The ReplaceUnhealthy process calls Terminate first and then Launch.