Posts

Showing posts with the label aws

AWS - Databases DynamoDB, RDS

Image
AWS - Databases There are 3 main database types in software world: Relational databases (MySql, Postgre, Amazon RDS etc.) Non-relational databases (Mongo, Amazon DynamoDB etc.) Graph databases (Amazon Neptune, NebulaGraph etc.) For your specific use case they have advantages and disadvantages.  We will cover relational and non-relational databases in this post.  Relational databases - as name implies stores information based on defined relation. Organized by tables, columns, rows. Supports complex queries and joins. Non-relational databases - contrary to the relational databases non-relational databases are more flexible. Documents, key/value, columns and graphs are some forms can be used to organize data. Databases in Amazon There are few ways to use database in AWS : Database on EC2 - We deploy any database software onto our instance and use it like this. Amazon RDS  - Amazon provided service, under the hood you can use (MySql,Postgre,Maria Amazon Aurora etc.) relationa...

S3 - Create a static website

Image
 S3 - Create a static website Creating static website with S3 bucket is very easy. This will make not only your website fast but also hassle-free and cheap alternative to traditional hosting. Please read this post before going further -  https://www.learn-aws.com/2024/11/s3.html  Create a bucket and set the permissions.  Click on the bucket, and navigate to the "Properties" tab, scroll down you will see this option. Edit it like below. Create a simple index.html file like the one below and upload it with the files you used in index file. In this case "aws.png" is also uploaded into the bucket as well. <html> <title> Hello from AWS S3 </title> <body> <img src="aws.png" alt="AWS"> </body> </html>  If we do everything right, we will be able to see rendered html when we copy and paste the link in the index file's link in S3 service.

S3

Image
 S3 In AWS S3 storage is special kind of storage that provides flexibility that other kind of storage services don't provide. S3 is sitting internet facing subnet and if we want to access S3 bucket from our private subnet we need to either direct traffic over internet gateway or use S3 gateway endpoint service.  To access or upload files to S3 we must use REST API for that. This actually makes things easier because thanks to this we will be able to do all operations programmatically (via our favorite programming language). In block storage service we supposed to use operating system to perform all the tasks. There should be some kind of hierarchy. But in S3 files storage in "bucket"s. Hierarchy can be mimicked by prefixes.  Let's create bucket and access over internet Search S3 in the search bar  Create a bucket Name must be unique otherwise it will display an error. Use default settings. After that try to upload some files there. Click to that file you will see the ...

Storage in AWS

Image
Storage in AWS There are 3 major storage type in AWS : Block storage (Elastic Block Storage - EBS) File storage (Elastic File Storage - EFS) Object storage (S3 bucket) HDD and SSD are the main storage units for all these three.  Block storage - HDD and SSD are the devices that uses blocks to store information inside. Blocks are small fragment/cluster of data. Basically AWS provides this so that we can partition and format it easily. They are ideal for applications that require low-latency access to data, such as databases and enterprise applications. File Storage - Is different than block storage, while under the hood it depends on block based storage units, it is connected to internet so that we upload/download files over internet. SSD and/or HDD units are inserted Network Attached Storage Servers so that is how it works. It is ideal for content management systems, web serving, and big data analytics. Object Storage - S3 is unlike the others mentioned above. With the help of RE...

Security groups, Network ACL and Firewall

Image
 Security groups, Network ACL and Firewall Stateful and Stateless firewall - when connection initiated from client firewall checks the rules written and based on the defined rules allows/denies the traffic. Client initiates connection from any port (except the reserved by the OS) but destination port is known and static. So stateful firewall which as name implies keeps the state of connection so that even though there is no outbound rule for the outgoing connection, firewall will automatically allow it. Contrary to this approach in stateless firewall case you should explicitly define rule for inbound and outbound connections.   Network Access Control List (Network ACL) -  is stateless firewall allows you to define rules in subnet level. Also it processes rules in order. Security group - on the other hand stateful and also applied to individual instance or instance group . It evaluates all the rules.  Let's learn how to manage Network ACL's : Search VPC in the s...