Skip to content
HackerRank Launches Two New Products: SkillUp and Engage Read now
Join us at the AI Skills & Tech Talent Summit in London! Register now
The 2024 Developer Skills Report is here! Read now
Stream HackerRank AI Day, featuring new innovations and industry thought leaders. Watch now

5 AWS Interview Questions Every Developer Should Know

Written By April Bohnert | August 10, 2023

Abstract, futuristic image generated by AI

Cloud computing technology has firmly enveloped the world of tech, with Amazon Web Services (AWS) being one of the fundamental layers. Launched in 2006, AWS has evolved into a comprehensive suite of on-demand cloud computing platforms, tools, and services, powering millions of businesses globally.

The ubiquity of AWS is undeniable. As of Q1 2023, AWS commands 32% of the cloud market, underlining its pervasive influence. This widespread reliance on AWS reflects a continued demand for professionals adept in AWS services who can leverage its vast potential to architect scalable, resilient, and cost-efficient application infrastructures.

Companies are actively on the hunt for engineers, system architects, and DevOps engineers who can design, build, and manage AWS-based infrastructure, solve complex technical challenges, and take advantage of cutting-edge AWS technologies. Proficiency in AWS has become a highly desirable skill, vital for tech professionals looking to assert their cloud computing capabilities, and a critical criterion for recruiters looking to acquire top-tier talent.

In this article, we explore what an AWS interview typically looks like and introduce crucial AWS interview questions that every developer should be prepared to tackle. These questions are designed not only to test developers’ practical AWS skills but also to demonstrate their understanding of how AWS services interconnect to build scalable, reliable, and secure applications. Whether you’re a seasoned developer looking to assess and polish your AWS skills or a hiring manager seeking effective ways to evaluate candidates, this guide will prepare you to navigate AWS interviews with ease.

What is AWS?

Amazon Web Services, popularly known as AWS, is the reigning champ of cloud computing platforms. It’s an ever-growing collection of over 200 cloud services that include computing power, storage options, networking, and databases, to name a few. These services are sold on demand and customers pay for what they use, providing a cost-effective way to scale and grow.

AWS revolutionizes the way businesses develop and deploy applications by offering a scalable and durable platform that businesses of all sizes can leverage. Be it a promising startup or a Fortune 500 giant, many rely on AWS for a wide variety of workloads, including web and mobile applications, game development, data processing and warehousing, storage, archive, and many more.

What an AWS Interview Looks Like

Cracking an AWS interview involves more than just knowing the ins and outs of S3 buckets or EC2 instances. While a deep understanding of these services is vital, you also need to demonstrate how to use AWS resources effectively and efficiently in real-world scenarios.

An AWS interview typically tests your understanding of core AWS services, architectural best practices, security, and cost management. You could be quizzed on anything from designing scalable applications to deploying secure and robust environments on AWS. The level of complexity and depth of these questions will depend largely on the role and seniority level you are interviewing for.

AWS skills are not restricted to roles like cloud engineers or AWS solutions architects. Today, full-stack developers, DevOps engineers, data scientists, machine learning engineers, and even roles in management and sales are expected to have a certain level of familiarity with AWS. For instance, a full-stack developer might be expected to know how to deploy applications on EC2 instances or use Lambda for serverless computing, while a data scientist might need to understand how to leverage AWS’s vast suite of analytics tools.

That being said, irrespective of the role, some common themes generally crop up in an AWS interview. These include AWS’s core services like EC2, S3, VPC, Route 53, CloudFront, IAM, RDS, and DynamoDB; the ability to choose the right AWS services based on requirements; designing and deploying scalable, highly available, and fault-tolerant systems on AWS; data security and compliance; cost optimization strategies; and understanding of disaster recovery techniques.

1. Upload a File to S3

Amazon S3 (Simple Storage Service) is one of the most widely used services in AWS. It provides object storage through a web service interface and is used for backup and restore, data archiving, websites, applications, and many other tasks. In a work environment, a developer may need to upload files to S3 for storage or for further processing. Writing a script to automate this process can save a significant amount of time and effort, especially when dealing with large numbers of files. 

Task: Write a Python function that uploads a file to a specified S3 bucket.

Input Format: The input will be two strings: the first is the file path on the local machine, and the second is the S3 bucket name.

Output Format: The output will be a string representing the URL of the uploaded file in the S3 bucket.

Sample Code:

import boto3

def upload_file_to_s3(file_path, bucket_name):

    s3 = boto3.client('s3')

    file_name = file_path.split('/')[-1]

    s3.upload_file(file_path, bucket_name, file_name)

    file_url = f"https://{bucket_name}{file_name}"

    return file_url


This question tests a candidate’s ability to interact with AWS S3 using Boto3, the AWS SDK for Python. The function uses Boto3 to upload the file to the specified S3 bucket and then constructs and returns the file URL.

2. Launch an EC2 Instance

Amazon EC2 (Elastic Compute Cloud) is a fundamental part of many AWS applications. It provides resizable compute capacity in the cloud and can be used to launch as many or as few virtual servers as needed. Understanding how to programmatically launch and manage EC2 instances is a valuable skill for developers working on AWS, as it allows for more flexible and responsive resource allocation compared to manual management. 

Task: Write a Python function using Boto3 to launch a new EC2 instance.

Input Format: The input will be two strings: the first is the instance type, and the second is the Amazon Machine Image (AMI) ID.

Output Format: The output will be a string representing the ID of the launched EC2 instance.

Sample Code:

import boto3

def launch_ec2_instance(instance_type, image_id):

    ec2 = boto3.resource('ec2')

    instances = ec2.create_instances(






    return instances[0].id


The function uses Boto3 to launch an EC2 instance with the specified instance type and AMI ID, and then returns the instance ID. This intermediate-level question tests a candidate’s knowledge of AWS EC2 operations. 

Explore verified tech roles & skills.

The definitive directory of tech roles, backed by machine learning and skills intelligence.

Explore all roles

3. Read a File from S3 with Node.js

Reading data from an S3 bucket is a common operation when working with AWS. This operation is particularly important in applications involving data processing or analytics, where data stored in S3 needs to be loaded and processed by compute resources. In this context, AWS Lambda is often used for running code in response to triggers such as changes in data within an S3 bucket. Therefore, a developer should be able to read and process data stored in S3. 

Task: Write a Node.js AWS Lambda function that reads an object from an S3 bucket and logs its content.

Input Format: The input will be an event object with details of the S3 bucket and the object key.

Output Format: The output will be the content of the file, logged to the console.

Sample Code:

const AWS = require('aws-sdk');

const s3 = new AWS.S3();

exports.handler = async (event) => {

    const params = {

        Bucket: event.Records[0],

        Key: event.Records[0].s3.object.key


    const data = await s3.getObject(params).promise();




This advanced-level question requires knowledge of AWS SDK for JavaScript (in Node.js) and Lambda. The above AWS Lambda function is triggered by an event from S3. The function then reads the content of the S3 object and logs it. 

4. Write to a DynamoDB Table

Amazon DynamoDB is a key-value and document database that delivers single-digit millisecond performance at any scale. It’s commonly used to support web, mobile, gaming, ad tech, IoT, and many other applications that need low-latency data access. Being able to interact with DynamoDB programmatically allows developers to build more complex, responsive applications and handle data in a more flexible way.

Task: Write a Python function using Boto3 to add a new item to a DynamoDB table.

Input Format: The input will be two strings: the first is the table name, and the second is a JSON string representing the item to be added.

Output Format: The output will be the response from the DynamoDB put operation.

Sample Code:

import boto3

import json

def add_item_to_dynamodb(table_name, item_json):

    dynamodb = boto3.resource('dynamodb')

    table = dynamodb.Table(table_name)

    item = json.loads(item_json)

    response = table.put_item(Item=item)

    return response


This function uses Boto3 to add a new item to a DynamoDB table. The function first loads the item JSON string into a Python dictionary, then adds it to the DynamoDB table. This question tests a candidate’s knowledge of how to interact with a DynamoDB database using Boto3.

5. Delete an S3 Object

Being able to delete an object from an S3 bucket programmatically is important for maintaining data hygiene and managing storage costs. For instance, you may need to delete objects that are no longer needed to free up space and reduce storage costs, or you might need to remove data for compliance reasons. Understanding how to perform this operation through code rather than manually can save a lot of time when managing large amounts of data.

Task: Write a Node.js function to delete an object from an S3 bucket.

Input Format: The input will be two strings: the first is the bucket name, and the second is the key of the object to be deleted.

Output Format: The output will be the response from the S3 delete operation.

Sample Code:

const AWS = require('aws-sdk');

const s3 = new AWS.S3();

async function delete_s3_object(bucket, key) {

    const params = {

        Bucket: bucket,

        Key: key

    const response = await s3.deleteObject(params).promise();

    return response;


The function uses the AWS SDK for JavaScript (in Node.js) to delete an object from an S3 bucket and then returns the response. This expert-level question tests the candidate’s ability to perform S3 operations using the AWS SDK.

Resources to Improve AWS Knowledge

This article was written with the help of AI. Can you tell which parts?

Abstract, futuristic image generated by AI

6 REST API Interview Questions Every Developer Should Know