AWS tools that you must know before its too late | Part 1

Shobhit Srivastava
3 min readApr 16, 2023

--

“First to mind when asked what ‘the cloud’ is, a majority respond it’s either an actual cloud, the sky, or something related to weather.” Citrix Cloud Survey Guide

Source : Freepik Image

AWS (Amazon Web Services) is vital for businesses with its cloud computing services, providing scalability, reliability, cost-effective solutions, agility, and innovation opportunities. AWS offers a wide range of services for building, deploying, and managing applications in the cloud, making it crucial for modern businesses to leverage AWS for growth, efficiency, and competitive advantage.

Here are five AWS (Amazon Web Services) tools that you can learn, along with a brief code example for each:

Source : eginnovations

Amazon EC2: A virtual server in the cloud that provides scalable compute capacity. Below is an example of creating an EC2 instance using AWS SDK for Python (Boto3).

import boto3

ec2 = boto3.resource('ec2')

# Create an EC2 instance
instance = ec2.create_instances(
ImageId='ami-xxxxxxxxxxxxx',
InstanceType='t2.micro',
MinCount=1,
MaxCount=1
)
Source : CloudKul

AWS Lambda: AWS Lambda is a serverless computing service that allows you to run code in response to events without the need to manage any servers. Here’s an example of a simple AWS Lambda function in Python that responds to an S3 bucket event and prints the object key:

import boto3

def lambda_handler(event, context):
# Extract the object key from the S3 event
object_key = event['Records'][0]['s3']['object']['key']

# Print the object key
print(f'Object key: {object_key}')
Source : FreeCodeCamp

Amazon S3: Amazon S3 (Simple Storage Service) is an object storage service that provides scalable and durable storage for files and objects. Here’s an example of how you can use the AWS SDK for Python (Boto3) to upload a file to S3:

import boto3

# Create an S3 client
s3 = boto3.client('s3')

# Upload a file to S3
with open('example.txt', 'rb') as file:
s3.upload_fileobj(file, 'my-bucket', 'example.txt')
Source : FreeCodeCamp

AWS DynamoDB: AWS DynamoDB is a managed NoSQL database service that provides fast and scalable performance for applications that require low-latency access to data. Here’s an example of how you can use Boto3 to put an item into a DynamoDB table:

import boto3

# Create a DynamoDB client
dynamodb = boto3.client('dynamodb')

# Put an item into the DynamoDB table
dynamodb.put_item(
TableName='my-table',
Item={
'id': {'S': '123'},
'name': {'S': 'John'},
'age': {'N': '30'}
}
)
Source : Dev community

AWS CloudFormation: AWS CloudFormation is a service that allows you to define and provision AWS infrastructure as code using templates. Here’s an example of a simple CloudFormation template written in YAML that creates an S3 bucket:

Resources:
MyBucket:
Type: AWS::S3::Bucket
Properties:
BucketName: my-bucket

These are just a few examples of the wide range of AWS tools and services available. AWS provides extensive documentation, tutorials, and sample code to help you get started with each of these tools and learn more about their capabilities. Click here for more.

Will write about more AWS tools in Part 2 of the AWS series.

Stay tuned!.

If this article has benefitted you in anyway. Please do support me here https://www.buymeacoffee.com/shobhitsri

--

--

Shobhit Srivastava

Software Developer | My areas of interest are: Software Development, OpenSource, Startups, Innovation