<?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 Rohit Vyas on Medium]]></title>
        <description><![CDATA[Stories by Rohit Vyas on Medium]]></description>
        <link>https://medium.com/@mytrytest?source=rss-58c0ec7c3d62------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*FPow9Zs1PChbZjQfygwijA.jpeg</url>
            <title>Stories by Rohit Vyas on Medium</title>
            <link>https://medium.com/@mytrytest?source=rss-58c0ec7c3d62------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 03:07:32 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mytrytest/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[How to integrate Vue.js into Laravel]]></title>
            <link>https://medium.com/@mytrytest/how-to-integrate-vue-js-into-laravel-823a8670d757?source=rss-58c0ec7c3d62------2</link>
            <guid isPermaLink="false">https://medium.com/p/823a8670d757</guid>
            <category><![CDATA[laravel-vue]]></category>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[vuejs]]></category>
            <category><![CDATA[laravel-framework]]></category>
            <category><![CDATA[vitejs]]></category>
            <dc:creator><![CDATA[Rohit Vyas]]></dc:creator>
            <pubDate>Mon, 05 May 2025 08:34:09 GMT</pubDate>
            <atom:updated>2025-05-06T11:56:38.569Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to integrate Vue.js into Laravel</h3><p><strong>Step 1: Set up Laravel</strong></p><p>First of all, create a Laravel application by following the command.</p><pre>composer create-project laravel/laravel:^10.* laravelApp</pre><p>Run the following command and open <a href="http://localhost:8000/"><em>http://localhost:8000</em></a>. It will show the default Laravel welcome page.</p><pre>php artisan serve  </pre><p><strong>Step 2: Install Vue.js</strong></p><p>From Laravel 9.x, it comes with Vite by default. Run the following command to install Vue.js</p><pre>npm install vue @vitejs/plugin-vue vue-router</pre><p>You can compile Vue by following the command.</p><pre>npm run dev</pre><p><strong>Step 3: Vue Configuration</strong></p><p>We should add Vite’s plugin to the plugin array inside <em>vite.config.js</em> file. So open the file and put the code as below:</p><pre>import { defineConfig } from &#39;vite&#39;;<br>import laravel from &#39;laravel-vite-plugin&#39;;<br>import vue from &quot;@vitejs/plugin-vue&quot;;<br><br>export default defineConfig({<br>    plugins: [<br>        laravel({<br>            input: [&#39;resources/css/app.css&#39;, &#39;resources/js/app.js&#39;],<br>            refresh: true,<br>        }),<br>        vue(),<br>    ],<br>    resolve: {<br>        alias: {<br>            vue: &quot;vue/dist/vue.esm-bundler.js&quot;,<br>        },<br>    },<br>});</pre><p><strong>Step 4: Setup Vue with a new component</strong></p><p>Create a <em>resources/js</em> directory (if it does not exist) and create <em>app.js</em> file (if it’s not available). Add the following code into app.js</p><pre>import &#39;./bootstrap&#39;;<br>import { createApp } from &#39;vue&#39;;<br><br><br>const app = createApp({});<br><br>import WelcomevueComponent from &#39;./components/WelcomevueComponent.vue&#39;;<br>app.component(&#39;welcomevue-component&#39;, WelcomevueComponent);<br><br><br><br>app.mount(&#39;#app&#39;);  </pre><p>I used one component here. So create the component. Create <em>WelcomevueComponent.vue</em> in the <em>resources/js/components</em> directory.</p><pre>&lt;template&gt;<br>    &lt;div class=&quot;container&quot;&gt;<br>        &lt;div class=&quot;row justify-content-center&quot;&gt;<br>            &lt;div class=&quot;col-md-8&quot;&gt;<br>                &lt;div class=&quot;card&quot;&gt;<br>                    &lt;div class=&quot;card-header&quot;&gt;Welcome Vue Component&lt;/div&gt;<br><br>                    &lt;div class=&quot;card-body&quot;&gt;<br>                        I&#39;m an example component.<br>                    &lt;/div&gt;<br>                &lt;/div&gt;<br>            &lt;/div&gt;<br>        &lt;/div&gt;<br>    &lt;/div&gt;<br>&lt;/template&gt;<br><br>&lt;script&gt;<br>    export default {<br>        mounted() {<br>            console.log(&#39;Component mounted.&#39;)<br>        }<br>    }<br>&lt;/script&gt;</pre><p>Create <em>resources/views/welcomevue.blade.php</em> to include the Vue component:</p><pre>&lt;!DOCTYPE html&gt;<br>&lt;html lang=&quot;{{ str_replace(&#39;_&#39;, &#39;-&#39;, app()-&gt;getLocale()) }}&quot;&gt;<br>    &lt;head&gt;<br>        &lt;meta charset=&quot;utf-8&quot;&gt;<br>        &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1&quot;&gt;<br>        @vite([&#39;resources/js/app.js&#39;])<br>        &lt;title&gt;Welcome Vue&lt;/title&gt;<br>    &lt;/head&gt;<br>    &lt;body&gt;<br>       <br>        &lt;div id=&quot;app&quot;&gt;<br>          &lt;!-- Magic happens here! --&gt;<br>          &lt;welcomevue-component&gt;&lt;/welcomevue-component&gt;<br>        &lt;/div&gt;<br>       <br>        <br>    &lt;/body&gt;<br>&lt;/html&gt;</pre><p><strong>Step 5: Access the Vue component from the Laravel Controller.</strong></p><p>Create one controller by following the command.</p><pre>php artisan make:controller WelcomevueController</pre><p>In the controller, add index method in <em>WelcomevueController</em> class as below:</p><pre> public function index ()<br>    {<br>      return view(&#39;welcomevue&#39;);<br> <br>    }</pre><p>In <em>web.php</em> add router of WelcomevueController.<br>At the top put the the line</p><pre>use App\Http\Controllers\WelcomevueController;</pre><p>For routing, add the below line.</p><pre>Route::get(&#39;/welcomevue&#39;, [WelcomevueController::class, &#39;index&#39;])-&gt;name(&#39;welcomevue&#39;);</pre><p>Step 6: Run the project</p><p>Compile Vue.js by following the command.</p><pre>npm run dev </pre><p>Access your welcome vue by following the URL.</p><p><a href="http://localhost:8000/welcomevue">http://localhost:8000/welcomevue</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=823a8670d757" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setting Up Laravel application using docker in xampp server]]></title>
            <link>https://medium.com/@mytrytest/setting-up-laravel-application-using-docker-in-xampp-server-1fefb21229cb?source=rss-58c0ec7c3d62------2</link>
            <guid isPermaLink="false">https://medium.com/p/1fefb21229cb</guid>
            <category><![CDATA[laravel-setup]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[laravel-application]]></category>
            <category><![CDATA[laravel-framework]]></category>
            <category><![CDATA[laravel]]></category>
            <dc:creator><![CDATA[Rohit Vyas]]></dc:creator>
            <pubDate>Wed, 23 Apr 2025 09:21:33 GMT</pubDate>
            <atom:updated>2025-04-30T08:24:40.153Z</atom:updated>
            <content:encoded><![CDATA[<p>Create laravel application by following command.</p><pre>composer create-project laravel/laravel:^10.* laravelApp</pre><p>After creating laravel application, go to laravel application.</p><pre>cd laravelApp</pre><p>We will use docker here. For docker implemention, we will use following two files.</p><p><strong>docker-compose.yml </strong><br>The docker-compose.yml file orchestrates multiple containers and services.<br>Command to use for docker is: docker-compose up -d</p><p>Let’s create docker file for laravel project at rool level.</p><pre>version: &#39;3.8&#39;<br><br>services:<br>  app:<br>    build:<br>      context: .<br>      dockerfile: Dockerfile<br>      args:<br>        USERNAME: &quot;laravel&quot;<br>        UID: 1000<br>    env_file:<br>      - .env.docker<br>    container_name: laravelApp<br>    restart: unless-stopped<br>    working_dir: /var/www<br>    volumes:<br>      - .:/var/www<br>    ports:<br>      - &quot;8000:8000&quot;<br>    environment:<br>      - DB_HOST=host.docker.internal  # Connect to MySQL running outside Docker<br>      - DB_PORT=3306<br>      - DB_DATABASE=laravelapp<br>      - DB_USERNAME=root<br>      - DB_PASSWORD=<br>    command: php artisan serve --host=0.0.0.0 --port=8000</pre><p>We can create MySQL service by docker container but here we use MySQL separately (installed on your host machine or a different server).</p><p><strong>Dockerfile</strong></p><p>The Dockerfile defines a custom image for a container.</p><p>Command to use: docker build -t laravelApp .</p><p>With help of Dockerfile, you can define custom PHP environment</p><pre># Use the official PHP image<br>FROM php:8.2-fpm<br><br># Set build-time arguments<br>ARG USERNAME=laravel<br>ARG UID=1000<br><br># Create a user with the specified UID<br>RUN useradd -G www-data,root -u ${UID} -d /home/${USERNAME} -m ${USERNAME} || true<br><br># Set working directory<br>WORKDIR /var/www<br><br># Install system dependencies<br>RUN apt-get update &amp;&amp; apt-get install -y zip unzip git<br>RUN docker-php-ext-install pdo pdo_mysql mysqli<br><br><br># Copy application files<br>COPY . .<br><br># Set permissions<br>RUN chown -R ${USERNAME}:www-data /var/www<br>#RUN chown -R ${USERNAME}:www-data:www-data /var/www/html/storage<br>#RUN chmod -R 775 /var/www/html/storage<br><br>CMD [&quot;php-fpm&quot;]</pre><p>We have customized Dockerfile by adding two variables.<br>one is username which will create a new system user and which is necessary to execute artisan and composer commands while developing the application.</p><p>Another is the uid setting ensures that the user inside the container has the same uid as your system user on your host machine, where you’re running Docker.</p><p>The arguments user and uid are injected into the Dockerfile to customize user creation commands at build time.</p><p>Go to root folder and modify .env file to use your external MySQL server instead of Docker’s MySQL</p><pre>DB_CONNECTION=mysql<br>DB_HOST=127.0.0.1   # Or your external MySQL server IP<br>DB_PORT=3306<br>DB_DATABASE=laravelapp<br>DB_USERNAME=root<br>DB_PASSWORD=root</pre><p>Let’s create .env.docker at your root level.</p><pre>APP_ENV=docker<br>DB_CONNECTION=mysql<br>DB_HOST=host.docker.internal<br>DB_PORT=3306<br>DB_DATABASE=laravel_app<br>DB_USERNAME=root<br>DB_PASSWORD=root</pre><p>Here Laravel runs inside Docker and MySQL runs outside Docker (on your host machine or another server). So I created 2 .env files.<br>Whenever you will run php artisan migrate command, it will run on host(your windows machine) so it will not able to connect to host.docker.internal. For this command, system will use DB_HOST as 127.0.0.1 and docker container will use DB_HOST as host.docker.internal</p><p>I use MySQL server on xampp. If required, please give permission to your MySQL server so Laravel application can access it. Edit your my.ini file and put bind-address = 0.0.0.0</p><pre>[mysqld]<br>bind-address = 0.0.0.0</pre><p>Start Laravel container by command: docker-compose up -d<br>and access Laravel at <a href="http://localhost:8000/">http://localhost:8000</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1fefb21229cb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS — Fetch data from AWS Athena using API Gateway and Lambda]]></title>
            <link>https://medium.com/@mytrytest/aws-fetch-data-from-aws-athena-using-api-gateway-and-lambda-fb91fd3f8586?source=rss-58c0ec7c3d62------2</link>
            <guid isPermaLink="false">https://medium.com/p/fb91fd3f8586</guid>
            <category><![CDATA[s3-bucket]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[aws-athena]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[api-gateway]]></category>
            <dc:creator><![CDATA[Rohit Vyas]]></dc:creator>
            <pubDate>Wed, 05 Jul 2023 08:42:48 GMT</pubDate>
            <atom:updated>2023-07-05T08:45:27.196Z</atom:updated>
            <content:encoded><![CDATA[<h3>AWS — Fetch data from AWS Athena using API Gateway and Lambda</h3><p>Here we will discuss how to fetch data from AWS Athena by using API Gateway and Lambda method.</p><p>First the user invokes API end point, it will call respective Lambda method. Lambda method will communicate with Athena table and return result.</p><p><strong>AWS API Gateway<br></strong>Amazon API Gateway is a fully managed service that makes it easy for developers to create, publish, maintain, monitor, and secure APIs at any scale.</p><p><strong>AWS Lambda</strong><br>AWS Lambda is a compute service that lets you run code without provisioning or managing servers.</p><p><strong>AWS Athena </strong><br>Amazon Athena is an interactive query service that makes it easy to analyze data directly in Amazon S3 using standard SQL.</p><p>I hope you have an AWS account and basic knowledge of AWS Cloud.</p><p>Create one s3 bucket and put sample CSV file to there.</p><p>Now let’s move on Athena and select ‘Create table’ option from left hand side.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_K-fUHa7aeCqU_wOwme4Mg.png" /></figure><p>So right hand side, you can see below query in editor.</p><pre>CREATE EXTERNAL TABLE IF NOT EXISTS new_table_name(<br>  column_name1 column_type1, column_name2 column_type2)<br>LOCATION &#39;s3://table-data-location/&#39;  </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DXNFbBEuOgvsm4NY9qwLmQ.png" /></figure><p>Write down your table name, column name and type as per your CSV file data and then put s3 bucket location where you have uploaded CSV file. Don’t give file URL, give location of file.</p><p>Click on Run button to execute query and it will create table in default database. You can create your own database as well.</p><p>Athena needs one s3 bucket path to store query result so create one s3 bucket and set path before execute any query.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ts1ma9c8aroZzebvXdZ5xg.png" /></figure><p>Now let’s create Lambda function with NodeJS code. To execute this lambda method, you have to create proper IAM role which will give access to run query on Athena.</p><pre>{<br>    &quot;Version&quot;: &quot;2012-10-17&quot;,<br>    &quot;Statement&quot;: [<br>        {<br>            &quot;Sid&quot;: &quot;VisualEditor0&quot;,<br>            &quot;Effect&quot;: &quot;Allow&quot;,<br>            &quot;Action&quot;: [<br>                &quot;athena:GetWorkGroup&quot;,<br>                &quot;s3:PutObject&quot;,<br>                &quot;s3:GetObject&quot;,<br>                &quot;athena:StartQueryExecution&quot;,<br>                &quot;s3:AbortMultipartUpload&quot;,<br>                &quot;lambda:InvokeFunction&quot;,<br>                &quot;athena:StopQueryExecution&quot;,<br>                &quot;athena:GetQueryExecution&quot;,<br>                &quot;athena:GetQueryResults&quot;,<br>                &quot;s3:ListMultipartUploadParts&quot;<br>            ],<br>            &quot;Resource&quot;: [<br>                &quot;arn:aws:athena:*:your-account-id:workgroup/workgroup-name&quot;,<br>                &quot;arn:aws:s3:::QueryResultsBucket/*&quot;,<br>                &quot;arn:aws:lambda:*:your-account-id:function:LambdaFunctionName&quot;<br>            ]<br>        },<br>  {<br>            &quot;Sid&quot;: &quot;VisualEditor1&quot;,<br>            &quot;Effect&quot;: &quot;Allow&quot;,<br>            &quot;Action&quot;: &quot;athena:ListWorkGroups&quot;,<br>            &quot;Resource&quot;: &quot;*&quot;<br>        },<br>        {<br>            &quot;Sid&quot;: &quot;VisualEditor2&quot;,<br>            &quot;Effect&quot;: &quot;Allow&quot;,<br>            &quot;Action&quot;: &quot;glue:GetTable&quot;,<br>            &quot;Resource&quot;: [<br>                &quot;arn:aws:glue:your-region:your-account-id:catalog&quot;,<br>                &quot;arn:aws:glue:your-region:your-account-id:database/your-database-name&quot;,<br>                &quot;arn:aws:glue:your-region:your-account-id:table/your-database-name/*&quot;<br>            ]<br>        },<br>        {<br>            &quot;Sid&quot;: &quot;VisualEditor3&quot;,<br>            &quot;Effect&quot;: &quot;Allow&quot;,<br>            &quot;Action&quot;: [<br>                &quot;s3:GetBucketLocation&quot;,<br>                &quot;s3:ListBucket&quot;<br>            ],<br>            &quot;Resource&quot;: &quot;arn:aws:s3:::QueryResultsBucket&quot;<br>        },<br>        {<br>            &quot;Sid&quot;: &quot;VisualEditor4&quot;,<br>            &quot;Effect&quot;: &quot;Allow&quot;,<br>            &quot;Action&quot;: [<br>                &quot;s3:GetObject&quot;,<br>                &quot;s3:ListBucket&quot;<br>            ],<br>            &quot;Resource&quot;: [<br>                &quot;arn:aws:s3:::DataStoredBucket&quot;,<br>                &quot;arn:aws:s3:::DataStoredBucket/*&quot;<br>            ]<br>        }<br>    ]<br>}</pre><p>Copy paste below code to your lambda function and test it.</p><pre>const AWS = require(&#39;aws-sdk&#39;);<br><br>exports.handler = async (event, context) =&gt; {<br>  // AWS SDK configuration<br>  AWS.config.update({ region: process.env.REGION });<br><br>  // Create a new Athena service object<br>  const athena = new AWS.Athena();<br><br>  // Set up the parameters for the Athena API call<br>  const params = {<br>    QueryString: &#39;SELECT * FROM &#39;+process.env.ATHENA_TABLE_NAME+&#39; limit 5&#39;,<br>    ResultConfiguration: {<br>      OutputLocation: process.env.OUTPUT_S3_BUCKET_PATH<br>    },<br>    QueryExecutionContext: {<br>      Database: process.env.ATHENA_DB_NAME<br>    }<br>  };<br><br>  try {<br>    // Start the Athena query execution<br>    const queryExecution = await athena.startQueryExecution(params).promise();<br>    const queryExecutionId = queryExecution.QueryExecutionId;<br><br>    // Check the status of the query execution<br>    let queryExecutionStatus = &#39;&#39;;<br>    while (queryExecutionStatus !== &#39;SUCCEEDED&#39;) {<br>      const queryStatus = await athena.getQueryExecution({ QueryExecutionId: queryExecutionId }).promise();<br>      queryExecutionStatus = queryStatus.QueryExecution.Status.State;<br>      if (queryExecutionStatus === &#39;FAILED&#39; || queryExecutionStatus === &#39;CANCELLED&#39;) {<br>        throw new Error(`Query execution failed or was cancelled. Status: ${queryExecutionStatus}`);<br>      }<br>      await new Promise(resolve =&gt; setTimeout(resolve, 1000)); // Wait for 1 second before checking again<br>    }<br><br>    // Get the results of the query execution<br>    const queryResults = await athena.getQueryResults({ QueryExecutionId: queryExecutionId }).promise();<br><br>    // Process and return the results<br>    const results = parseAthenaResults(queryResults);<br>    return results;<br>  } catch (error) {<br>    console.error(&#39;Error:&#39;, error);<br>    throw error;<br>  }<br>};<br><br>function parseAthenaResults(queryResults) {<br>  const rows = queryResults.ResultSet.Rows;<br>  const columns = rows[0].Data.map(data =&gt; data.VarCharValue);<br>  const results = [];<br>  for (let i = 1; i &lt; rows.length; i++) {<br>    const row = rows[i].Data;<br>    const result = {};<br>    for (let j = 0; j &lt; columns.length; j++) {<br>      result[columns[j]] = row[j].VarCharValue;<br>    }<br>    results.push(result);<br>  }<br>  return results;<br>}</pre><p>GitHub link: <a href="https://github.com/mytrytest/AWS-get_athena_data_by_lambda_method">AWS — Lambda method to get data from the Athena table</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fb91fd3f8586" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to allow an IAM user to access Billing Dashboard in AWS?]]></title>
            <link>https://medium.com/@mytrytest/how-to-allow-an-iam-user-to-access-billing-dashboard-in-aws-f3b5490b7def?source=rss-58c0ec7c3d62------2</link>
            <guid isPermaLink="false">https://medium.com/p/f3b5490b7def</guid>
            <category><![CDATA[aws-cloud]]></category>
            <category><![CDATA[aws-iam-user]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-billing]]></category>
            <dc:creator><![CDATA[Rohit Vyas]]></dc:creator>
            <pubDate>Mon, 26 Jun 2023 14:21:57 GMT</pubDate>
            <atom:updated>2023-06-26T14:21:57.794Z</atom:updated>
            <content:encoded><![CDATA[<p>By default, only AWS root user can access billing information and root user can enable IAM users to access to billing information.</p><p>Here I will explain how to create a policy to display billing information for IAM users.</p><p>If IAM user will open billing dashboard, he or she will get error as “You need permissions”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*USLGdhOyCbRQiEG_HOueyg.png" /></figure><p>So let me explain how to allow IAM user to access billing information.</p><ul><li>First of all, login to AWS console by root account.</li><li>Go to account setting from top right menu.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8CYWwtgCE2M6z1yXZMHtZQ.png" /></figure><ul><li>On account settings page, scroll down and you will get “IAM User and Role Access to Billing Information” with “edit” link button.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s3AFoegv2T10qlkK6KwfBg.png" /></figure><ul><li>Click on edit link then you will get “Activate IAM Access” checkbox.</li><li>Mark this “Activate IAM Access” checkbox and click on below update button.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zAsKxgGA9QjFu0S3SneLDQ.png" /></figure><p>If your created IAM user has AdministratorAccess, IAM user can access billing dashboard.</p><p>You can also give billing access by creating &amp; assigning inline billing policy.</p><ul><li>For this, go to IAM Service and select user from left hand side users menu.</li><li>From permissions , click on “Add inline policy”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*89hVutcPykPSn4W8twNuQA.png" /></figure><ul><li>You will get create policy screen with two options a) Visual Editor and b) JSON.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e1AEjpxTnxtVnxrOtEOLeg.png" /></figure><ul><li>Continue with Visual Editor and click on “Choose a service”</li><li>Select billing service so you will get actions in next screen.</li><li>You can select all billing actions checkbox or select required action from list.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uIe5MRVpFdqLsxh_X1NHCg.png" /></figure><ul><li>If you want to give only read only access then select GetBillingData, GetBillingPreferences and GetBillingDetails.</li><li>Click on review policy button</li><li>In next screen, give policy name as for example “BillingAccess_ReadOnly” and click on create policy button.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8QX7FPVrHOVsESvejcPEoA.png" /></figure><ul><li>You can see created policy is attached to selected IAM user.</li></ul><p>Now IAM user can see billing information after login. You can also refer below Youtube video.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F4i_0jq3lPl8%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D4i_0jq3lPl8&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F4i_0jq3lPl8%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/c985f6f67f901d5fb1c5b7d4c7219d13/href">https://medium.com/media/c985f6f67f901d5fb1c5b7d4c7219d13/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f3b5490b7def" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Automate Vue Js deployment to AWS S3 bucket with CodeBuild]]></title>
            <link>https://medium.com/@mytrytest/automate-vue-js-deployment-to-aws-s3-bucket-with-codebuild-c0ad81bfeffb?source=rss-58c0ec7c3d62------2</link>
            <guid isPermaLink="false">https://medium.com/p/c0ad81bfeffb</guid>
            <category><![CDATA[vuejs-deployment]]></category>
            <category><![CDATA[aws-codepipeline]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[deployment-automation]]></category>
            <dc:creator><![CDATA[Rohit Vyas]]></dc:creator>
            <pubDate>Sat, 12 Mar 2022 06:38:41 GMT</pubDate>
            <atom:updated>2023-07-05T11:16:36.640Z</atom:updated>
            <content:encoded><![CDATA[<p>Automate Vue Js deployment to AWS S3 bucket with CodeBuild</p><p>AWS Code Pipeline Deploying VueJS app to AWS S3 Bucket</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*lfYtU3NOxfIxn44W6Rsx8w.png" /></figure><p>Watch this video and learn how to automate Vue JS deployment to the AWS S3 bucket with AWS code build.</p><p>In vueJS or react or angular, after completing the development we deploy our application and then upload it to the S3 bucket.</p><p>Here I will explain whenever we push our code to the master branch of the repository, AWS understands that our application is ready for production and deploy to the s3 bucket.</p><p>The video features the following steps:</p><ol><li>VueJS application and repo</li><li>Create AWS bucket</li><li>Configure bucket for static hosting</li><li>Buildspec file</li><li>Create and configure code pipeline</li></ol><p>You can check the automatic deployment by pushing new commits to repo and wait for source and build phases to complete.</p><p>Scripts to copy and paste: <a href="https://github.com/mytrytest/vuejsdeploymenthelp/blob/main/help.txt">https://github.com/mytrytest/vuejsdeploymenthelp/blob/main/help.txt</a></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fj6I-VlyBfbo%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dj6I-VlyBfbo&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fj6I-VlyBfbo%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/aff1f1ba9aaae0626435a04230993480/href">https://medium.com/media/aff1f1ba9aaae0626435a04230993480/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c0ad81bfeffb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Coding Standards and Best Practices to Follow]]></title>
            <link>https://medium.com/@mytrytest/coding-standards-and-best-practices-to-follow-6942a8dba949?source=rss-58c0ec7c3d62------2</link>
            <guid isPermaLink="false">https://medium.com/p/6942a8dba949</guid>
            <category><![CDATA[best-practices]]></category>
            <category><![CDATA[coding-standards]]></category>
            <category><![CDATA[best-coding-standards]]></category>
            <dc:creator><![CDATA[Rohit Vyas]]></dc:creator>
            <pubDate>Wed, 05 Jan 2022 06:50:25 GMT</pubDate>
            <atom:updated>2022-01-05T06:50:25.077Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Coding Standards and Best Practices to Follow</strong></p><p>What is coding standards? It’s very well known questions for all developers. <br>Answer is very simple. You should follow standard style of coding which improves readability and it reduces complexity.</p><p><strong>Why we should follow coding standards?</strong></p><p>It will help to find out errors easily.<br>It will increase efficiency of you and other developers who is working with you or will work with you.<br>It will be easy to modify or extend functionality.<br>You can also define or create your coding standards as per you knowledge and experience.</p><p>1) Whenever you create any component or module or plugin then you should provide proper information in following format.<br> a. Name of Module<br> b. Short description in which you can write purpose or functionality of your module.<br> c. Date of creation and date of modification<br> d. Mention global variables if you are using in this module.<br> e. Version and Author information<br> e.g.<br> /**<br> *Name: Custom Module Name<br> *Description: its custom module for XXXXXXX which calculate rate based of external API.<br> *Creation Date: 5th January, 2022<br> *Version: 1.0<br> *Author: Rohit Vyas<br> */<br> <br> 2) Whenever you create any function, you should follow below points.<br> a) Function name should be proper and it must describe the reason of using the function properly.<br> b) Function name should be written in camel case starting with small letter.<br> c) It should not be lengthy. You can divide lengthy function into small one by creating multiple small functions.<br> d) Put your return statement always in new line.<br> e) Before stating function, put small comment regarding your function.<br> i. Purpose of function in short description.<br> ii. Created date with developer name<br> iii. Input parameter with short description<br> /**<br> * Check member has paid membership page or not<br> * Created 5th Jan, 2022 (Rohit Vyas)<br> * <a href="http://twitter.com/param">@param</a> int $userId <br> * <a href="http://twitter.com/return">@return</a> bool $isMember<br> */<br> 3) Your code should be well commented which will increase understanding of the code and help to you for debugging.<br> <br> 4) Naming conventions for local variable, global variable and constants<br> a. Variable name should be meaningful which will help to understand the reason of using it.<br> b. For local variable use camel case letter start with small letter. (e.g. userData)<br> c. For global variable, start name with capital letter (e.g. ClientId)<br> d. For constant variable, use capital letter. (e.g. SEVERKEY). You can use underscore or hyphen in constant name but it should be same everywhere. (e.g. SERVER_KEY) <br> <br> 5) Indentation <br> a. It’s very important to increase readability of your code. You should use wide space properly.<br> b. Give a space after comma between two arguments.<br> c. Nested block should be properly indented<br> d. Keep habits to put end bracket in new line.<br> foreach ($variable as $var) {<br> if ($var === NULL) {<br> // your statment<br> if (condition) {<br> // your statement<br> }<br> } else {<br> //your statement<br> }<br> }<br> <br> 6) Conditional and Loop Statements<br> a. Before start condition or loop statements, put proper comments regarding your logic and purpose.<br> b. Always use brackets for conditional or loop statements.<br> c. In case of more if statement in your logic then use switch.<br> <br> 7) Difference between == (Equal Operator) and === (Identical Operator)<br> a. == It compare only value of variables, not data types. It will return true if values are same.<br> b. === It return true if both variable contain same value and same data type.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6942a8dba949" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setup Git on WP Engine]]></title>
            <link>https://blog.devgenius.io/setup-git-on-wp-engine-a77c376e71b5?source=rss-58c0ec7c3d62------2</link>
            <guid isPermaLink="false">https://medium.com/p/a77c376e71b5</guid>
            <category><![CDATA[git]]></category>
            <category><![CDATA[wpengine]]></category>
            <category><![CDATA[wordpress]]></category>
            <dc:creator><![CDATA[Rohit Vyas]]></dc:creator>
            <pubDate>Thu, 30 Dec 2021 12:29:50 GMT</pubDate>
            <atom:updated>2021-12-30T16:21:58.611Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Setup Git on WP Engine</strong></p><p>As we know Git is a very powerful tool by which developers push code from local machine to live server via WP Engine. So let’s see how we can connect our WP Engine server with Git and take push &amp; pull code to WP Engine from the local system.</p><p><strong>Generate SSH key from the terminal</strong></p><p>a. Enable Git on your WP Engine site by adding your SSH key to the User Portal. The SSH key has basically username and password and opt instead of a public and private key pair for authentication.</p><p>b. Follow below-mentioned steps to create your public/private key pair.</p><p>c. For MAC, Use the Spotlight utility and type “Terminal”</p><p>d. For Windows, use Git Bash</p><p>e. Use “ssh-keygen” to generate a new key as given below. Use your email address in this command.</p><p>i. ssh-keygen -t rsa -b 4096 -C “your_email@email.com” -f ~/.ssh/wpenginekeyname</p><p>f. Leave the passphrase blank by hitting the enter key, without typing anything.</p><p>g. If you want to set a password, you can for security purposes. It cannot be recovered if lost.</p><p>h. Press enter key or return again to confirm the password entry.</p><p>It will generate your public/private key pair.</p><p>i. Make sure generated file is available in your ~/.ssh/ folder and give a proper name. As for example wpenginekeyname.pub.</p><p><strong>Create SSH Config</strong></p><p>a. The SSH Config file decides your system which key file to use when connecting to a specific server hostname.</p><p>b. From your local system, navigate to .ssh directory</p><p>c. For MacOS, open terminal and type cd ~/.ssh/</p><p>d. For windows, use git bash and navigate to c/users/yourname/.ssh/</p><p>e. Run ‘touch config’ command to create config file</p><p>f. Run ‘nano config’ command to open config file.</p><p>g. After opening a file, use arrow keys to move at the very bottom of the file and add content as given below.</p><p>Host git.wpengine.com<br> User git<br> Hostname git.wpengine.com<br> PreferredAuthentications publickey<br> IdentityFile <strong>~/.ssh/</strong> wpenginekeyname<br> IdentitiesOnly yes</p><p>Now save this file and exit.</p><p><strong>Test SSH Config</strong></p><p>a. Run ‘ssh -v git@git.wpengine.com info’ command to verify your configuration. At bottom of the result, you can see your environment name with production and staging status. E.g.</p><p>R W production/environment</p><p>R W staging/environment</p><p>If the connection was unsuccessful, then please read the output carefully and fix the issues.</p><p><strong>ADD SSH key to the user portal</strong></p><p>a. Now we will add an SSH key to the user portal.</p><p>b. Go to the user portal and click the environment name to which you would like to connect git to.</p><p>c. Then click Git Push from left-hand side menu, create developer name and add SSH key (the content of your public key) and then click on Add Developer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/398/0*-tKpE9fobdbJapf6.png" /></figure><p><strong>If WordPress site is setup at your local system then you can move step 8 otherwise download from WP Engine.</strong></p><p>a. Go to the user portal.</p><p>b. Select the environment name you are connecting Git to.</p><p>c. Click on the backup point from the left menu and download the latest zip folder.</p><p>d. You will get a zip file path to the email address from which you can download a zip file.</p><p>e. Put a zip folder in your local system and unzip it.</p><p><strong>Add standard .gitignore file for your wordpress project.</strong></p><p><strong>Confirm git access by ‘ssh git@git.wpengine.com info’ command.</strong></p><p>a. If everything is properly set up then you will get a developer directory from WP Engine. For the first time, you will be promoted to verify host authentication.</p><p><strong>From the command line, go to your local WordPress directly path and run ‘git init’ command.</strong></p><p>a. To push your new and modified file, run ‘git add.’ command.</p><p>b. After adding files, run commit command as ‘git commit –m “first commit”</p><p><strong>Set up Remote</strong></p><p>a. You need to set remote by running the below command.</p><p>i. git remote add development git@git.wpengine.com:production/devdirectory.git. Replace devdirectory.git with the unique user portal name of your selected environment.</p><p>b. Put your dev or staging or development environment name.</p><p>c. For staging, use ‘staging ‘and production, use ‘production’ in place of development.</p><p>d. Run ‘git remote –v’ command to verify everything is properly set or not.</p><p>e. If you will not get any error then run ‘git push remote-name branch-name’ command to push code to the selected environment from your local branch. (e.g. git push development master )</p><p><strong>To take a pull, run ‘git pull remote-name branch-name’ command. (e.g. git pull development master)</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a77c376e71b5" width="1" height="1" alt=""><hr><p><a href="https://blog.devgenius.io/setup-git-on-wp-engine-a77c376e71b5">Setup Git on WP Engine</a> was originally published in <a href="https://blog.devgenius.io/">Dev Genius</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>