<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>IT &#8211; BLK8</title>
	<atom:link href="https://www.blk8.de/category/it/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.blk8.de</link>
	<description>Black Eight - Ben&#039;s space</description>
	<lastBuildDate>Mon, 10 Feb 2025 14:29:08 +0000</lastBuildDate>
	<language>de</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>

<image>
	<url>https://www.blk8.de/wp-content/uploads/2022/03/cropped-bkr_logo_quad-32x32.png</url>
	<title>IT &#8211; BLK8</title>
	<link>https://www.blk8.de</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Create public buckets in Strato HiDrive S3</title>
		<link>https://www.blk8.de/create-public-buckets-in-strato-hidrive-s3/</link>
					<comments>https://www.blk8.de/create-public-buckets-in-strato-hidrive-s3/#respond</comments>
		
		<dc:creator><![CDATA[Ben]]></dc:creator>
		<pubDate>Tue, 22 Mar 2022 21:22:18 +0000</pubDate>
				<category><![CDATA[IT]]></category>
		<guid isPermaLink="false">https://blk8.de/?p=89</guid>

					<description><![CDATA[Currently, there is no documented way to create public buckets in Strato HiDrive S3. But it can be done very easily using the AWS CLI. To set up the CLI, follow my post here. Let&#8217;s assume you already have a bucket called demobucket, and you can access it using the AWS CLI. Now we upload [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>Currently, there is no documented way to create public buckets in <a href="https://www.strato.de/cloud-speicher/hidrive-s3/" target="_blank" rel="noreferrer noopener">Strato HiDrive S3</a>. But it can be done very easily using the <a href="https://aws.amazon.com/de/cli/" target="_blank" rel="noreferrer noopener">AWS CLI</a>. To set up the CLI, follow my post <a href="https://blk8.de/use-strato-hidrive-s3-with-aws-cli/" data-type="post" data-id="78">here</a>.</p>



<p>Let&#8217;s assume you already have a bucket called <em>demobucket</em>, and you can access it using the AWS CLI. Now we upload a basic HTML page (or any other file):</p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-bash" data-lang="Bash"><code>% cat index.html 
&lt;!DOCTYPE html&gt;
&lt;html&gt;
    &lt;head&gt;
        &lt;title&gt;Hello World!&lt;/title&gt;
    &lt;/head&gt;
    &lt;body&gt;
Hello World!
    &lt;/body&gt;
&lt;/html&gt;

% strato s3 cp index.html s3://demobucket
upload: ./index.html to s3://demobucket/index.html </code></pre></div>



<p>The next step needs to be done only once for each bucket you want to make public. Please make sure you adjust the bucket name (in bold):</p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-bash" data-lang="Bash"><code>% strato s3api put-bucket-policy --bucket demobucket --policy &quot;{
  \&quot;Version\&quot;: \&quot;2012-10-17\&quot;,
  \&quot;Statement\&quot;: [
      {
          \&quot;Sid\&quot;: \&quot;PublicReadGetObject\&quot;,
          \&quot;Effect\&quot;: \&quot;Allow\&quot;,
          \&quot;Principal\&quot;: \&quot;*\&quot;,
          \&quot;Action\&quot;: \&quot;s3:GetObject\&quot;,
          \&quot;Resource\&quot;: \&quot;arn:aws:s3:::demobucket/*\&quot;
      }
  ]
}&quot;</code></pre></div>



<p>Now you can reach your file publicly using the URLs <a href="https://s3.hidrive.strato.com/demobucket/index.html">https://s3.hidrive.strato.com/demobucket/index.html</a> or <a rel="noreferrer noopener" href="https://demobucket.s3.hidrive.strato.com/index.html" target="_blank">https://demobucket.s3.hidrive.strato.com/index.html</a>:</p>



<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="1024" height="403" src="https://www.blk8.de/wp-content/uploads/2025/02/20220313_HiDrive_S3_4-1024x403.png" alt="" class="wp-image-229" srcset="https://www.blk8.de/wp-content/uploads/2025/02/20220313_HiDrive_S3_4-1024x403.png 1024w, https://www.blk8.de/wp-content/uploads/2025/02/20220313_HiDrive_S3_4-300x118.png 300w, https://www.blk8.de/wp-content/uploads/2025/02/20220313_HiDrive_S3_4-768x303.png 768w, https://www.blk8.de/wp-content/uploads/2025/02/20220313_HiDrive_S3_4-1536x605.png 1536w, https://www.blk8.de/wp-content/uploads/2025/02/20220313_HiDrive_S3_4-676x266.png 676w, https://www.blk8.de/wp-content/uploads/2025/02/20220313_HiDrive_S3_4.png 1706w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>If you want to make your bucket privat again, just delete the policy:</p>



<pre class="wp-block-code"><code>% strato s3api delete-bucket-policy --bucket demobucket</code></pre>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="580" src="https://www.blk8.de/wp-content/uploads/2025/02/20220313_HiDrive_S3_5-1024x580.png" alt="" class="wp-image-230" srcset="https://www.blk8.de/wp-content/uploads/2025/02/20220313_HiDrive_S3_5-1024x580.png 1024w, https://www.blk8.de/wp-content/uploads/2025/02/20220313_HiDrive_S3_5-300x170.png 300w, https://www.blk8.de/wp-content/uploads/2025/02/20220313_HiDrive_S3_5-768x435.png 768w, https://www.blk8.de/wp-content/uploads/2025/02/20220313_HiDrive_S3_5-1536x869.png 1536w, https://www.blk8.de/wp-content/uploads/2025/02/20220313_HiDrive_S3_5-676x383.png 676w, https://www.blk8.de/wp-content/uploads/2025/02/20220313_HiDrive_S3_5.png 1682w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">Accessing files in private bucket</figcaption></figure>
]]></content:encoded>
					
					<wfw:commentRss>https://www.blk8.de/create-public-buckets-in-strato-hidrive-s3/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Use Strato HiDrive S3 with AWS CLI</title>
		<link>https://www.blk8.de/use-strato-hidrive-s3-with-aws-cli/</link>
					<comments>https://www.blk8.de/use-strato-hidrive-s3-with-aws-cli/#comments</comments>
		
		<dc:creator><![CDATA[Ben]]></dc:creator>
		<pubDate>Sun, 13 Mar 2022 20:26:15 +0000</pubDate>
				<category><![CDATA[IT]]></category>
		<guid isPermaLink="false">https://blk8.de/?p=78</guid>

					<description><![CDATA[There may be different reasons why you want to use Strato HiDrive S3. There is a developer API for the REST interface, but you can also use the AWS CLI. In my opinion, using the CLI is much easier, so here are some hints to doing so. Step 1: Download the AWS CLI using the [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>There may be different reasons why you want to use <a href="https://www.strato.de/cloud-speicher/hidrive-s3/" target="_blank" rel="noreferrer noopener">Strato HiDrive S3</a>. There is a <a href="https://developer.hidrive.com/hidrive-s3-api-reference/" target="_blank" rel="noreferrer noopener">developer API</a> for the REST interface, but you can also use the <a href="https://aws.amazon.com/de/cli/" target="_blank" rel="noreferrer noopener">AWS CLI</a>. In my opinion, using the CLI is much easier, so here are some hints to doing so.</p>



<p><strong>Step 1</strong>: Download the AWS CLI using the link above for your system. Please follow the installation instructions and test the installation:</p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-bash" data-lang="Bash"><code>$ aws --version
aws-cli/2.4.25 Python/3.8.8 Linux/5.4.0 exe/x86_64.ubuntu.20 prompt/off</code></pre></div>



<p><strong>Step 2</strong>: Create a bucket using the <a rel="noreferrer noopener" href="https://s3.hidrive.strato.com/mgmt/login" target="_blank">HiDrive S3 console</a>:</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="378" src="https://www.blk8.de/wp-content/uploads/2025/02/20220313_HiDrive_S3_2-1024x378.png" alt="" class="wp-image-224" srcset="https://www.blk8.de/wp-content/uploads/2025/02/20220313_HiDrive_S3_2-1024x378.png 1024w, https://www.blk8.de/wp-content/uploads/2025/02/20220313_HiDrive_S3_2-300x111.png 300w, https://www.blk8.de/wp-content/uploads/2025/02/20220313_HiDrive_S3_2-768x284.png 768w, https://www.blk8.de/wp-content/uploads/2025/02/20220313_HiDrive_S3_2-1536x567.png 1536w, https://www.blk8.de/wp-content/uploads/2025/02/20220313_HiDrive_S3_2-676x250.png 676w, https://www.blk8.de/wp-content/uploads/2025/02/20220313_HiDrive_S3_2.png 1906w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p><strong>Step 3</strong>: Create an access key using the console: <br>Crucial: Write down/store the displayed access key somewhere. If you forget it, you need to create a new one (which is no problem).</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="620" src="https://www.blk8.de/wp-content/uploads/2025/02/20220313_HiDrive_S3_3-1024x620.png" alt="" class="wp-image-225" srcset="https://www.blk8.de/wp-content/uploads/2025/02/20220313_HiDrive_S3_3-1024x620.png 1024w, https://www.blk8.de/wp-content/uploads/2025/02/20220313_HiDrive_S3_3-300x182.png 300w, https://www.blk8.de/wp-content/uploads/2025/02/20220313_HiDrive_S3_3-768x465.png 768w, https://www.blk8.de/wp-content/uploads/2025/02/20220313_HiDrive_S3_3-1536x930.png 1536w, https://www.blk8.de/wp-content/uploads/2025/02/20220313_HiDrive_S3_3-676x409.png 676w, https://www.blk8.de/wp-content/uploads/2025/02/20220313_HiDrive_S3_3.png 1906w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p><strong>Step 4</strong>: Configure the AWI CLI using the newly created access key:<br>Note: don&#8217;t change the default region to another value than <em>eu-central-1</em>!</p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-bash" data-lang="Bash"><code>$ aws configure
AWS Access Key ID [None]: &lt;value&gt;
AWS Secret Access Key [None]: &lt;value&gt;
Default region name [None]: eu-central-1
Default output format [None]: </code></pre></div>



<p><strong>Step 5</strong>: Make your life a little easier and set an alias as following (so you don&#8217;t need to enter the full command each time):</p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-plain"><code>$ alias strato=&quot;aws --endpoint-url https://s3.hidrive.strato.com&quot;</code></pre></div>



<p><strong>Step 6</strong>: Now you&#8217;re ready to use the AWS CLI with your Strato HiDrive S3:</p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-bash" data-lang="Bash"><code>$ strato s3api list-buckets
{
    &quot;Buckets&quot;: [
        {
            &quot;Name&quot;: &quot;demobucket&quot;,
            &quot;CreationDate&quot;: &quot;2022-03-13T19:59:54.616000+00:00&quot;
        }
    ],
    &quot;Owner&quot;: {
        &quot;ID&quot;: &quot;xyz&quot;
    }
}

$ strato s3 cp file.txt s3://demobucket
upload: ./file.txt to s3://demobucket/file.txt    

$ strato s3 ls s3://demobucket
2022-03-13 21:19:37          5 file.txt

$ strato s3 cp s3://demobucket/file.txt .
download: s3://demobucket/file.txt to ./file.txt   

$ strato s3 rm s3://demobucket/file.txt 
delete: s3://demobucket/file.txt</code></pre></div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.blk8.de/use-strato-hidrive-s3-with-aws-cli/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
	</channel>
</rss>
