Perhaps you’ve forgotten to set the bootable logical drive.. and here is how
Recently, I did a chassis swap due to hardware issue. On the new chassis, the system won’t boot from disks. Quickly, I booted up the server with grml and confirmed the drives and filesystems are ok. I even did a chroot and grub2-install to reinstall the boot sector / loader. Still, this chassis went straight to network boot, as if the disk array do not exist.
If you already have multiple VPCs connected through Transit Gateway, we can leverage that and share one NAT gateway with other VPCs.
NAT gateway is a gateway device and performs NAT for outbound traffic. Every private subnet needs a NAT gateway to access the internet. In most cases, it is a good idea to have 2 or more NAT gateways in a VPC, diverse across AZs. That gives the maximum redundancy. But in some cases, cost may be a higher priority. If you already have multiple VPCs connected through Transit Gateway, we can leverage that and share one NAT gateway with other VPCs.
Here, I’ll demonstrate how to host an HTTP api call on AWS using Lambda and Api Gateway.
Servers are good. But there are a lot of boring tasks when it comes to maintaining a server. If I just want to publish a simple API online, serverless seems a better choice. Let’s try create an HTTP api using AWS Lambda and ApiGateway.
Create a lambda function
Create a simple python function which prints the client’s source IP. Don’t worry when testing the function in lambda console fails.
On the api gatetway consone, create a simple HTTP API. Give the API a name and then leave everything else default. Once created, copy the URL of the apigateway from console. That is where the API is exposed.
Next, create a route for the apigateway. Here I create a route for GET to go to /. This API call will be read only so only GET request is needed.
For authorization, I’ll let it remain open which is the default setting.
Next, create an integration. Choose “ANY /” route, and set the integration target to the above lambda function. Ensure “Grant API Gateway permission to invoke your Lambda function” is enabled.
Moment of truth
Open the apigateway URL and the message is displayed. The actual result has been redacted.
The last step is to put this API on a custom domain name. Initially, I just created a cname on Cloudflare but that didn’t work. I even configured a CORS to allow the custom domain. Turns out I need to use the custom domain setting in api gateway.
First, create a certificate on ACM. Next, create a new custom domain on api gateway. Under API mappings, map the custom domain to my API. Finally, create a CNAME record, pointing the custom domain to the API gateway domain name (which is different from the apigateway URL).
Shortly after Red Hat announced the shift of focus of CentOS , they released a no-cost subscription for Red Hat Enterprise Linux. In short, they now allow a single user to run 16 Red Hat VMs at no cost. Here is how to get it.
Enpass is my favorite password manager. It works on Linux and Mac, and it can sync the password vault to cloud storage. Here, I’ll show you how to setup your own nginx dav share. I prefer not to store my passwords on public cloud.
Recently, I came across the MikroTik routers and so happen I need to troubleshoot a site-to-site VPN issue.
Recently, I came across the MikroTik routers and so happen I need to troubleshoot a site-to-site VPN issue. MikroTik providers the RouterOS for anyone to install in a virtual environment. There is also an AMI on AWS. Here I’ll demonstrate how to get it to connect to AWS VPN in no time.
If you need to type a certain string on regular basis, you may want to set it up as a keyboard shortcut. But one cannot just associate a hot key with the string. Here is how to do it on Ubuntu without installing any extra package.