<?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 Nwosu Onyedikachi on Medium]]></title>
        <description><![CDATA[Stories by Nwosu Onyedikachi on Medium]]></description>
        <link>https://medium.com/@nwosuonyedikachi?source=rss-cd06f58539f5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*2Jayrx75PQm2xxE2.</url>
            <title>Stories by Nwosu Onyedikachi on Medium</title>
            <link>https://medium.com/@nwosuonyedikachi?source=rss-cd06f58539f5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 18:39:52 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nwosuonyedikachi/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[Deploying a React App to AWS ECS with GitHub Actions]]></title>
            <link>https://medium.com/@nwosuonyedikachi/deploying-a-react-app-to-aws-ecs-with-github-actions-5c74c1869800?source=rss-cd06f58539f5------2</link>
            <guid isPermaLink="false">https://medium.com/p/5c74c1869800</guid>
            <category><![CDATA[ecr]]></category>
            <category><![CDATA[aws-ecs]]></category>
            <category><![CDATA[github-actions]]></category>
            <category><![CDATA[containerization]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <dc:creator><![CDATA[Nwosu Onyedikachi]]></dc:creator>
            <pubDate>Fri, 09 Feb 2024 16:33:08 GMT</pubDate>
            <atom:updated>2024-02-09T16:38:33.521Z</atom:updated>
            <content:encoded><![CDATA[<p>Modern Software Development leverages a combination of Containerization concepts and Continuous Integration/Continuous Deployment (CI/CD) strategies.</p><p>While CI/CD guarantees efficient software development and fast delivery of products, containerization enables the software to function properly, independent of the Platform or Operating System.</p><p>In a previous article, I explained how to achieve CI/CD of a React App using Static Web Hosting strategies (without containerization), visit <a href="https://medium.com/@nwosuonyedikachi/deploy-a-react-app-in-aws-using-github-actions-d6a3d611c701">this link</a> to learn more.</p><p>However, in this write-up, I will demystify the containerization of React Apps and how to deploy them to Amazon Web Services (<strong>AWS</strong>) Elastic Container Service (<strong>ECS</strong>)in a CI/CD flow.</p><p><strong>Prerequisites:</strong></p><ul><li>Familiar with Docker, Create React App Installation</li></ul><p><strong>First, Build the React App</strong>.</p><p>For the app, we would use the default create react app template</p><pre>npx create-react-app myapp</pre><p><strong>Then, Add the Dockerfile below </strong>to the root folder of the React Project.</p><pre><br>FROM node:18-alpine as build<br><br>WORKDIR /app<br><br>COPY package*.json ./<br><br>RUN npm install<br><br>COPY src/ src/<br>COPY public/ public/<br><br>RUN npm run build<br><br><br>FROM nginx:alpine<br>COPY nginx.conf /etc/nginx/nginx.conf<br>COPY --from=build /app/build /usr/share/nginx/html<br>EXPOSE 80<br>CMD [&quot;nginx&quot;, &quot;-g&quot;, &quot;daemon off;&quot;]<br></pre><pre>worker_processes 1;<br><br>events {<br>  worker_connections 1024;<br>}<br><br>http {<br>  include mime.types;<br>  default_type application/octet-stream;<br><br>  sendfile on;<br>  keepalive_timeout 65;<br><br>  server {<br>    listen 80;<br><br>    location / {<br>      add_header &#39;Access-Control-Allow-Origin&#39; &#39;*&#39;;<br>      add_header &#39;Access-Control-Allow-Methods&#39; &#39;GET, POST, OPTIONS&#39;;<br>      add_header &#39;Access-Control-Allow-Headers&#39; &#39;DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range&#39;;<br><br>      root /usr/share/nginx/html;<br>      index index.html;<br>      try_files $uri $uri/ /index.html;<br>    }<br>  }<br>}<br></pre><p>Above is the nginx.conf file used for the Dockerfile</p><p><strong>Next, Switch to the Elastic Container Registry (ECR)</strong> and Create a Private Repository. Take note of the repository name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7UTuXhSgzv0UrlLM63dpoQ.png" /><figcaption>Figure 1: Create a Repository on Elastic Container Registry(ECR)</figcaption></figure><p><strong>Next, Switch to the Elastic Container Service(ECS) and Create a Cluster</strong></p><p>Enter the cluster name, leave the default options and click Create.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q6HxfOR341bwIxXl-ocxNA.png" /><figcaption>Figure 2: Create An ECR Cluster</figcaption></figure><p><strong>Next, Create an ECS task definition </strong>for the ECS Cluster as in Figures 3 and 4 below.</p><ul><li>Navigate to the Task Definition.</li><li>Click Create New Task Definition, and Enter the Task Definition Family Name.</li><li>In the Essential Container section, enter the image name and private repository URI in two steps before.</li><li>Specify the ports exposed on the container and click Create.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XlxL4c7QcLIGgKclfdPMmg.png" /><figcaption>Figure 3: Enter the Task Definition Family Name</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E76qTe1jGtF5g7LtBOC_sQ.png" /><figcaption>Figure 4: Define the Ports Exposed, the Container name and Image</figcaption></figure><p><strong>Next, Create an ECS service </strong>for the newly created ECS Cluster as shown in Figures 5 and 6 below.</p><ul><li>Navigate to the services section of the ECS Cluster detail page.</li><li>Click Create, enter your Service Name and select the Task you created in the previous step.</li><li>In the Networking section, you can keep the defaults or inspect them to ensure your preferred public subnets and service groups have been attached.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xkUif_B30xjX-nNP0-AKcQ.png" /><figcaption>Figure 5: Navigate to the Services Tab</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wrvr7p-YH2o_0oRUkxV8Xg.png" /><figcaption>Figure 6: Create the ECS Service</figcaption></figure><p><strong>Finally, </strong>return to your react project and,</p><ul><li>create a .github folder &amp; workflows subfolder</li><li><strong>Add the GitHub Actions Yml(deploy.yml)</strong> to the .github/workflows directory in the project.</li><li>Add the content below.</li></ul><pre>name: AWS Elastic Container Service Deploy<br>concurrency:<br>    group: ${{ github.workflow }}-${{ github.ref }}<br>    cancel-in-progress: true<br>on:<br>  push:<br>    branches:<br>      - main<br>env:<br>  AWS_REGION: eu-west-2<br>  # Note the ARNs are not needed here<br>  ECR_REPOSITORY: container-registry-repository-name-only<br>  ECS_SERVICE: ecs-build-service-name-only<br>  ECS_CLUSTER: ecs-build-cluster-name-only<br>  ECS_TASK_DEFINITION: ecs-task-definition-name-only<br>  CONTAINER_NAME: ecs-container-name-only <br>jobs:<br>  build-deploy-container-app:<br>    runs-on: ubuntu-latest<br>    steps:<br><br>      - uses: actions/checkout@v4<br><br>      - name: Configure AWS credentials<br>        uses: aws-actions/configure-aws-credentials@0e613a0980cbf65ed5b322eb7a1e075d28913a83<br>        with:<br>          aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}<br>          aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}<br>          aws-region: ${{ env.AWS_REGION }}<br><br>      - name: Login to Amazon ECR<br>        id: login-ecr<br>        uses: aws-actions/amazon-ecr-login@62f4f872db3836360b72999f4b87f1ff13310f3a<br><br>      - name: Build, tag, and push image to Amazon ECR<br>        id: build-image<br>        env:<br>          ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}<br>          IMAGE_TAG: ${{ github.sha }}<br>        run: |<br>          # Build a docker container and<br>          # push it to ECR so that it can<br>          # be deployed to ECS.<br>          docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .<br>          docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG<br>          echo &quot;image=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG&quot; &gt;&gt; $GITHUB_OUTPUT<br><br>      - name: Download task definition<br>        run: |<br>                aws ecs describe-task-definition --task-definition ${{ env.ECS_TASK_DEFINITION }} \<br>                --query taskDefinition &gt; task-definition.json<br>      <br>      - name: Fill in the new image ID in the Amazon ECS task definition<br>        id: task-def<br>        uses: aws-actions/amazon-ecs-render-task-definition@c804dfbdd57f713b6c079302a4c01db7017a36fc<br>        with:<br>          task-definition: task-definition.json<br>          container-name: ${{ env.CONTAINER_NAME }}<br>          image: ${{ steps.build-image.outputs.image }}<br><br>      - name: Deploy Amazon ECS task definition<br>        uses: aws-actions/amazon-ecs-deploy-task-definition@df9643053eda01f169e64a0e60233aacca83799a<br>        with:<br>          task-definition: ${{ steps.task-def.outputs.task-definition }}<br>          service: ${{ env.ECS_SERVICE }}<br>          cluster: ${{ env.ECS_CLUSTER }}<br>          wait-for-service-stability: true</pre><ul><li>Update the environment variables in the deploy.yml above with values obtained in previous steps.</li><li>Remember to set the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY in the GitHub Repository settings &gt; actions as shown below.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l1m-uxeggbWO84TstrJJTw.png" /></figure><ul><li>Commit your changes and push them to the GitHub Repo.</li><li>Wait for the GitHub Action Build Workflow to complete and then visit the IP Endpoint for the container running in ECS.</li><li>To find the IP Endpoint, Scroll to the bottom of the ECS Cluster detail page, switch to the Task tab, select the running Task and Find the Public IP in the Configuration Section.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iuQNMNoxTgo3LUDQ8k2N6A.png" /><figcaption>Figure 7: Finding the IP Endpoint</figcaption></figure><p>Visit the IP, you should see your react project running.</p><p><strong>***</strong></p><p>In my case, the React App did not load up with IP at first</p><p><strong>To fix this issue, all I did was enable the Traffic In-bound rule on the security group in the Networking Tab for the Container Task instance.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6KASdwWahccr3My8zS8ltg.png" /><figcaption>Figure 8: Allowing access to Port 80 on the Service Group attached to the Container</figcaption></figure><p><strong>***</strong></p><p>Thanks for your time. I hope you found this useful.</p><p>For support and inquiry, feel free to contact me <a href="https://onyedikachinwosu.com.ng/">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5c74c1869800" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploying a React App in AWS using GitHub Actions]]></title>
            <link>https://medium.com/@nwosuonyedikachi/deploy-a-react-app-in-aws-using-github-actions-d6a3d611c701?source=rss-cd06f58539f5------2</link>
            <guid isPermaLink="false">https://medium.com/p/d6a3d611c701</guid>
            <category><![CDATA[github-actions]]></category>
            <category><![CDATA[cloudfront]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[s3]]></category>
            <dc:creator><![CDATA[Nwosu Onyedikachi]]></dc:creator>
            <pubDate>Wed, 07 Feb 2024 11:43:48 GMT</pubDate>
            <atom:updated>2024-02-08T10:47:59.684Z</atom:updated>
            <content:encoded><![CDATA[<p>Continuous Integration and Continuous Deployment (CI/CD) are essential for efficient software development and fast delivery of products.</p><p>In this article, I will use the Amazon Web Services (AWS) Static Web Hosting feature and GitHub Actions to quickly add CI/CD flow to a React project — a similar approach can be applied to other front-end projects.</p><p>Prerequisites:</p><ul><li>Familiar with Amazon S3, AWS Cloud Front</li></ul><p>Here are the steps to help you get started quickly:</p><ul><li>Create a new bucket for hosting the static files for the web application.</li><li>Under the Permission tab of the bucket:</li></ul><p>1. turn off all the Block Bucket Policy Access</p><p>2. Add the following Bucket Policy Declaration</p><pre>{<br>    &quot;Version&quot;: &quot;2012-10-17&quot;,<br>    &quot;Id&quot;: &quot;Policy1625741335904&quot;,<br>    &quot;Statement&quot;: [<br>        {<br>            &quot;Sid&quot;: &quot;Stmt1625741331617&quot;,<br>            &quot;Effect&quot;: &quot;Allow&quot;,<br>            &quot;Principal&quot;: &quot;*&quot;,<br>            &quot;Action&quot;: &quot;s3:GetObject&quot;,<br>            &quot;Resource&quot;: &quot;arn:aws:s3:::the-name-of-the-bucket/*&quot;<br>        }<br>    ]<br>}</pre><ul><li>Switch to the Properties tab of the S3 Bucket and enable Static Web Hosting, setting the target to index.html</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wKSoQ21GamfNaVyR7jWPUA.png" /></figure><ul><li>Switch to AWS Cloud Front service and:</li></ul><ol><li>Create a new distribution.</li><li>Copy out the cloud front distribution link.</li><li>Select the Origin domain that matches your S3 bucket name — If prompted, use this s3 website endpoint.</li><li>Select the Web Application Firewall (WAF) option and Create a Distribution.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UYDzKAyTyTkcaAGJgxUP0g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3SlcZmR18RD9E_CcXBhfTg.png" /></figure><ul><li>Generate AWS Access Key ID and Secret Access Key on AWS IAM using the UI and store them in a secure place.</li><li>Add the AWS Access Key ID and Secret Access Key to the secrets in the settings for the GitHub Repository.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l1m-uxeggbWO84TstrJJTw.png" /></figure><ul><li>Prepare the codebase by adding the GitHub actions yml file(deploy.yml) under the .github/workflows folder.</li></ul><pre>name: Build and Deploy<br><br>on:<br>  push:<br>    branches:<br>      - main<br>      - develop<br><br>env:<br>  applicationfolder: &#39;&#39;<br>  AWS_REGION: eu-west-2<br>  S3BUCKET: the-name-of-my-bucket-on-aws<br>  CI: false<br><br><br>jobs:<br>  build:<br>    name: Build and Package<br>    runs-on: ubuntu-latest<br>    permissions:<br>      id-token: write<br>      contents: read<br>    steps:<br>      - uses: actions/checkout@v4<br><br>      - name: Configure AWS credentials<br>        uses: aws-actions/configure-aws-credentials@0e613a0980cbf65ed5b322eb7a1e075d28913a83<br>        with:<br>          aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}<br>          aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}<br>          aws-region: ${{ env.AWS_REGION }}<br><br>      - name: Setup Node 20<br>        uses: actions/setup-node@v3<br>        with:<br>          node-version: 20<br><br>      - name: chmod<br>        run: chmod -R +x ./.github<br><br>      - name: Install Dependencies<br>        run: npm install<br><br>      - name: Build and Package<br>        run: npm run build<br><br>      - name: Upload Artifact to s3<br>        run: aws s3 cp $GITHUB_WORKSPACE/build s3://${{ env.S3BUCKET }} --recursive<br>        #Note: build is for create-react-app builds and dist for vite builds<br>        </pre><ul><li>Git commit and push to the repository.</li><li>View the website at the Cloud front Distribution URL</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9yEnYFZ5nAe83kFJExRTnQ.png" /></figure><ul><li>**Optionally Purchase a custom domain and apply it on Cloud Front distribution creation***</li></ul><p>Thanks for your time. I hope you found this useful.</p><p>For support and inquiry, feel free to contact me <a href="https://onyedikachinwosu.com.ng/">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d6a3d611c701" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Effectively handle Stripe Webhooks with AWS API Gateway, Lambda Functions, and Event Bridge]]></title>
            <link>https://medium.com/@nwosuonyedikachi/how-to-effectively-handle-stripe-webhooks-with-aws-api-gateway-lambda-functions-and-event-bridge-2d1687b7aa97?source=rss-cd06f58539f5------2</link>
            <guid isPermaLink="false">https://medium.com/p/2d1687b7aa97</guid>
            <category><![CDATA[gateway]]></category>
            <category><![CDATA[eventbridge]]></category>
            <category><![CDATA[stripe-integration]]></category>
            <category><![CDATA[webhooks]]></category>
            <category><![CDATA[lambda]]></category>
            <dc:creator><![CDATA[Nwosu Onyedikachi]]></dc:creator>
            <pubDate>Wed, 15 Mar 2023 16:56:38 GMT</pubDate>
            <atom:updated>2023-03-28T05:07:22.351Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/836/1*67tlj8VBQUjdVtuUY9f5Yg.png" /><figcaption>Figure 1: Target Architecture</figcaption></figure><p>In Stripe Payment Gateway Integration, capturing and handling when a customer pays the invoice on a subscription or when a subscription is canceled or becomes inactive is essential. Not only because it improves the user experience but also because it ensures the application is always in a valid state — as business-critical payment events are processed scalably.</p><p>Stripe provides webhooks to notify your application of these asynchronous events.</p><p>NB: Webhook is an HTTP endpoint that receives events.</p><p><strong>Prerequisites</strong></p><ul><li>A basic understanding of Rest API endpoint creation in Amazon API Gateway.</li><li>Knowledgeable on how to create the AWS API Gateways and Lambdas.</li><li>Familiar with the AWS Secrets Manager and AWS Event Bridge</li></ul><p>To get started, the steps to follow include;</p><p><strong>A. HTTP Endpoint and Webhook creation</strong></p><p>i. Create your webhook Lambda as indicated in the Target Architecture above with the sample function handler code, shown below.</p><pre>const AWS = require(&#39;aws-sdk&#39;);<br><br>const secretsClient = new AWS.SecretsManager();<br>const secretName = process.env.SECRET_NAME;<br><br>const eventBridge = new AWS.EventBridge();<br><br>exports.handler = async (event) =&gt; {<br>    const { headers, body } = event;<br>    <br>    let statusCode = 200, message =&#39;&#39;;<br><br>    try {<br>        if (!headers || !body ) <br>            throw new Error(&#39;request not wellformed&#39;);<br>        <br>        if (!headers[&#39;Stripe-Signature&#39;])<br>            throw new Error(&#39;signature missing&#39;);<br>            <br>        let sig = headers[&#39;Stripe-Signature&#39;];<br>        <br>        if (Array.isArray(sig) &amp;&amp; sig.length &gt; 0)<br>            sig = sig[0];<br>        <br>        let secrets;<br>        <br>        let secretValue = <br>            await secretsClient<br>              .getSecretValue({SecretId: secretName}).promise();<br>        <br>        if (&#39;SecretString&#39; in secretValue) {<br>         secrets = secretValue.SecretString;<br>        } else {<br>            let buff = new Buffer(secretValue.SecretBinary, &#39;base64&#39;);<br>            secrets = buff.toString(&#39;ascii&#39;);<br>        }<br>        <br>        secrets = JSON.parse(secrets);<br>        <br>        const stripeKey = secrets[&#39;STRIPE_SECRET_KEY&#39;];<br>        const endpointSecret = secrets[&#39;ENDPOINT_SECRET&#39;];<br>        <br>        const stripe = require(&#39;stripe&#39;)(stripeKey);<br>        <br>        const webhookEvent = stripe.webhooks<br>                            .constructEvent(body, sig, endpointSecret);<br>        <br>        const params = {<br>            Entries: [<br>              {<br>                Source: &#39;stripe-webhook-lambda&#39;, <br>                // Must match with the source defined in rules<br>                <br>                Detail: JSON.stringify(webhookEvent),<br>                Resources: [&#39;resource1&#39;, &#39;resource2&#39;],<br>                DetailType: &#39;stripeWebhookDetailType&#39;,<br>              },<br>            ],<br>          };<br>        const eventBridgeEvent = await eventBridge.putEvents(params)<br>                                      .promise();<br>        message = &#39;event created successfully&#39;;<br>    } catch (e) { <br>        statusCode = 400;<br>        message = e.message;<br>    }<br>    const response = {<br>        statusCode: statusCode,<br>        body: JSON.stringify(message),<br>    };<br>    return response;<br>};</pre><p>The sample code above:</p><ul><li>verifies the source of incoming requests using the ‘Stripe-Signature’.</li><li>retrieves the previously stored secret keys from the AWS secrets manager and uses them to reconstruct the message body.</li><li>sends a Trigger Event to the Event bridge Bus for further processing.</li></ul><p>ii. Create your REST API in API Gateway, if it does not exist, and a POST ‘/webhook’ resource that connects with your webhook Lambda. Take note of the assigned <strong>HTTP Endpoint URL </strong>on deployment.</p><p>iii. Go to the webhooks page on your <strong>Stripe Developer Dashboard</strong> and create a new webhook with the <strong>HTTP Endpoint URL</strong> generated in the previous step.</p><p>iv. From your <strong>Stripe Dashboard</strong>, copy the <strong>Stripe Secret Key</strong> and <strong>Webhook Signing secret(Endpoint Secret Key) </strong>and save them to your <strong>AWS Secrets Manager — </strong>identified by your specified<strong> secret name. </strong>Illustrated in Figure 2 below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w59cFTJ9WFeFzokHnfbfRw.png" /><figcaption>Figure 2: Where to find the Webhook Endpoint Signing Secret and the Stripe Secret Key</figcaption></figure><p>Recommended events for handling customer subscriptions include:</p><ul><li>customer.subscription.deleted</li><li>customer.subscription.trial_will_end</li><li>customer.subscription.updated</li><li>invoice.paid</li><li>invoice.payment_failed</li><li>invoice.payment_succeeded</li></ul><p>Based on your use case, you may eventually use only <strong>one or two</strong> of the events listed.</p><p><strong>B. Business Logic handler &amp; Event Bridge Creation</strong></p><p>First, create the Business Logic Lambda for processing the events. Here is a sample code for it.</p><pre><br>const stripe = require(&#39;stripe&#39;)(process.env.STRIPE_SECRET_KEY);<br>const AWS = require(&#39;aws-sdk&#39;);<br>const lambda = new AWS.Lambda();<br>const dynamo = new AWS.DynamoDB.DocumentClient();<br><br>exports.handler = async (event) =&gt; {<br>    let statusCode = 200;<br>    try {<br>        const { detail } = event;<br><br>        if(!detail) throw Error(&#39;event not well-formed&#39;);<br>        switch (detail.type) {<br>         case &#39;invoice.payment_action_required&#39;:<br>        case &#39;invoice.payment_failed&#39;:<br>        case &#39;customer.subscription.deleted&#39;:<br>            // freeze account<br>            await freeze(detail.data &amp;&amp; detail.data.object);<br>            break;<br>        case &#39;customer.subscription.trial_will_end&#39;:<br>            // keep logs<br>            break;<br>        case &#39;invoice.paid&#39;:<br>            await handleInvoicePaid(detail.data &amp;&amp; detail.data.object);<br>            break;<br>        case &#39;customer.subscription.updated&#39;:<br>            const {status} = detail.data.object;<br>            if (status === &#39;past_due&#39;)<br>                // keep in logs<br>            break;<br>        default:<br>          console.log(`Unhandled event type ${detail.type}`);<br>        }<br>            <br>    } catch (e) {<br>        statusCode = 400;<br>    }<br>    <br>    const response = {<br>        statusCode,<br>        body: JSON.stringify(&#39;Webhook Handled&#39;),<br>    };<br>    return response;<br>};</pre><p>In the sample code above, a number of events are handled based on the business needs — for example, freezing an account when a subscription fails or is past due. Furthermore, update the database(in this case, DynamoDB) and the application software to reflect the status of any event received — like customer subscription payment or any other metric considered.</p><p>Next, create a trigger-based Event Bridge rule to match the <strong>Source</strong> specified in <strong>Webhook Lambda</strong> event <strong>params</strong> — ‘stripe-webhook-lambda’ in this case. In the creation process select the Business Logic handler function as the destination.</p><p>Also, remember to attach Amazon SQS during the creation of the Event Bridge rule to enable retries.</p><p>If you carefully followed the steps above, you would have the Target Architecture illustrated in Figure 1 above.</p><p><strong>Bonus</strong>: Stripe provides a <strong>Client(CLI)</strong> for testing webhooks during development. To set it up in MacOS — similar steps are available for other Operating Systems, on the Terminal <strong>RUN</strong> the following commands.</p><ul><li>brew install stripe/stripe-cli/stripe</li><li>stripe login</li><li>stripe listen — forward-to <a href="https://2w3tn83u78.execute-api.eu-west-2.amazonaws.com/v1/webhook">https://*****.execute-api.eu-west-2.amazonaws.com/v1/webhook</a></li></ul><p>At this point, a web signing secret is generated for you.<strong> **Never** use it in your Webhook Lambda — disregard it</strong>. If you use this new signing secret on the CLI terminal as the <strong>ENDPOINT_SECRET_KEY </strong>in the <strong>Webhook Lambda</strong>, you will have problems.</p><p>To create a sample event on a different Terminal instance RUN</p><ul><li>stripe trigger invoice.paid</li></ul><p>Thanks for taking the time to peruse this article.</p><p>For support and inquiry, feel free to contact me <a href="https://onyedikachinwosu.com.ng/">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2d1687b7aa97" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to do Input/Output mappings in the API gateway for Lambda functions on the AWS Cloud Console]]></title>
            <link>https://medium.com/@nwosuonyedikachi/how-to-do-input-output-mappings-in-the-api-gateway-for-lambda-functions-on-the-aws-cloud-console-8f4304f25dc2?source=rss-cd06f58539f5------2</link>
            <guid isPermaLink="false">https://medium.com/p/8f4304f25dc2</guid>
            <category><![CDATA[mapping]]></category>
            <category><![CDATA[integration]]></category>
            <category><![CDATA[request-response]]></category>
            <category><![CDATA[api-gateway]]></category>
            <category><![CDATA[lambda]]></category>
            <dc:creator><![CDATA[Nwosu Onyedikachi]]></dc:creator>
            <pubDate>Tue, 28 Feb 2023 15:50:31 GMT</pubDate>
            <atom:updated>2023-02-28T16:05:47.592Z</atom:updated>
            <content:encoded><![CDATA[<p>Having spent many hours on the AWS API Gateway documentation, reading other articles, and watching related videos, I have put together this article to save you time and simplify the process. In this write-up, I will attempt to demystify how to gain control over the structure of input events fed into the Lambda Function or the response data returned from the Lambda Function to the <strong>Client</strong> through API gateway mapping.</p><p><strong>Prerequisites</strong>:</p><p>i. You should have already created your API Gateway Rest API resource.</p><p>ii. You are familiar with creating a Lambda Function</p><p>N.B: The <strong>Client</strong> calls or triggers the API Gateway endpoint via an HTTP Request.</p><p>N.B: You may not have to map requests and responses through the API gateway if you select the <strong>Lambda Proxy Integration</strong> during the Rest API resource method creation step — shown in Figure 1 below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QDMbQM3ciVg92xALlbe2bg.png" /><figcaption>Figure 1: Image showing the Lambda Proxy Integration selected</figcaption></figure><p>First on,</p><ul><li><strong>**How to Map Input Request in the API Gateway**</strong></li></ul><p>To get this done, follow these steps:</p><p>a. Define your resource endpoint, choose the target Resource method (a POST, GET, PUT, PATCH, or DELETE), deselect the <strong>Lambda Proxy Integration</strong> checkbox, select the target lambda function from the search-dropdown, and save as illustrated in Figure 2 and 3 below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0E8_98HcdnTpdRwJ1hRxbA.png" /><figcaption>Figure 2: Resource creation steps</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fE5j7zKSUE8HMXB6Bpu0Ew.png" /><figcaption>Figure 3: Resource method creation steps</figcaption></figure><p>Note the following:</p><p>i. On save, you would be redirected to a page that depicts the execution flow between the Client that hits the API endpoint and the Lambda function that responds. Illustrated in figure 4 below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_V_FP-72iH4WsSTemhsnug.png" /><figcaption>Figure 4: Execution Flow Diagram</figcaption></figure><p>ii. For the input request mapping, the focus is on the <strong>Method Request </strong>and the <strong>Integration Request</strong>, the top half of the diagram. While you define the <strong>HTTP headers</strong> for the rest of the API in the <strong>Method Request</strong>, in the <strong>Integration Request,</strong> you define the values for those headers.</p><p>b. From the Execution Flow Diagram, select the <strong>Method Request</strong>, toggle the <strong>HTTP Request Headers</strong> section, click the add header link, enter Content-Type as the value, and click the gray-colored checkmark on the right of your screen to create it — depicted in Figure 5 below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lfsz4wN6hzTw05zbH4xtlw.png" /><figcaption>Figure 5: Set HTTP request headers for the API Gateway endpoint</figcaption></figure><p>After header creation, you can tick the checkboxes to require that header or cache it.</p><p>c. Navigate back to the Execution Flow Diagram, and click the <strong>Integration Request</strong>. The settings on the Integration Request help provide information about the target backend that this method will call and how incoming request data be modified.</p><p>On the <strong>HTTP headers</strong> section, add ‘application/json’ and ‘application/x-www-form-urlencoded’ as Content-Type values and save.</p><p>Under the Mapping Templates section, for the Request body passthrough field, select Never, click the <strong>add mapping template and save, </strong>define the ConTent-Type as application/json and save, leave the Generate template field blank, and insert the following values:</p><pre>{<br> &quot;body&quot;: &quot;$util.escapeJavaScript($input.body)&quot;,<br> &quot;headers&quot;: {<br> #foreach($param in $input.params().header.keySet())<br>   &quot;$param&quot;: &quot;$util.escapeJavaScript($input.params().header.get($param))&quot;<br>   #if($foreach.hasNext),#end<br> #end<br> }<br>}</pre><p>The visual in Figures 6 and 7 below depicts how the mapping template is defined for incoming requests.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aZ-8RRIqWJL57tsP4W9EpA.png" /><figcaption>Figure 6: Set Integration Request Values for the HTTP headers</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BXvORzv8jm5On1O7hOAO_A.png" /><figcaption>Figure 7: Define Integration Request Mapping Template</figcaption></figure><p>Note the following:</p><p>i. The mapping template above will feed the lambda function with an event that has only the body and the headers defined.</p><p>ii. Although I have directly entered the template definition, alternatively, you can create a <strong>model</strong> for the request first and automatically generate the template based on its selection in the dropdown next to the <strong>Generate template </strong>field.</p><p>For further details on creating models and syntax for mapping templates, visit this <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/models-mappings.html">AWS doc</a>.</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p>Next on:</p><ul><li><strong>**How to handle Output Response in the API Gateway**</strong></li></ul><p>Just like in the Input Request Mapping Case, our focus will now be on the bottom half of the <strong>Execution Flow Diagram</strong> in Figure 4 above, which has to do with the <strong>Method Response</strong> and the <strong>Integration Response</strong>.</p><p>The Method Response defines the HTTP status code to be returned to the Client, while the Integration Response sets the values or type of data for the response status code in the response body.</p><p>Here are the steps:</p><p>a. From the Execution Flow Diagram, select the <strong>Method Response</strong>, add the 400 and 500 status codes after clicking the <strong>Add Response </strong>link, and save. By default, the HTTP status 200 is pre-configured for you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DPwBpBkf0mtwh6wyCy3Jrg.png" /><figcaption>Figure 8: Define Method HTTP Response status codes</figcaption></figure><p>b. Return to the Execution Flow Diagram, and select the <strong>Integration Response</strong>. Here, click <strong>add Integration Response</strong> for the HTTP status codes defined in the previous step — one after the other.</p><p>For the already pre-configured <strong>200</strong> status code, make the following modifications:</p><p>i. In the table listing the HTTP Status codes, toggle the right-facing arrow.</p><p>ii. Navigate to the bottom till you find the Mapping templates sub-section, click the <strong>add mapping template </strong>link, enter application/json as the Content-Type, and Save.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WjbzGykSI9Mgj-d5Lb-MxQ.png" /><figcaption>Figure 9: Add Integration Response Mapping for each HTTP status code</figcaption></figure><p>iii. Add the following template</p><pre>#set($inputRoot = $input.path(&#39;$&#39;))<br>$inputRoot.body // the body is already in the stringified format</pre><p>Line 1 sets the $inputRoot to data returned from the Lambda Function. The body is usually a string or a JSON stringified value. For this case, below is the sample response returned from the Lambda function:</p><pre>{<br>  statusCode: 200,<br>  body: Json.stringify({message:&#39;Hello from Lambda&#39;}),<br>  headers: {<br>    &#39;Content-Type&#39;: &#39;application/json&#39;<br>  }<br>}</pre><p>On the other hand, Line 2 returns the content of the ‘body’ key in the Lambda Response to the Client.</p><p>There are other fine-grained modifications that can be done as illustrated in the <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/models-mappings.html">AWS docs</a>.</p><p>For clarity, if the Lambda function returns the following response structure:</p><pre>{<br>  &quot;id&quot;: 1,<br>  &quot;name&quot;: &quot;John Doe&quot;,<br>  &quot;age&quot;: 40,<br>  &quot;country&quot;: &quot;Nigeria&quot;<br>}</pre><p>The following mapping template will return the JSON response containing only the <strong>id and name</strong> as its final response to the <strong>Client</strong>.</p><pre>#set($inputRoot = $input.path(&#39;$&#39;))<br>{<br>  &quot;id&quot;: $inputRoot.id,<br>  &quot;name&quot;: &quot;$inputRoot.name&quot;<br>}</pre><p>Lastly, it is always good to click the <strong>Actions button </strong>in the top menu on the API Gateway UI, enable CORS on the resource endpoint, deploy the API to your stage, and test.</p><p>I sincerely hope you find this useful. Thanks for your time.</p><p>Feel free to reach me <a href="https://onyedikachinwosu.com.ng/">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8f4304f25dc2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Setup a PHP-based AWS Lambda function]]></title>
            <link>https://medium.com/@nwosuonyedikachi/how-to-run-a-php-based-aws-lambda-function-e1b7a0254036?source=rss-cd06f58539f5------2</link>
            <guid isPermaLink="false">https://medium.com/p/e1b7a0254036</guid>
            <category><![CDATA[severless]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[imagick]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[bref]]></category>
            <dc:creator><![CDATA[Nwosu Onyedikachi]]></dc:creator>
            <pubDate>Thu, 05 May 2022 12:06:27 GMT</pubDate>
            <atom:updated>2022-05-06T09:10:29.522Z</atom:updated>
            <content:encoded><![CDATA[<p>In this post, I am going to create an AWS lambda function that runs on a PHP runtime. The process is simplified using <a href="http://bref.sh/"><strong>Bref</strong></a><strong>.</strong> <strong>Bref</strong> is an open-source project that brings full support for <strong>PHP</strong> and its frameworks to AWS Lambda.</p><p><strong>Prerequisites</strong>: Install composer locally, and generate your AWS access keys.</p><p>The steps are:</p><ol><li><strong>Install and configure the Serverless Framework</strong></li></ol><pre>npm i -g serverless</pre><pre>serverless config credentials — provider aws — key &lt;key&gt; — secret &lt;secret&gt;</pre><p>2<strong>. Composer install Bref</strong></p><pre>mdkir serverless-php-lambda</pre><pre>cd serverless-php-lambda<br>composer require bref/bref</pre><p>3.<strong> Initialize the Bref project</strong></p><pre>vendor/bin/bref init</pre><pre>Select Event-driven function below</pre><pre>What kind of lambda do you want to create? (you will be able to add more functions later by editing `serverless.yml`) [Web application]:<br>  [0] Web application<br>  [1] Event-driven function</pre><p>A serverless.yml file is created at this point as shown below.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/257b285bee24a21367210f54d4a52124/href">https://medium.com/media/257b285bee24a21367210f54d4a52124/href</a></iframe><p>The serverless yml above indicates that I am deploying a lambda function named php-lambda running on PHP 7.3 to an Amazon Linux 2 machine(<strong>provided.al2</strong>) on AWS Lambda.</p><p>Note that Lambda function name, PHP versions and AWS region can be updated before deployment. For more supported PHP versions, visit <a href="https://runtimes.bref.sh/"><strong>bref-runtimes</strong></a> for details.</p><p>Also, an<strong> index.php</strong> was created on initialization. Modify the index.php file to handle your specific use case.</p><p>4. <strong>Deploy To AWS and Test</strong></p><pre>serverless deploy</pre><p>The image below shows the sample PHP code running in AWS Lambda.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3z4QfFiRjddDdsWX749-1A.png" /></figure><p>5. <strong>Add PHP Extensions(Optional)</strong></p><p>For this example we will add the Imagick PHP extension in the following sub-steps;</p><pre>RUN composer require bref/extra-php-extensions</pre><pre>UPDATE plugins in serverless.yml file and add — ./vendor/bref/extra-php-extensions</pre><pre>UPDATE layers in serverless.yml file and add ${bref-extra:imagick-php-73}</pre><pre>save and redeploy and retest</pre><p>The new serverless.yml is as shown below.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d172770eecd351fbeb9b1e338502f385/href">https://medium.com/media/d172770eecd351fbeb9b1e338502f385/href</a></iframe><p>Bref supports other PHP extensions. Check <a href="https://github.com/brefphp/extra-php-extensions"><strong>here</strong></a> for more details.</p><p>Congratulations on having gotten thus far. If you have followed through on the steps, you should have an AWS lambda function that runs on a PHP runtime.</p><p><em>Thank you for reading! If you found this helpful, I would love some constructive feedback in the comments section.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e1b7a0254036" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to give internet access to AWS Lambda in VPC]]></title>
            <link>https://medium.com/@nwosuonyedikachi/how-to-give-internet-access-to-aws-lambda-in-vpc-b6837f894c15?source=rss-cd06f58539f5------2</link>
            <guid isPermaLink="false">https://medium.com/p/b6837f894c15</guid>
            <category><![CDATA[internet-gateway]]></category>
            <category><![CDATA[vpc]]></category>
            <category><![CDATA[configuration]]></category>
            <category><![CDATA[nat-gateway]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <dc:creator><![CDATA[Nwosu Onyedikachi]]></dc:creator>
            <pubDate>Sat, 26 Mar 2022 15:07:42 GMT</pubDate>
            <atom:updated>2022-03-26T15:07:42.677Z</atom:updated>
            <content:encoded><![CDATA[<p>In the initial setup for a project, I had configured an AWS Lambda without Virtual Private Cloud(VPC) to run some jobs. It was going well, I could call external APIs via Axios, and interact with other AWS Services(SNS, S3) via the AWS SDK. But surprisingly, in subsequent steps required by the task at hand, I tried connecting to a MySQL instance of the AWS Relational Database Service (RDS) private within a VPC. The Lambda started timing out. It had no access to the VPC containing the database service</p><p>To resolve the issue, I applied the default VPC configuration for the Lamba function. This time around, the issue with connection to the MySQL instance of the AWS RDS was fixed but I introduced another problem. I could not call external APIs via Axios, the Lambda was timing out again. This time, the Lambda Function ran privately in the default VPC that had no internet access.</p><p>Faced with this dilemma, the steps outlined below show how I solved these issues i.e. to simultaneously give internet access to Lambda function in VPC and grant access to the MySQL instance and any other services private in the VPC.</p><p>Before we delve into the details, the diagram below is the architectural design behind the solution:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/691/1*an5QAlqREHjPV_t6b9ag6g.png" /></figure><ul><li>The Internet Gateway is used to give access to Incoming and Outgoing Traffic to the VPC. It is attached to the VPC.</li><li>The NAT Gateway is used to transfer Outgoing Traffic from the Lambda functions running the <strong>Private Subnets</strong> 1 &amp; 2 to Internet Gateway. NB: the NAT Gateway must be attached to a <strong>Public Subnet</strong> to work.</li></ul><p><strong>NB</strong>: You should have created your VPC already, if not, search for VPC in the AWS cloud console, and use the VPC creation wizard.</p><p>Step 1: Create a Subnet and tagged it as your <strong>Public Subnet.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SFE7XzWNkAxA4UfVs5oMig.png" /></figure><p>Step 2: Create an Internet Gateway and attach it to the VPC.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gKiLySzEJViQuwSiel_aXQ.png" /></figure><p>Step 3: Create a Route Table, Edit routes, attach the Internet Gateway to target 0.0.0.0/0, and edit subnet associations(<strong>Subnets without explicit associations</strong>) by adding the newly created Public Subnet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*449BaLMkGgl_8zaYJgBLKA.png" /></figure><p>Step 4: Create two new Subnets as done in Step 1; Tag them as your Private Subnets. Subsequently, they would be attached to your Lambda function.</p><p>Step 5: Create a public NAT Gateway in the <strong>Public Subnet</strong> created in the previous step. Associate an Elastic IP as required in the creation step.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h1hS0ng8jME2_XrtpPzl8w.png" /></figure><p>Step 6: Create a new Route Table, Edit routes, attach the NAT Gateway to target 0.0.0.0/0, and edit subnet associations(<strong>Explicit subnet associations</strong>) by adding the two(2)newly created Private Subnets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8MwlWHABP6fqhMzapOp7ZA.png" /></figure><p>Step 7: Edit the Lamba Function IAM Role and attach IAM Policy <a href="https://us-east-1.console.aws.amazon.com/iam/home#/policies/arn:aws:iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole">AWSLambdaVPCAccessExecutionRole</a> to it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rVtksrGdn3INmTovsw9moA.png" /></figure><p>Step 8: Edit the VPC configuration of the Lambda function. Select the appropriate VPC, attach the two Private Subnets, use the right security group(usually the default) and save.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ei5UC0hs3gAa10QqqjlfdA.png" /></figure><p>At this point, Redeploy the Lambda Function and test. If the previous steps were followed meticulously, the issue with lambda timeout is now fixed. You can now simultaneously access the internet from the Lambda function in VPC and access the MySQL instance or any other services private in the VPC.</p><p>I hope this helps someone out there. Thanks for your time.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b6837f894c15" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Setup JD Edwards on AWS — Step by Step]]></title>
            <link>https://medium.com/@nwosuonyedikachi/how-to-setup-jd-edwards-on-aws-step-by-step-25b9704be8df?source=rss-cd06f58539f5------2</link>
            <guid isPermaLink="false">https://medium.com/p/25b9704be8df</guid>
            <category><![CDATA[jdedwardsenterpriseone]]></category>
            <category><![CDATA[erp-software]]></category>
            <category><![CDATA[setup]]></category>
            <category><![CDATA[jde]]></category>
            <category><![CDATA[aws-ec2]]></category>
            <dc:creator><![CDATA[Nwosu Onyedikachi]]></dc:creator>
            <pubDate>Wed, 16 Feb 2022 11:47:22 GMT</pubDate>
            <atom:updated>2022-02-17T08:42:56.309Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to Setup JD Edwards on AWS — Step by Step</h3><p>JD Edwards is a comprehensive Enterprise Resource Planning(ERP) software used for managing Customer Relations, Supply and Procurement, Logistics, Manufacturing, Human Capital, Financials, etc.</p><p>I recently worked on a third-party integration into the JD Edwards ERP solution. The undocumented issues I encountered while setting up the environment/solution cost me a lot of productive hours. With this article, I intend to demystify the whole process.</p><p>I hope this helps someone out there.</p><p><strong>Prerequisite</strong>: You must have an Amazon Web Services(AWS) account. Else, visit https://aws.amazon.com to create a free account.</p><p>To get started quickly, I recommend you setup a 5 day free trial on AWS through the AWS Marketplace. Here are the steps you should follow include:</p><p><strong>Step 1</strong>: Create a JD Edwards instance from an Amazon Machine Image(AMI) template on AWS Marketplace</p><ul><li>Login into your AWS Cloud console</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*01-EuRMb--sdk2KJpI3WGQ.png" /></figure><ul><li>Enter EC2 on the search field and click EC2 in the search results</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6NFtDfYLuEbzlu9egfcQsw.png" /></figure><ul><li>Click AWS EC2 Dashboard and Click on Instances</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fo0Du2LAWppEd59x22gpFA.png" /></figure><ul><li>Click launch instance</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TzD3OVuLdSMJPFXVoMrSlg.png" /></figure><ul><li>Enter JD Edwards in search field and press Enter</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p6FtWtbvBWe0vnQpBC7t4Q.png" /></figure><ul><li>Click the 3 results in marketplace and select the latest <strong>EnterpriseOne Bundled All In One AMI, </strong>in this case, 9.2.6</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Hbbp9pQWdmHuAcSpnRLvyA.png" /></figure><ul><li>Review and Select Continue</li><li>Choose instance type and click on Next: Configure Instance Details; NB: t3a-large is the cheapest instance for the setup</li><li>Review and click Next: add Storage</li><li>Review and click Next: add Tags</li><li>Review and click: Configure Security Group</li><li>Configure Security Group; Click Add Rule;</li><li>Add Custom TCP Rules for Port numbers 8080, 8180 each as indicated below.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1eAPKksj5BpbaZprrFedFg.png" /></figure><ul><li>Click Next: Review and Launch</li><li>Click Launch button</li><li>Create A key pair and download its .pem file, check the box and Click Launch Instances</li><li>Wait 15 minutes for the windows server to pass checks and initialize</li></ul><p><strong>Step 2</strong>: Connect to the Remote Server.</p><ul><li>Browse EC2 &gt; instances</li><li>Select the Launched JD Edwards Virtual machine(VM)</li><li>Click the connect button</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c5-i76FdbDqioQi8fZdeXA.png" /></figure><ul><li>Navigate to the RDP Client.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t4Pt7bEu8U4TUadR-volBQ.png" /></figure><ul><li>Download the RDP file, Take note of the username Administrator, and Click on Get Password.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L_EY1mO3EPvN15VX5G8K9A.png" /></figure><p><strong>NB</strong>: You may have to wait for 10 minutes before you can access your password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OSAnXpOPeUfVQurhg38NBw.png" /></figure><ul><li>Upload the .pem file gotten from <strong>Step 1</strong>, and click Decrypt Password</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5pBFJxXPbqn3x899cEdpuQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qtVwJOX99GReTZgvFDYPIw.png" /></figure><ul><li>Save the generated Password in a secure location.</li><li>Open the RDP File download previously with a Remote Desktop Client on your PC. You would receive a prompt for the password.</li><li>Enter the recently generated password. Click continue if a security warning prompt comes up.</li><li>On successful completion of the previous steps, visit <a href="http://allinone:8080/jde/owhtml">http://allinone:8080/jde/owhtml</a> in the web browser provided in the VM.</li></ul><p><strong>NB</strong>: The first time you visit <a href="http://allinone:8080/jde/owhtml">http://allinone:8080/jde/owhtml</a>, it may take 10 minutes to display in a browser .</p><ul><li>When the Web Client Displays, stop and restart the virtual machine(VM).</li><li>Login again via RDP Client</li><li>visit <a href="http://allinone:8080/jde/owhtml">http://allinone:8080/jde/owhtml</a> on the browser</li><li>Enter your login details</li></ul><p><strong>NB</strong>: For the username and password prompt shown, the correct authentication details are located in the ReadMe.txt file under the root Local Disk C:// folder.</p><p><strong>NB</strong>: For the Web Client, the username/password is usually JDE/JDE.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CQ5HzThYKZkEm7YyH0iB4A.png" /></figure><p>Congratulations, you now have access to your fully configured JD Edward ERP Solution.</p><p>Hold on… there is more.</p><p>When you at attempt to access the Web Client at <a href="http://vm_external_ip:8080/jde/owhtml,">http://vm_external_ip:8080/jde/owhtml</a> through an external web browser it cannot be reached .</p><p><strong>NB</strong>: <a href="http://vm_external_ip:8080/jde/owhtml,">vm_external_ip</a> e.g. 18.45.234.67</p><p><strong>NB</strong>: the external web browser is outside the VM</p><p>The concluding step resolves this issue.</p><p><strong>Step 3</strong>: Add a firewall rule to allow connection to the web client on port 8080 and allow connection to the Application Interface Server(AIS) server on port 8180</p><ul><li>Click on the search button on the bottom left</li><li>enter firewall</li><li>Select Windows Firewall with Advanced Security</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UxxjBg_n5j6aiDJf43eayQ.png" /></figure><ul><li>Select Inbound Rules, Click Add Rule, Select Port, and Click Next,</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*COoaIxjPHUV70s__LdgYhQ.png" /></figure><ul><li>Select TCP, enter specified ports 8080 and 8180 and click Next.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lWDWyGlrkQnqNUFxX0NqlA.png" /></figure><ul><li>Allow Connection, and Click Next</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7oBlgeM6s8fQVsZI578JdQ.png" /></figure><ul><li>Enter Name and Description and click Finish</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AkWtqs7Q4L0Fs7FVxZ4U7g.png" /></figure><p>Now, visit <a href="http://vm_external_ip:8080/jde/owhtml,">http://vm_external_ip:8080/jde/owhtml</a> again…viola… congratulations..</p><p>If you followed through, I’d expect you have a working setup of JD Edwards ERP Solution running on AWS.</p><p>Thanks for your time.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=25b9704be8df" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bug on Timbu — Broken menu icon]]></title>
            <link>https://medium.com/@nwosuonyedikachi/bug-on-timbu-broken-menu-icon-315d2c631802?source=rss-cd06f58539f5------2</link>
            <guid isPermaLink="false">https://medium.com/p/315d2c631802</guid>
            <dc:creator><![CDATA[Nwosu Onyedikachi]]></dc:creator>
            <pubDate>Tue, 02 Apr 2019 15:53:20 GMT</pubDate>
            <atom:updated>2019-04-02T15:53:20.718Z</atom:updated>
            <content:encoded><![CDATA[<h3>Bug on Timbu — Broken menu icon</h3><p>Timbu is platform for discovering hotels around the world. A number of bugs have been identified on its current implementation at timbu.com.</p><p>One of those bug is that on the mobile view, the menu icon does not work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/229/1*qli4As1kQSiAX9h7AA3NvQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=315d2c631802" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>