AWS Certified Developer Official Study Guide (Percipio PDF) Flashcards
Access key
A type of security credential that is associated with an identity.
Providing Access best practice.
- Do not use root user to generate access key.
- Instead, create IAM user and generate access key from this user.
- To provide admin access, add that user to a group that provides admin permissions.
IAM user.
- Can be assigned long-term security credentials.
- Create an IAM user when you have a new team member or application that needs to make AWS API calls.
- Manage API permission of the user by associating permissions policies with the user or adding the user to a group that has permissions policies associated with it.
- Can assign IAM user AWS Management Console Access (username / password) and / or Programmatic Access (Access Key ID / Secret Access Key).
IAM Access
- IAM users prompted to sign in with either: a) Account ID or b) alias
- IAM user names only need to be unique within user account
- If MFA (Multi-factor authentication) is enabled, they will need their MFA code to sign in.
AWS Infrastructure services
- Compute
- Storage
- Networking
- Databases
AWS Platform capabilities
- Mobile services
- Analytics
- Machine Learning
API
- Application Programming Interface - allows you to managed all of your resources programmatically.
- Ex: Can provision virtual servers on demand in minutes and pay for compute capacity used. Likewise you can de-provision servers by making single API call for resources you no longer need.
AWS Management Console
- Web interface where you can create, configure, and monitor AWS resources in your account.
- Available for iOS and Android.
How to manage your AWS resources.
- AWS Management Console
- AWS CLI
- SDKs
SDK languages
- Java
- .NET
- JavaScript
- PHP
- PHP
- Python
- Ruby
- Go
- C++
AWS Specialty SDKs
- Ex: AWS Mobile SDK
2. AWS Internet of Things (IoT) Device SDK
Amazon Python SDK
- Called Boto
CLI - Install boto3
pip install boto3 –upgrade -user
AWS CLI
- Command Line Interface - allows you to perform similar actions as SDKs but in an interactive environment
- Good environment for experimenting w/ AWS features.
- If CLI and SDKs are on same server they can share configuration settings
Other specialty command line tools
- PowerShell
- Elastic Beanstalk
- AWS SAM local
*Know how to manage AWS resources.
- AWS SDK, AWS CLI, and AWS Management Console. All manage resources within account.
*Know importance of AWS Regions
- Be able to identify the impact of AWS Region Selection on your application code. Such as the relationship between region selection and user latency.
- Recognize how region selection impacts API calls and API endpoints.
*Know about IAM users and IAM roles
- Know when it is appropriate to use IAM users or IAM roles for a given application that needs to make AWS API calls.
*Know how to recognize valid IAM policies.
- Identify valid IAM policies and predict the effects of policy statements.
AWS region
- Each AWS Region is located in a separate geographic area and maintains its own, isolated copies of AWS Services.
- For many AWS services you are required to select a specific region to process API requests and in which to provision your resources.
AWS regions are highly available
True
Availablity Zones
- Each AWS Region contains multiple data centers grouped together into Availabilty Zones.
- This allows AWS to provide highly available services in a way that differentiates them from traditional architectures with single or multiple data centers.
- AZ operate independently and are physically separated.
- Connected via low-latency, high throughput redundant networking.
Latency
- Delay between user’s action and a web application’s response to that action.
Throughput
- Rate of production or the rate at which something is processed.
- Ex: In communication = Rate of successful message delivery
AWS Cloud
AWS Region
AWS AvailabilityZone
In descending order of more specific
How to improve resilience of application?
- AWS customers can deploy a copy of each application to a 2nd Availablity Zone within the same region.
- This allows the application to remain available to customers even if entire data center is disrupted.
- Many AWS services automatically replicate data across multiple Availability Zones within an AWS Region to provide high availablity and durability of data.
Amazon S3
- Amazon Simple Storage Service
- An example of an AWS service that replicates data across Availablity Zones within a region.
- Enables you to upload files and store those files as objects within a bucket.
- By default, S3 automatically replicates objects across a minimum of 3 Availablity Zones within the region hosting the bucket. (Designed to protect data against the loss of one entire Availablity Zone)
Regional API Endpoints
- Many AWS services expose regional API endpoints.
- When making web service calls to regional endpoints, the region can typically be identified in the URL you invoke.
- API calls to a regional endpoint usually only affect the resources within the specific AWS Region that corresponds to that endpoint.
URL order
- Ex:
polly.us-west-2.amazonaws.com/v1/speech
polly = service
us-west-2 = region
/v1/speech = API action
CLI Upload polly lexicon to a specific region
aws polly put-lexicon – name awsLexicon –content file: //aws-lexicon.xml –region us-west-2
- After this Lexicon has been uploaded you can use it
- Will only run in this region
- Lexicon must be uploaded to each region where it will be used.
- AWS does not automatically copy your data for these services to other regions without explicit action.
us-east-1
US East (N.Virginia)
us-west-2
US West (Oregon)
eu-central-1
EU (Frankfurt)
eu-west-2
EU (London)
eu-west-3
EU (Paris)
ap-northeast-1
Asia Pacific (Tokyo)
ap-south-1
Asia Pacific (Mumbai)
ap-southeast-1
Asia Pacific (Singapore)
Some AWS Services are not limited to a single region.
- Ex: IAM
- When you interact with these, the upper right hand side shows “Global”
- API endpoint for IAM is the same regardless of region
IAM availablity
- Since it’s not region-dependent, having IAM resources available in multiple regions is a useful strategy.
- IAM provides a way to create API credentials (which means you can have the same set of API credentials regardless of region)
*Know the naming conventions for regions
us-east-1 us-west-2 eu-central-1 eu-west-2 eu-west-3 ap-northeast-1 ap-south-1 ap-southeast1
Things to consider when choosing a region
- Availablity of services required by your application (each region exposes own AWS Cloud endpoints, not all services are available in all regions)
- Latency (Choose a region closer to application users, on-premise servers or other workloads), this allows you to decrease latency of calls
- Price (prices are set per region, consider cost when service availability and latency are similar)
- Data Residency (choose a region that allows your stay compliant with regulatory or contractual requirements to store data within a specific geographic region)
- Business continuity (Choose a pair of regions based on any specific requirements regarding data replication for disaster recovery. Ex: distance of second location from primary AWS region)
IAM
AWS Identity and Access Management.
- Where you create an identity in AWS. (An access key is a type of security credential that is associated with an identity.)
- IAM manages authentication and authorization for people or applications.
- IAM provides users, groups and roles as identities that you can manage.
- IAM authenticates security credentials used to sign an API call to verify request is coming from a known identity.
- Then IAM authorizes the request by evaluating the policies associated with the identity and resources affected by the request.
*Know when you first log in with email address and password.
- You are authenticating as the root user for your account.
- Few AWS operations require a root user permission.
- To protect your account, do not generate an access key based on your root user.
- Instead, create an IAM user to generate an access key for that user.
- To provide administrator access, add that user to a group that provides administrator privileges.
Users
- IAM users can be assigned long-term security credentials.
- Manage the API permissions of the user by associating the permissions policies with the user or adding the user to a group that has permissions policies associated with it.
User Access
- After you create an IAM user, you can assign credentials to allow AWS Management access, programmatic access or both
AWS Management Access vs Programmatic Access
- AWS Management Console Access: User Name + Password
2. Programmatic Access: Access Key ID + Secret Access Key
AWS Management Console Access
- Sign in to the console with IAM user name and password.
- Users will be prompted with either account ID or alias, therefore, IAM usernames only need to be unique within your account
*Know how to simplify sign-in in Management Console.
- Use the special sign-in link in the IAM dashboard that prefills the account field in the console sign-in form.
Programmatic Access
- For programmatic access, create an access key for the IAM user.
- An AWS access key is composed of 2 distinct parts: Access key ID and secret access key.
Ex: When you don’t want to create and manage new sets of long-term credentials for team members
- In a large company with many employees.
- You can use corporate identity store instead of creating new identities and credentials for each team member.
- Alternatively, can delegate permissions to an AWS service to perform actions on your behalf
- Ex: Common example- when application code is running on an AWS compute service, like EC2 that needs permissions to make AWS Calls, AWS recommends allowing EC2 to manage credentials for each instance.
* In both these examples, instead of creating a new IAM user, create an IAM role to assign permissions. IAM roles can be assumed for short-term sessions.
How to control access to an IAM role
- define a TRUST POLICY that specifies which PRINCIPALS can assume a role.
- Potential principals include AWS services and also users who have authenticated using identity federation.
- Principals can also include users who authenticate with web identity federation, IAM users, IAM groups, or IAM roles from OTHER accounts.
Instance
- Provisioned computing environment.
- EC2 enables you to provision these environments
- Can select hardware, in control of OS and any software that runs on the instance.
EC2 instance
- Runs on a host machine within a specific Availablity Zone.
- Instances present an virtualized interface to machine resources to the OS.
- This virtualization enables multiple, different guest environments to share the same underlying host machine.
Bare-metal access
- Provides your applications with direct access to the processor and memory resources of the underlying server.
- Some EC2 instances offer this service.
Instance type - list all
- General Purpose - balance mix of CPU, RAM and other resources.
- Compute Optimized - high amount of CPU (high performing web servers, scientific modeling, video encoding).
- Memory optimized - large amount of RAM (in memory DBs, and distrubted web scale in-memory caches)
- Storage Optimized - large amount of storage and input/output (I/O) throughput (datawarehousing, analytics, and big data distributed computing)
- Accelerated Computing - Dedicated graphics processing unit (GPU) or Field Programmable Gate Array (FPGA) resources (3D rendering, deep learning, genomics resource, real time video processing)
Amazon EBS
- Amazon Elastic Block Store - persistent storage service
- Provides block storage devices for Amazon EC2 instances.
- Certain instance types enable you to mount volumes based on an instance store (temporary storage local to the host machine)
- Can be encrypted
- EBS suitable for installing OS and applications for data you want to store persistently