25 posts

15 / 25
·Tech·Cloud

DVA-C02 Preparation Material 1 - Server & Serverless

Full page →
CloudCertification

EC2

  • EC2 burst balance
  • In addition to the certain level of CPU performance provided by default, performance can be increased using CPU credits.
  • Occurs on EC2 instances of type T2 or T3.
  • Possibility of initializing burst credit of existing instances
  • Immutable deployments / Traffic-splitting deployments lost, reset
  • Rolling deployment / All-at-once deployment not initialized
  • By default, scripts entered as user data are run with root user privileges.
  • User data only runs during the boot cycle at first startup.
  • Dedicated instances are cheaper than dedicated hosts < Dedicated instance cost
  • Dedicated Instances are Amazon EC2 instances that run in a virtual private cloud (VPC) on hardware dedicated to a single customer.
  • Managed as a single tenant
  • Zonal Reserved Instances provide capacity reservations, while Regional reservations do not provide capacity reservations
  • The maximum ratio of provisioned IOPS to requested volume size (in GiB) is 50:1
  • That means for a 200GiB volume size, the possible IOPS is 10,000 IOPS
  • Monitoring settings
  • aws ec2 monitor-instances --instance-ids i-1234567890abcdef0
  • How to find the public IPv4 address of your instance
  • http://169.254.169.254/latest/meta-data/ Query instance metadata from

ASG

  • Upload the file to S3 to make it available to the ASG instance
  • Target Tracking Scaling Policy Metric - Predefined metrics
  • ASGAverageCPUUtilization
  • ASGAverageNetworkOut
  • ALBRequestCountPerTarget
  • Use with ALB to solve bottlenecks
  • Can have EC2 instances in more than one Availability Zone within the same region
  • To be used across multiple regions, it must be activated in all designated regions
  • If the minimum instance is 1, it only works in one Availability Zone, so there is a possibility of the entire Availability Zone going down during periods of low utilization
  • That is, in this case it is necessary to increase the minimum instance capacity ![[Pasted image 20250130230219.png]]
  • Set up CodeDeploy so that you don't have to create AMIs for each latest state, but only apply the latest state for your application
  • There were different answers to this, with some saying that the latest version of the AMI was needed and others saying that there was no need to continue creating the AMI..

Lambda

    By increasing
  • memory, CPU can also be increased proportionally
  • Methods for handling compute-intensive workloads
  • The maximum amount of memory available at runtime is 10,240 MB
  • If there is not enough RAM, it will not run and an error message will appear
  • Run code without provisioning or managing servers
  • Alias
  • No alias refers to alias
  • alias refers to Lambda version
  • Configure the application to use an alias that points to the current version. Deploy a new version of your code and configure an alias to direct 10% of your users to this new version. If the deployment goes wrong, reset the alias to point all traffic to the current version.
  • Lambda cannot process on EC2 instances
  • Associate your VPC with the private subnet and security group required for RDS connectivity
  • IAM permission required to write to DynamoDB
  • Lambda Authorizer applies a third-party authorization mechanism to API Gateway client calls.
  • Automatic scaling possible by combining with ASG using Provisioned Concurrency
  • Maintain pre-prepared instances to prepare for predictable traffic spikes
  • Reserved Concurrency focuses on limiting traffic by reserving resources for specified concurrency.
  • Implement Lambda Runtime API to use container images
  • The use of multi-architecture container images is not supported.
  • Supports only Linux-based container images
  • Capable of distributing container images up to 10GB in size
  • Logging statements must be inserted into the Lambda function code, which can be used through CloudWatch logs.
  • Use of initial execution context script
  • Move S3 client initialization out of function handler
  • Initialize the SDK client and database connection outside of the function handler and cache static assets locally in the /tmp directory.
  • The total size of environment variables cannot exceed 4KB, and there is no limit to the number of variables.
  • Change table name without modifying Lambda using environment variable
  • Set up the necessary libraries to be used together with Lambda Layer
  • The AWS request ID is a unique identifier included in the context object (context) of the Lambda function.
  • Lambda functions automatically record logs to AWS CloudWatch through standard output ( console.log , etc.)
  • Subsequent processing can be done with minimal development by setting up destination Lambda

###AppSync

  • A fully managed service that makes it easy to develop GraphQL APIs by handling the heavy lifting of securely connecting to data sources like AWS DynamoDB, Lambda, and more.

ECS

  • Synchronization issues for STOPPED state instances.
  • Even though the container instance is terminated, the container instance continues to appear as a resource in the ECS cluster.
  • Deregister container instances in the STOPPED state using the Amazon ECS console or AWS Command Line Interface.
  • ECS allows more detailed control than ElasticBeanstalk

ECS Fargate

  • Typically distributed across multiple Availability Zones (AZs)
  • Requires persistent cross-AZ shared access to data volumes configured for container workloads
  • Use EFS volume
  • Bint mounds are unsuitable for providing temporary storage.
  • Docker volumes are only supported for tasks within EC2 instances.

AMI

  • Scale applications across multiple AWS Regions with encryption on AMIs
  • Create a new AMI and specify encryption parameters
  • Copy encrypted AMI to target region
  • Delete unencrypted AMIs

Comments

No comments yet. Be the first!