Revent publications

I posted several blog platform. So we can easy to summarize of my blog in this page.

When you suffer from the “API: s3:PutBucketPolicy Access Denied” error while creating a new S3 bucket, how can we resolve it?

The user encountered an error when trying to create a new Amazon S3 bucket for hosting a website. The error message indicated an “Access Denied” issue with the `s3:PutBucketPolicy` API. To resolve this, the user needs to add the `blockPublicAccess` attribute with the value `BlockPublicAccess.BLOCK_ACLS` to the CDK project configuration. By doing so, the default configuration of Amazon S3 will be updated correctly. The user provided additional links as references for more information on this topic.

Deploy Sonik application to AWS Lambda with functions URL by AWS CDK

Sonik is a JavaScript meta framework maintained by Yusuke-san, Hono framework maintainer. It allows building websites and web applications with Next.js-like file-based routing and Hono-like REST API. The text provides instructions on how to configure an AWS CDK project and deploy a Sonik app to AWS. It includes code snippets for defining AWS Lambda and Amazon S3 resources, as well as setting up static asset deployment. The text also mentions updating the Sonik app to adapt to AWS Lambda by adding a new entry point file, setting the handler function for mapping requests and responses, and adding a middleware to support static assets deployed to S3. It suggests using CloudFront for distributing static assets in a production environment.

Upgrade the version of nodenv through the anyenv ( Resolving un-listed Node.js version 18 issue)

The provided text explains how to resolve the issue of not being able to find Node.js version 18 using the nodenv install –list command. The author suggests upgrading nodenv using the anyenv command, as the usual method of upgrading through brew may not work when anyenv is used. After reinstalling nodenv and restarting the shell session, the user should be able to install Node.js version 18 using the nodenv install –list command. The author concludes by emphasizing the importance of understanding how to manage different language versions when using different version managers like nodenv.

Fetching to the internal API (relative API path) on the Next.js App Router

The text discusses how to fetch the internal API on the Next.js App Router. It highlights the difference between the Next.js Page Router and the App Router in terms of calling the internal REST API. It mentions that using the fetch function with a relative path will result in an error, and suggests setting the fetch target URL as a full URL. The text also describes how to retrieve the domain and host on the application using the next/headers library. It provides an example code snippet that demonstrates fetching the API with the full URL. Finally, it mentions that in the Next.js App Router, the request header information such as the protocol and host can be obtained using the next/headers library.

Integrating Google App Script with Orbit Champion program: Submitting Form Data

This tutorial guides you on how to integrate Google App Script with Orbit, a tool for community building and developer advocacy. The focus is on submitting form data from a Google Form to Orbit using a custom script. The tutorial provides step-by-step instructions on defining form field mappings, submitting form data to Orbit, and setting up a Google Form trigger. By following this tutorial, you’ll be able to automate the process of sending data from your Google Form to your Orbit Champions program. This custom script will streamline your community-building efforts and enhance your developer advocacy.

Read RSS Feed on Cloudflare Workers

When utilizing Cloudflare Workers, it can be difficult to use npm packages due to runtime differences. However, to create an RSS feed reader application, one can use the fetch API and htmlparser2 library for Cloudflare Workers. The example code provided showcases how to parse a feed and return a JSON response containing the title, description, datetime, and href of each item in the feed.