End of Lecture Questions Flashcards
You have attached an Internet Gateway to your VPC, but your EC2 instances still don’t have access to the internet. What isNOTa possible issue?
The Security Group does not allow traffic in
Note:
Security groups are stateful and if traffic can go out, then it can go back in.
You would like to provide Internet access to your EC2 instances in private subnets with IPv4 while making sure this solution requires the least amount of administration and scales seamlessly. What should you use?
A: NAT Gateway
When using VPC Endpoints, what are the only two AWS services that have a Gateway Endpoint available?
A: Amazon S3 & DynamoDB
Note:
These two services have a VPC Gateway Endpoint (remember it), all the other ones have an Interface endpoint (powered by Private Link - means a private IP).
You have 3 VPCs A, B, and C. You want to establish a VPC Peering connection between all the 3 VPCs. What should you do?
Establish 3 VPC Peering connections (A-B, A-C, B-C)
How can you capture information about IP traffic inside your VPCs?
Enable VPC Flow Logs
Note:
VPC Flow Logs is a VPC feature that enables you to capture information about the IP traffic going to and from network interfaces in your VPC.
You need to set up a dedicated connection between your on-premises corporate datacenter and AWS Cloud. This connection must be private, consistent, and traffic must not travel through the Internet. Which AWS service should you use?
AWS Direct Connect
A web application hosted on a fleet of EC2 instances managed by an Auto Scaling Group. You are exposing this application through an Application Load Balancer. Both the EC2 instances and the ALB are deployed on a VPC with the following CIDR192.168.0.0/18. How do you configure the EC2 instances’ security group to ensure only the ALB can access them on port80?
Add an Inbound Rule with port 80 and ALB’s Security Group a the source
Note:
This is the most secure way of ensuring only the ALB can access the EC2 instances. Referencing by security groups in rules is an extremely powerful rule and many questions at the exam rely on it. Make sure you fully master the concepts behind it!
You have a 25 GB file that you’re trying to upload to S3 but you’re getting errors. What is a possible solution for this?
Use Multi-Part upload when uploading files larger the 5GB
Note:
Multi-Part Upload is recommended as soon as the file is over 100 MB.
You’re getting errors while trying to create a new S3 bucket nameddev. You’re using a new AWS Account with no S3 buckets created before. What is a possible cause for this?
A: S3 bucket names must be globally unique and dev is already taken
You have enabled versioning in your S3 bucket which already contains a lot of files. Which version will the existing files have?
A: null
You have updated an S3 bucket policy to allow IAM users to read/write files in the S3 bucket, but one of the users complain that he can’t perform aPutObjectAPI call. What is a possible cause for this?
A: The IAM user must have an explicit DENY in the Attached IAM Policy
Note:
Explicit DENY in an IAM Policy will take precedence over an S3 bucket policy.
You want the content of an S3 bucket to be fully available in different AWS Regions. That will help your team perform data analysis at the lowest latency and cost possible. What S3 feature should you use?
A: S3 Replication
Note:
S3 Replication allows you to replicate data from an S3 bucket to another in the same/different AWS Region.
You have 3 S3 buckets. One source bucket A, and two destination buckets B and C in different AWS Regions. You want to replicate objects from bucket A to both bucket B and C. How would you achieve this?
A: Configure replication from bucket A to bucket B, then from bucket A to bucket C
Note:
Cannot string replications
An application hosted on an EC2 instance wants to upload objects to an S3 bucket using thePutObjectAPI call, but it lacks the required permissions. What should you do?
Ask an administrator to attach an IAM Policy to the IAM Role on your EC2 instance that authorizes it to do the required API call
Note:
IAM Roles are the right way to provide credentials and permissions to an EC2 instance.
You and your colleague are working on an application that’s interacting with some AWS services through making API calls. Your colleague can run the application on his machine without issues, while you get API Authorization Exceptions. What should you do?
Compare both your IAM Policy and his IAM policy in AWS Policy Simulator to understand the difference
Your administrator launched a Linux EC2 instance and gives you the EC2 Key Pair so you can SSH into it. After getting into the EC2 instance, you want to get the EC2 instance ID. What is the best way to do this?
Query the metadata at http://169.254.169.254/latest/meta-data
You’re running an application on an on-premises server. The application needs to perform API calls to an S3 bucket. How can you achieve this in the most secure manner?
A: Create an IAM user to be used by the application, then generate IAM credentials and put the credentials into environment variables
Note:
Here, it’s about creating a dedicated IAM user for the application, as using your own personal IAM credentials would blur the lines between actual users and applications. Or, you can run aws configure on the on-premises server.
When an IAM role is attached to your EC2 instance, you can retrieve both the IAM role name and the IAM policies attached to the role.
False
Note:
You can retrieve the IAM role name attached to your EC2 instance using the Instance Metadata service, but you can not retrieve the IAM policies themselves.
What is the goal of Exponential Backoff?
To increase the delay between retries exponentially, reducing the load on the server by spreading out the requests more as retries increase.
This approach helps prevent the server from becoming overwhelmed, allowing it to respond to as many requests as possible, especially when multiple clients are attempting retries simultaneously.
Exponential Backoff
What is the “AWS CLI Credentials Provider Chain”
The order the CLI will look for credentials.
What is the “AWS SDK Default Credentials Provider Chain”
The order the Java SDK (example) will look for credentials.
How can you be notified when there’s an object uploaded to your S3 bucket?
S3 Event Notifications
You have an S3 bucket that has S3 Versioning enabled. This S3 bucket has a lot of objects, and you would like to remove old object versions to reduce costs. What’s the best approach to automate the deletion of these old object versions?
S3 Lifecycle Rules - Expiration Actions
How can you automate the transition of S3 objects between their different tiers?
S3 Lifecycle Rules
While you’re uploading large files to an S3 bucket using Multi-part Upload, there are a lot of unfinished parts stored in the S3 bucket due to network issues. You are not using these unfinished parts and they cost you money. What is the best approach to remove these unfinished parts?
Use an S3 Lifecycle Policy to automate old/unfinished parts deletion