How mycrypto.tools uses AWS Lambda Serverless Architecture? And the overview of AWS products/services. (Do you really need Servers?)

Tuna Tore
Tuna Tore
Jan 3 · 10 min read

In this article, I would like to briefly summarize the AWS (Amazon Web Services) components used during the design and development of mycrypto.tools.

As an introduction, mycrypto.tools was founded in 2019 to solve and clarify the cryptocurrency — Bitcoin and Ethereum — private-public key and address generation issues. For example, mycrypto.tools aims to answer questions such as “How can I create my Bitcoin — Ethereum addresses offline?”, without the need to download additional software or buy cryptocurrency wallets, and educate people with step by step simplified courses. More details about mycrypto.tools is explained later in this article.

First and foremost, related to our website, AWS Serverless architecture was selected, because it enables us to build and run our code on the AWS platform without the need to configure and manage physical servers. Serverless eliminates server management issues such as clustering, provisioning, scaling, patching, and maintenance tasks. It has also dramatically lowered the cost of operating servers, because we are being charged based on the number of requests to our servers and memory usage for each lambda functions.

Moreover, our business model at mycrypto.tools, such as request-based and asynchronous cryptographic calculations requiring the compute power only, was also allowed us to select and use AWS Serverless architecture.

Let’s have a look at the details of this architecture:

https://mycrypto.tools AWS Lambda architecture

Serverless Architecture

AWS Serverless architecture provides agility to develop new functionalities and lowers the cost of ownership of businesses since we don’t need physical or virtual servers to run our code. It might be not the right, optimal solution for some business types, but for mycrypto.tools, it is being used successfully. AWS Serverless architecture handles the configuration and maintenance of physical/virtual servers in a Virtual Private Network for us — therefore, we don’t need to maintain our servers — This also increases the efficiency of development, meaning that the development becomes more priority than operating servers.

Serverless is a new concept/paradigm of development — by using compute power offered by AWS — without the need for physical servers offered by AWS since 2014, and it is very successful. It has numerous benefits like below:

-Flexible scaling — code runs in parallel and scales precisely based on the workload.

-Build/run applications without the need to manage actual servers (no need to provision servers).

-Scale to tens of thousands of concurrent requests — way quicker than server-based applications

-Pay only for the compute time — charged for every 100 ms (milliseconds) your code executes and the number of times your code is triggered.
-Highly available and distributed architecture.

-Lambda services can be triggered by other AWS services or by sending HTTP requests (HTTP endpoints) using a web or mobile app.

-Write code and upload it to AWS Lambda, then your code runs without additional configurations.

-Suitable technology for Data processing, IoT, Real-Time file/stream processing, ETL (Extract, Transform, and Load), Mobile Backends, WEB applications/Backends.

Let’s take a closer look at the services used in mycrypto.tools:

Amazon Route53

AWS Route53 service forwards domain name requests to our website at mycrypto.tools. Amazon Route53 is a highly available and stable cloud-based Domain Name System (DNS). Route53 connects/forwards user requests to services running in AWS such as CloudFront, S3, AWS Instances, and Load Balancers. It is also very cost-efficient, flexible to add configurations such as health checks, etc.

Specifics:

-High availability and reliability based on AWS infrastructure.

-Flexible routing based on multiple criteria such as endpoint health, geographic location, etc.

-Router53 integrates well with other AWS services such as Amazon CloudFront, AWS S3 Buckets, AWS EC2 Instances, and other AWS resources.

Amazon API Gateway

mycrypto.tools uses AWS API Gateway to scale API requests. Amazon API Gateway is a managed service that can be configured to create, publish, and monitor API requests to AWS Lambda functions at any scale. mycrypto.tools uses Node.js and Java backends with API gateway to process requests. In several locations in the code, AWS SDK is used as well to interact with S3 and other AWS services.

Specifics:

-API gateway can be configured as HTTP and REST APIs.

-Amazon CloudWatch service can monitor API gateway requests.

-It is efficient to develop APIs.

-It provides high performance at any scale.

-It includes authorization and access control, throttling, version management.

-Process up to hundreds of thousands of concurrent API calls to the AWS services.

AWS Lambda

AWS Lambda Serverless architecture was implemented on mycrypto.tools to process requests related to cryptocurrencies such as cryptographic functions and address generation. AWS Lambda technology allows its users to run code without provisioning servers. We only use the computing power of the AWS Cloud platform using Serverless Architecture. Amazon API gateway is also being used to call AWS Lambda functions, which scales well under a heavy workload.

Please refer to our architectural diagram to understand how our platform uses AWS Lambda.

Specifics:

-No need to manage servers.

-Codes can be written locally and uploaded to AWS Lambda without provisioning servers.

-AWS will do maintenance of servers and all configurations.

-It can be used for Web applications, IOT Backends, Mobile Backends, Data, and Real-Time processing.

-It can interact with other AWS Services using AWS SDK.

Amazon CloudFront

CloudFront is a content delivery network technology that is used by mycrypto.tools. CloudFront is able to integrate and work seamlessly with Amazon S3 for serving static HTML pages with some additional functionalities such as caching etc. It is a secure and programmable content delivery network service.

Specifics:

-It increases the speed of delivering content to users since it is scaled and globally distributed.

-It increases the security of your applications with it is integrated protections.

-It provides configuration options to defined SSL certificates using AWS Certificate Manager.

-It is programmable, meaning that you can add configurations to your cloud applications through its interface, such as defining CloudWatch alarms as well.

-You can see usage reports of your cloud applications using the reports provided.

AWS Certificate Manager

AWS Certificate Manager allows us to create SSL/TLS certificates to provide additional security while receiving/sending requests to our AWS servers.

Specifics:

-AWS Certificate Manager provides provisioning, managing, and deploying public and private SSL/TLS certificates to be used with AWS Services.

AWS IAM

Amazon Identity and Access Management is used to provide roles and accesses to AWS services at mycrypto.tools. All permissions are arranged at the IAM level for AWS resources.

Specifics:

-Users and their accesses, permissions can be grouped by roles.

-Policies can be set to roles and users.

Amazon DynamoDB

DynamoDB was selected to store some of the data created on mycrypto.tools. Data is stored in an unformatted way. DynamoDB is able to handle so many requests at the same time and daily basis. Moreover, it supports scaling and caching, as well.

Specifics:

-NoSQL Database; key-value and document database.

-High performant database (high availability and durability) under heavy work-load and performance at any scale.

-Serverless NoSQL managed database, meaning that there are no servers to be managed by you; AWS manages DynamoDB databases. AWS patches, maintain, and operate DynamoDB in the AWS Cloud..

-It supports ACID transactions, access-control on tables, backups, etc.

-It is very powerful and performant for Serverless Web apps, Mobile Backends, and Microservices.

Amazon S3

AWS S3 (Simple Storage Service) was selected to host static web pages such as HTML, CSS, images, JQuery, and JavaScript files for mycrypto.tools. You can also store your AWS lambda code in S3 buckets. AWS can server the static pages hosted on S3 buckets by enabling Static website hosting properties in S3 buckets and public access settings. Additionally, S3 provides the versioning of your files, meaning that files deleted can be recovered as well. The previous versions can also be deleted automatically by AWS.

Specifics:

-It provides object storage using a web-interface and through AWS CLI (Command Line Interface). Objects can be uploaded from local computers to AWS servers using script commands.

-AWS guarantees high availability/uptime for its S3 services.

-S3 can be used as a backup and restore service, Disaster Recovery storage, Big data analytics storage, Cloud-native application data storage.

-Objects are stored in locations called S3 buckets. Bucket names are global so that you can’t have different buckets having the same name.

-AWS provides APIs such as AWS SDK to manage/edit S3 Buckets.

-Bucket access can be restricted/limited using bucket configurations.

-It is used by Industry giants such as NETFLIX, airbnb, etc.

Amazon SNS (Simple Notification) and Amazon SES — Simple Email Service

Amazon SNS allows us to send email messages using as a notification messaging mechanism. It interacts with AWS SES to send emails to mycrypto.tools users.

Specifics:

-AWS SNS is a fully-managed, highly available pub/sub messaging service which is used to decouple systems such as microservices, distributed systems, and serverless apps.

-AWS SNS keeps messages private, secure, and durable.

-AWS SES (Simple Email Service); Cloud-based email service, which is highly-scalable.

Amazon CloudWatch

mycrypo.tools uses AWS CloudWatch to monitor cloud metrics and events. CloudWatch is able to provide us the performance changes, resource utilization, and logs. Using CloudWatch, we are able to set alarms to notify us to incase there is a high-load in our software. We are also able to see logs and metrics to troubleshoot the issues when it is required.

Specifics:

-A single platform to detect and monitor application-specific errors and metrics.

-CloudWatch is able to collect data related to resources, services, and usages.

-CloudWatch provides the functionalities and configurations to improve your applications’ operational performance by its automated actions based on thresholds.

-CloudWatch can trigger events to call other services such as AWS Lambda.

-CloudWatch also provides the interface to see and explore the application logs.

AWS CLI

AWS CLI — Command Line Interface allows us to synchronize our development environment with remote resources such as static web pages and AWS Lambda functions. All changes in the local development environment can be synched using command-line interface commands. So, we can use CLI to access Amazon S3 objects.

More information about https://aws.amazon.com/cli/

Sample command:
aws s3 sync . s3://mybucket

Specifics:

-A unified tool to manage AWS Services using a command-line interface.

-Provides command-line utility functions to automate AWS services using scripts.

AWS SDK

AWS SDK — Software Development Kit for Java was selected to be used in AWS Lambda functions. We are able to integrate AWS S3 services and DynamoDB using AWS SDK.

Specifics:

-Provides APIs to develop software that interacts with AWS Services.

Technology:

Backend:

-Java 8 (Google Guava + Jackson + CryptoCurrency Libraries)

-Amazon SDK (Software Development Kit — AWS Lambda)

-Amazon CLI (Amazon Command Line Interface)

-Node.js 10.x

-FreeMarker as Java Template Engine

-Rome Java Framework for RSS

-Maven

UI (User-Interface):

-HTML + CSS

-JQuery

-JavaScript

About mycrypto.tools

mycrypto.tools was founded in 2019 to solve secure private and public key generation issues in which users having related to cryptocurrency addresses. We aim to assist users by simplifying address generation for Bitcoin and Ethereum using open-source software and online courses; Our courses teach how to create Bitcoin and Ethereum addresses using a step-by-step approach.

Nowadays, most cryptocurrency wallets on the market seem safe, or they claim that users can store their private keys securely using those wallets. But, those wallets, in general, require users to connect the internet to download their closed-source software.

Because nobody knows how those wallets create private keys — by using which algorithm — users most of the time find them in a position which they cannot understand the details of the private key — public key generation. They cannot do anything about the private key generation because of the lack of understanding and knowledge, which can be quickly learned by anybody with some interest in technology. Moreover, most of those wallets cannot guarantee that private keys are not being exposed to hackers once those devices or software are connected to the internet.

Because of these issues, we — myrcypto.tools — decided to provide secure public/private address generation, which is offline to our users, and educate users about cryptocurrencies. In this way, users will have complete ownership of their cryptocurrency keys. In summary, our users will achieve this by attending our courses; We will provide basic cryptocurrency courses providing all the tools and details to create private-public keys.

mycrypto.tools provide the following online services and tools:

Bitcoin Address Validation — https://mycrypto.tools/btcaddressvalidator.html

Bitcoin addresses have a specific format and length; addresses also have specific characters. Our Bitcoin Address validation checks an address based on those rules using AWS Lambda architecture.

Ethereum Address Validation https://mycrypto.tools/ethaddressvalidator.html

Ethereum addresses have a specific format and length; addresses also have specific characters. Ethereum Address validation checks an address based on those rules using AWS Lambda architecture and open-source tools.

Bitcoin Address Generator — https://mycrypto.tools/btcaddresssimple.html

Bitcoin Address Generator — Technical version — https://mycrypto.tools/btcaddress.html (detailed explanation of address generation)

Users can generate Bitcoin addresses online by using this address generator based on AWS Lambda — Serverless architecture. The addresses created on this tool are only for educational usage; We never store or log your address generation requests or private keys on our servers.

If you want to learn how Bitcoin Addresses are created, you can read my other article about this topic.

Read How to generate Bitcoin addresses

Ethereum Address Generator — https://mycrypto.tools/ethaddress.html

Users can generate Ethereum addresses online by using this address generator based on AWS Lambda — Serverless architecture. The addresses created on this tool are only for educational usage; We never store or log your address generation requests or private keys on our servers.

If you want to learn how Ethereum Addresses are created, you can read my other article about this topic.

Read How to generate Ethereum addresses

Cryptographic Hash Algorithms and Utils — https://mycrypto.tools/hashutils.html

Users can find some of the hash algorithms and utility functions on this page, which can be used online. Here is the list of the algorithms:

  • SHA3–256 (Secure Hash Algorithm 3)
  • SHA-256 (Secure Hash Algorithm)
  • SHA3–512 (Secure Hash Algorithm 3)
  • RIPEMD160(RIPE Message Digest)
  • MD5
  • Hexadecimal
  • Base58 Encode

Tools to encrypt and decrypt Bitcoin and Ethereum addresses and texts https://mycrypto.tools/encrypt_decrypt_keys.html

Users can use this tool to encrypt and decrypt Bitcoin and Ethereum addresses and texts using AES (Advanced Encryption Standard) algorithm.

Sample Ethereum and Bitcoin Addresses -
https://mycrypto.tools/sample_btcaddresses.html
https://mycrypto.tools/sample_ethaddresses.html

Users can find sample Ethereum and Bitcoin addresses by visiting the preceding pages. On these pages, they can find multiple Etheruem and Bitcoin addresses generated by our tools. Addresses include their public and private keys and can be used for educational purposes.

Cryptocurrency prices and news -
https://mycrypto.tools/cryptocurrencyprices.html
https://mycrypto.tools/news/news.html

Users can find the latest cryptocurrency prices by visiting these pages. There are also cryptocurrency conversion tools and graphs illustrating the price history etc. The news page is created daily, and users can find daily news on mycrypto.tools.

Tuna Tore

Written by

Tuna Tore

Software Engineer — AWS Solutions Architect Amsterdam

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade