<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Mohammad Samman Hossain on Medium]]></title>
        <description><![CDATA[Stories by Mohammad Samman Hossain on Medium]]></description>
        <link>https://medium.com/@samman.hossain1?source=rss-417a2072fa5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*30LzYmEPHdjkUsiVqT9d_w.jpeg</url>
            <title>Stories by Mohammad Samman Hossain on Medium</title>
            <link>https://medium.com/@samman.hossain1?source=rss-417a2072fa5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 09:09:07 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@samman.hossain1/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Amazon S3]]></title>
            <link>https://medium.com/@samman.hossain1/amazon-s3-c3ed66a2fcce?source=rss-417a2072fa5------2</link>
            <guid isPermaLink="false">https://medium.com/p/c3ed66a2fcce</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[amazon-s3]]></category>
            <dc:creator><![CDATA[Mohammad Samman Hossain]]></dc:creator>
            <pubDate>Mon, 25 Oct 2021 18:23:01 GMT</pubDate>
            <atom:updated>2021-10-25T18:23:32.490Z</atom:updated>
            <content:encoded><![CDATA[<p>Amazon S3 powers the biggest websites in the world. This is one of the most important building blocks of AWS. It is advertised as the “infinitely scaling” storage. So, for the hands on we need to go to the Amazon S3 console in AWS. Amazon S3 is a global service. It allows people to store files in buckets(directories). These buckets must have globally unique name. Though S3 is a global service buckets are defined at region level. All the files in S3 has a key. The key is the FULL path to the file.</p><p>Now first we need to go into the Amazon S3 console and click on the create bucket button. We will be taken into the following page</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n1g_eBowh-aLNOwnhp5_Qg.png" /></figure><p>Here we need to give the bucket a name. This name must be unique among all the buckets that has ever been created by everyone. As the bucket is a defined at regional level, we must choose a region. Here I chose ap-south-1 because that is the closest region to me. Then for this example we block all public access for this bucket. This will make sure that files in our bucket can not be accessed publicly using the file url. Also we will disable bucket versioning for now and will create the bucket.</p><p>Now we will upload a file in the bucket. We will select the bucket and click on upload button which will take us to the following page. We will choose a file to be uploaded.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/851/1*1nx7eOZHUisZNAxtsJ7u6Q.png" /></figure><p>Now if we go back to our bucket we will and select our uploaded file we will be presented with the following. Here object URL is the URL using which we can access our file over the internet publicly but in the configuration phase of bucket we blocked off the public access to our bucket. So while using the Object URL we will be presented with an xml. XML is given below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bfhhF3ur3buKBz1NtvsA4A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/864/1*ZcP9wHiDJRmdUWcHn8S6Hg.png" /></figure><p>But if we use the Open button, we can access the file without any problem. Why this happens? When we use the open button if you look closely the URL is significantly long than the Object URL that we used before to access the file. This long URL actually called a pre signed URL. This URL is giving AWS our temporary credentials. So, that&#39;s why we can access the file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vj04w9TlCr9lzDCbKu-bIw.png" /></figure><p>Now we can also create a folder and within the folder we can upload another file if we want. Also we can delete the folder permanently.</p><p>Now, lets talk about versioning. We can enable bucket versioning from our bucket properties menu. We will select the bucket, go to properties and enable versioning.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vhj-izgFY1MTjRHsIlWXxw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h5I35fe43bLo6E8-zHus3w.png" /></figure><p>Now if we click on the Show version button we can see a new column named version ID. Please be informed that when we upload a file without versioning enabled, AWS gives that file a null version ID. Let’s upload another file while versioning is on and we will see the version ID there. If we upload the same file again we can see that the newer file is shown and if we evable the show version button, we can see both version of the same file in a tree like structure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Bo3t6fyFd-0c24Z5gcF8WA.png" /></figure><p>We can delete the file but it will only add a delete marker to them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*mzH4B-OJFNJ4dA0GyEGCyQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fjmXkMeSFb_1E0V3lnEoGw.png" /></figure><p>Only if we delete the marker and then delete the file, then the file will be permanently deleted. Please note that the previous version of the file will not be deleted, only the version that you chose will be deleted.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7TFJM7gS_tILUe9-N7g9ww.png" /></figure><p>For encryption we can encrypt the files while uploading one by one or we can set the encryption for the whole bucket, in that case all the files will be encrypted using bucket configuration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/851/1*0N8E2KiBrZTcFafrynQwqA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*V8Fk9_q9c1fn4DBbET1nvw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/907/1*kXLxaS_zlbP9JA7KrdMAnA.png" /><figcaption>picture 1 2 and 3</figcaption></figure><p>While uploading a file we can encrypt using two option like in picture 1 and 2. Also we can set default bucket encryption like in picture 3</p><p>We can use bucket security policies to restrict access or restrict upload without encryption. For that we will go to bucket permission page and edit the bucket policy. Now, we will have two options to create this policy. We will use the policy generator option here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/869/1*y9poYzN2doWmThmY_My1Ag.png" /></figure><p>First we need to select the type of policy, here for this example it will be S3 bucket policy. For effect we will choose to deny because we want to deny upload where the file is not encrypted using the encryption method we choose. Principle will be *, because we want to apply this rule for all upload. For action, we will choose ‘put object’(upload). We can get the ARN from edit bucket policy page which is in the previous picture(Please put /* after ARN). Then we will add conditions because with out condition the policy will not work. Condition will be null, so it will check for null. Key will be ‘s3:x-amz-server-side-encryption’ as we will check for this header and this can not be null. Value would be true, so if our condition is true then deny any upload request.</p><p>Now we will add condition and add statement. Second condition will also needs to be added, where condition is stringnotequals, key ‘s3:x-amz-server-side-encryption’ and value ‘AES256’. This will deny upload where the header value is not equals to ‘AES256’. Now we will generate the policy, copy the policy and paste it edit bucket policy page. At the last we will save the changes. Now with this policy, if we try to upload any files without the Amazon S3 master-key (SSE-S3) encryption, the upload will fail. Please try to upload files without this encryption and check.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cI67aDNpdNIs0p4AYqUcmQ.png" /></figure><p>We can make our bucket a static website. For that we will scroll down in bucket properties and at the end we will static website hosting. Right now if we use the static website URL we will get access denied error because our bucket does not allow any public access. So, we need to change this. We will go to permissions and disable ‘block all public access’.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/884/1*znr2EDA83iBvyUeetTecRQ.png" /></figure><p>We also need to add a bucket policy to allow public access. We will add the policy with the other policy’s we added to not allow upload without specific encryption.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oOGkgPAAsbS5mLhxuv_IYg.png" /></figure><p>Here the last policy is for the public access. Now we will upload an index.html file with the html code that we want to run in our html file. We will specify the Index document(the page that we want to show) while enabling static website hosting. Now if we go to the URL given as the Bucket website endpoint in static website section, we will see the the index.html file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/887/1*-hLYT3A-o7VUi0icr_wF2w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/601/1*f6lXbvTomp6Qfo2UT4ex7w.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c3ed66a2fcce" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Amazon RDS with Amazon Aurora]]></title>
            <link>https://medium.com/@samman.hossain1/amazon-rds-with-amazon-aurora-6cdb7b694653?source=rss-417a2072fa5------2</link>
            <guid isPermaLink="false">https://medium.com/p/6cdb7b694653</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[amazon-aurora]]></category>
            <dc:creator><![CDATA[Mohammad Samman Hossain]]></dc:creator>
            <pubDate>Tue, 12 Oct 2021 05:34:00 GMT</pubDate>
            <atom:updated>2021-10-12T05:48:16.332Z</atom:updated>
            <content:encoded><![CDATA[<p>Today I am going to write about Amazon Aurora in Amazon RDS. <strong>Please note that this is not included in free tier of AWS.</strong></p><p>Amazon Aurora in a much better choice over others because it has much better performance over the others. Also, Aurora storage grows automatically in increments of 10GB up to 64 TB, while it can also have 25 replicas. these increased performance comes at 20% more cost than RDS. Aurora will have 6 copies of your data across 3 Availability zones where 4 copies out of 6 will be needed for write operations, this means it can write while one of the AZ’s are down. It needs 3 copies out of 6 for read operation. Aurora supports cross gen replication.</p><p>In the amazon services menu select RDS. Then go into database section and we will find the create database option.</p><p>Inside create database we will find all the option to create our first Amazon Aurora database. AWS has provided us with Standard create and easy create option where easy create will create the Database for us and we will not have to configure the database ourselves. From the engine options we will choose Amazon Aurora. Amazon aurora can run only using MySQL or PostgreSQL. So, we are presented with two editions. Select the one that you want to use. In this example I will choose the MySQL edition. In capacity type section we can choose provisioned where we will provision and manage the server instance sizes or we can choose serverless where we will specify the minimum and maximum amount of resources needed and Aurora will scale the capacity based on the database load. In replication features we can choose the database to have one single write instance with several reader instances or multiple writer with multiple reader instances. Then we will choose the version of Mysql(Aurora).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/1*bRFG3ALuOUCjV6DmB79mSw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/777/1*DSvOUrFvVv9WH1jhsnUgsg.png" /></figure><p>We can choose production or dev/test templates, what it will do is , it will pre-fill some of the options in the filled as per our choice. In the settings part we will choose the DB cluster identifier, master username, password. Next db instance class will be chosen. We will select an instance as per our requirement. In availability and durability sector we can create aurora replica or reader node in a different AZ or choose to not create one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/769/1*LQBV6muQRtclQ6JkCbBOqA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/795/1*YJ0FUipVPkAw2wlFG_X27w.png" /></figure><p>In connectivity VPN, Subnet group, public/private access will be chosen. WE can use existing security group for our database or create a new one. Also we will choose our preferred AZ(Availability zone) or let AWS chose for us.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/694/1*B2DrSxJuIgOBfJz2fm34Fg.png" /></figure><p>In additional configuration we will choose initial database name, if we do not choose one, RDS will not create a database, we will have to do it manually. We will choose backup retention period. For security we can enable encryption. If we do any bad commit or in case of some bad transaction we can go back to a specific point in time, for that we will have to enable backtrack. Monitoring and log exports are for monitoring purpose. We will choose the options as we see fit. The last two parts are maintenance and deletion protection. We can enable minor version upgrade and RDS will automatically upgrade to a new minor versions as they are released. The automatic upgrades occur in the maintenance window for the database. We will select the maintenance window. Deletion Protection protects from accidental delete command. As long as it is enables the database can not be deleted. Now we will create the Database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/688/1*GAWMcPm9s7ckyTsatYrOWA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/688/1*2EymCL42-khG5bb6uofY7Q.png" /></figure><p>Now, when the database is created we will see that there are three instances of database. One is regional instance of Aurora also one is writer and reader databse. If we select regional database we will see two endpoints. One for read and and one for write operation. For read only, we will use the endpoint with ‘ro’ written in its name. Point to be noted, we can also just select the write instance or the read instance and use their endpoint to connect, but that is not recommended. We should always use the reader endpoint to read and write endpoints to write of regional aurora instance. From action tab we can stop, delete, add reader, create read replica, add auto scaling policy and restore the database. Delete option will be greyed out if have deletion protection turned on. To delete the database, please disable the deletion protection. We first delete the instances of read and write then delete the regional aurora instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CRKimF0_XkHG88e9dzGc6Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B4fD1HZeSbM1fiMu2Yo97g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CUUh2Re-7KnUG255VhHWig.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*fUZpeMMiZ78AjbbQCSp0cQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6cdb7b694653" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Amazon Relational Database Service]]></title>
            <link>https://medium.com/@samman.hossain1/amazon-relational-database-service-837ca2b4d4b5?source=rss-417a2072fa5------2</link>
            <guid isPermaLink="false">https://medium.com/p/837ca2b4d4b5</guid>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Mohammad Samman Hossain]]></dc:creator>
            <pubDate>Tue, 12 Oct 2021 03:46:27 GMT</pubDate>
            <atom:updated>2021-10-12T03:59:48.653Z</atom:updated>
            <content:encoded><![CDATA[<p>To create RDS, we need to go to RDS service while logged in as an IAM user, you can be logged in as root user but that is not a good practice (Always do use the IAM user). We need to go to the databases tab and click on Create Database. We will be given two options, <strong>Standard Create </strong>and <strong>Easy Create. </strong>We will be choosing Standard create for now, because easy create will configure the database for us. Several options are presented for us for database engine. Amazon Aurora, MySQL, MariaDB, PostgreSQL, Oracle, Microsoft SQL Server. In the free tier, amazon Aurora is not available. We will use mySQL for now as it is free tier. Now, I have chosen the mySQL version 8.0.25 as it is the latest version at the time of this writing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*3aQcyOpngkLDbAyz0ITaCA.png" /></figure><p>We will choose the free tier template. First we need to choose a db instance identifier, this will be unique across region. Then we will create a master username and password. Then comes choosing DB instance class. As we are using free tier, all options except burstable classes which only have db.t2.micro options will be available to us. After that we will customize storage. General purpose SSD and 20 GB are selected, we will not change it for now. Disable the Enable storage auto scaling.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/785/1*cZEKEyhZHZHHsL8lByd_uQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/770/1*DBnaPrMi36L3WjTmK4T2qQ.png" /></figure><p>Next comes Availability and durability, we want this while working in production or live environment but as we are suing free tier, the options will be grayed out for us. In virtual private cloud we will choose the Default VPC which was created when we created our account. There are some additional connectivity options available. In most of the cases we will not want our DB to accessible from outside our amazon settings, but for this example we want to know if our db works, so we will select the public access options as yes. No for security groups, we can use existing of create new one. Create a new one, we named here “my-first-rds-sg” as example.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/633/1*QvQMW_Dg-0E6yWW9yBxWuQ.png" /></figure><p>Choose an initial database name. Enable automated backups. Disable log export for this example. For maintenance, we will have options to enable auto minor version upgrade, check mark this option. Also, maintenance window can be selected or we can select no preference.</p><p>Final part is to choose deletion protection, we can enable it, which will make sure this database can not be deleted which the option is enabled.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/760/1*LdFDyZdwLalIAOp4g2zN6w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/793/1*zcYyJs08f3xDAG56x4IlsA.png" /></figure><p>Finally create the database. Database will be created in a few moments.</p><p>Use sqlelectron or any other way to connect to DB. information from connecting to DB can be found from Database console in AWS management portal. Select the database that was created and find the endpoint from there. Endpoint is an url that we use to connect with our DB. write down the port, db name, password and test the connection.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/861/1*lzasy3n2UYTGAIh5X4RmoQ.png" /></figure><p>If we select the database, there are some options for us to take. We can stop, reboot, create read replica, take snapshot or restore the database from there.</p><p>Please note that we can only use select statement in read replicas and they are asynchronous.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=837ca2b4d4b5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>