Welcome to curated list of handpicked free online resources related to IT, cloud, Big Data, programming languages, Devops. Fresh news and community maintained list of links updated daily. Like what you see? [ Join our newsletter ]

Securing Lambda function URLs using Amazon Cognito, Amazon CloudFront and AWS WAF

Categories

Tags infosec microservices devops serverless

Lambda function URLs is a dedicated HTTPs endpoint for a AWS Lambda function. You can configure a function URL to have two methods of authentication: IAM and NONE. IAM authentication means that you are restricting access to the function URL (and in-turn access to invoke the Lambda function) to certain AWS principals (such as roles or users). Authentication type of NONE means that the Lambda function URL has no authentication and is open for anyone to invoke the function. By Marcia Villalba.

Lambda function URLs provides a simpler way to invoke your function using HTTP calls. However, it is not a replacement for Amazon API Gateway, which provides advanced features like request validation and rate throttling. Proposed solution is described:

  • A Lambda function with function URLs enabled
  • Amazon Cognito User Pool
  • CloudFront distribution using AWS WAF
  • Public website that invokes the Lambda function

In this blog, you create a Lambda function with function URLs enabled with NONE as the authentication type. You then implemented a custom authentication mechanism as part of your Lambda function code. You also increased the security of your Lambda function URL by setting it as Origin for the CloudFront distribution and using AWS WAF Geo and IP limiting rules for protection against common web threats, like DDoS. GitHub repository with JavaScript CDK is also included. Nice one!

[Read More]

Composability: The future of innovation

Categories

Tags miscellaneous app-development cio cicd microservices devops

In recent years there has been a constant stream of software architecture movements: microservices, API-led connectivity, event driven architecture, composable enterprise, automation, and data mesh. We’re going to address how these trends can be positioned in a broader innovation strategy. By Jeroen Reizevoort.

The article deals with:

  • Essential and accidental complexity
  • Building-block technologies
  • People, process, and technology
  • From projects to products

To be agile at scale, these building blocks will need ownership, consistent builds and design, to be discoverable for reuse, and to be secure and monitored.

That is where the concept of digital products comes in. The building blocks that are created should be managed as products. This concept is one of the foundations for the microservices world; in BizDevOps small teams of business, developers and operations people own the complete lifecycle of a microservice.

Innovation is top-of-mind, and businesses seek opportunities to increase customer, partner, and employee experiences. But they have to do that in labor shortages and economic headwinds. That requires organizations to do more with less. Good read!

[Read More]

OptionSet in Swift explained with code examples

Categories

Tags swiftlang app-development ux web-development

OptionSet in Swift allows you to define a set of options for configurations. It’s the Swift variant of the well-known NS_OPTIONS in Objective-C and it’s used throughout the standard libraries. By Antoine van der Lee.

The main focus of the article:

  • What is an OptionSet?
  • How to create an OptionSet
  • Reading values from an OptionSet

A set of options is often confused by a set of enum cases, but they’re not the same. While you could create a similar solution using enums, they’re meant to be used singularly. OptionSet in Swift allows you to define a set of configurations with a method or type initializer. Throughout the standard libraries, you can find examples of option sets to configure types like a JSONSerializer. By providing available options, you allow implementors of a type to configure instances in a readable manner without exposing too many implementation details. Good read!

[Read More]

Measuring Java 11 Lambda cold starts with SnapStart - Using Quarkus framework

Categories

Tags devops serverless java app-development containers cicd

In this article authors are going to measure the performance of snapstart using Quarkus as another popular Java framework. All in serverless environment with AWS Lambda. By Vadym Kazulkin.

In this article you will get information on:

  • Quarkus Framework and its features
  • Writing AWS Lambda with Quarkus
  • Measuring the cold starts

The author measured 100 cold starts, using 1024MB and average values are in this table.

Percentile timings for Quarkus in ms timings for Quarkus with SnapStart in ms
p50 3164.19 1337.16
p90 3262.57 1374.76
p99 3823.99 1473.87

If we compile our application with GraalVM Native Image and deploy our Lambda as Custom Runtime, we can further reduce the cold start to between 450 and 550m. Quarkus Framework is Kubernetes Native Java stack tailored for OpenJDK HotSpot and GraalVM, crafted from the best of breed Java libraries and standards. Nice one!

[Read More]

How to use Git Reflog – Reflog vs. log

Categories

Tags devops cicd app-development containers

Git log and git reflog are two similarly named components that give developers an opportunity to look into the repository’s commit history through the command line. Those useful commands are usually confused or misunderstood. In this article, you will get to know the differences between them, git reflog usage examples, and how to use git reflog. By Jakub Grodecki.

The in depth tutorial then reads about:

  • What is git log, What is git reflog
  • How to use git reflog
  • Restore deleted branches
  • Restore commits

The most significant distinction between git reflog and log is that the log is a public record of the repository’s commit history, whereas the reflog is private. After a push, fetch or pull, the git log is duplicated as part of the git repository. The git reflog, on the other hand, is not included. Interesting read!

[Read More]

Six docker compose best practices for dev and prod

Categories

Tags devops app-development web-development containers programming docker

Docker solves the “but it runs on my machine” problem by introducing containerization. However, with a multifaceted code base, you must simultaneously run several containers like the back and front end. Further, this will require you to leverage tools such as Docker Compose. By Regis Wilson.

Docker Compose is a tool for defining and running multi-container Docker applications. It allows you to bring up and link multiple containers into one logical unit. The article then brings these points to your attention:

  • What is docker compose good for?
  • Mount your code as volume to avoid unnecessary rebuilds
  • Use an override file
  • Use YAML anchors
  • Leverage the docker restart policy
  • Correct cleanup order of docker images
  • Setting your containers’ cpu and memory limits

These tips will help you use Docker Compose more effectively in development and production. After trying out the above configuration and optimization, you should be able to build your containers efficiently. Nice one!

[Read More]

Reducing errors with type hinting in PHP

Categories

Tags php app-development web-development programming

In this article, author will explain everything you need to know about type-hinting in PHP, which will help you achieve this goal. We’ll begin by exploring what type-hinting in PHP is, and then author will show you how to start using it in your applications. By Adebayo Adams.

Type-hinting means explicitly stating the expected type of declarations in your code. This allows you to enforce specific types in your code. PHP allows you to type-hint function parameters, return values, and class properties to write more robust code.

Further in the article:

  • Different types in PHP
  • Type-hinting function parameters
  • Strict types
  • Type-hinting function returns
  • Void returns
  • Static returns
  • Nullable types
  • Nullable return types
  • Union types
  • Type-hinting class properties
  • Using the callable type
  • Eliminate type errors

… and more. The PHP version 8 update introduced union types, which allow you to specify more than one type for a single declaration. For example, a function that formats prices should be able to take an int or a float. Type-hinting your code makes it significantly easier to document your code as a solo developer or when working in a team. Excellent read!

[Read More]

Best UX practices for search inputs

Categories

Tags search ux app-development web-development

The search box. Where would we be without it? Search is a powerful tool, and as one of the most common elements that we interact with on a daily basis, search input usability is an important consideration. By Dawson Beggs.

This article discusses how search elements can be designed to provide better experiences:

  • Don’t make users search for the search box
  • Input fields should be visible
  • Use placeholder text
  • Use a magnifying glass icon
  • Provide a button to submit search queries
  • Consider the search icon position

… and more. Autocomplete can improve the experience for users by helping them to type less, avoid spelling mistakes, and decrease the level of overall effort required to reach a result. Excellent advice!

[Read More]

Building microservices using Terraform, Ansible, Docker, Docker Compose, and Github Actions

Categories

Tags devops ansible app-development cloud

This blog post explores the benefits of microservices in building a scalable and maintainable application. By Wamaitha.

Infrastructure as code(IAC) is a methodology for deploying, configuring, and managing servers. Typically when you need to host your application on the internet, you create VMs on hosting providers like Linode, Vultr, DigitalOcean, AWS, or GCP. Once the VMs are up, you either SSH directly into the instance or use a CICD workflow to get your application running on the VM. Using IAC tools, we can automate this process. This guide will cover Terraform, Ansible, Docker, and GitHub Actions to build microservices.

The content of the article covers:

  • Tools used
  • Project Overview
  • Prerequisites
  • Installations
  • Microservices
    • Dad Jokes as a service.
    • Kanye as a service
    • MongoDB as a service
    • My Jokes Microservice
    • React Microservice
    • Run all the microservices
  • Provisioning VM with Terraform
  • Automating deploys with Ansible
  • Using Github Actions as the Controller Machine

The final step runs the ansible playbook, passing the private key stored in the SSH_PRIVATE_KEY secret as an argument to the –private-key flag. This step also reads the secrets stored in the repository and appends them to the .env file in the microservices directory. Finally, the ansible-playbook command is run to execute the playbook. Nice one!

[Read More]

Safety Check! How to keep your iOS devices stalker free

Categories

Tags ios miscellaneous app-development how-to

Perform an emergency safety check to quickly disconnect apps and people from your iPhone. By Shubham Agarwal.

Apple makes it easy for anyone to offer their close friends and family access to their iPhone. You can set people as your emergency contacts, keep them informed of your whereabouts, and more. The same goes for your installed apps, many of which have permission to read a ton of your data and access your sensors like your location, photos, camera, microphone, and contacts.

You will get detailed information about:

  • How to use Safety Check on iOS 16
  • Review people and apps connected to your iPhone
  • Perform an emergency data reset on your iPhone

There are two ways to use Safety Check on your iPhone. You can either review the people and apps connected to your device one by one or reset all of them in a single go with the emergency option. Good read!

[Read More]