Recently Microsoft announced a product called CoPilot which works as an AI pair programmer for developers. Microsoft acquired GitHub in 2018 and I think this was probably by far the smartest move by this company in a long time.

With GitHub, Microsoft automatically got access to huge set of code written by millions of developers and this knowledge-base is of immense value. This codebase gives enough data to fine-tune a bit of code that can differentiate between good and bad code. Not only that — they have gone one step further. …

When deploying serverless you have a few options. You have SAM which does wrap the complexity of deploying code in serverless microservices architecture easily. However it comes with different set of issues. This post is to discuss two options and strategies you could use to deploy lambdas in your environments.

Use SAM

So the way SAM does things is by creating cloudformation based on supplied parameters and manifests and deploys the lambdas. All you need to do is create a build file with sam commands. …

S3 replication and object ownership transfer can be used nicely for DevOps promotions to higher environments.

We have used this feature instead of messy S3 bucket policies etc.

1. Ease of Integration

Using step functions makes it really easy to wire up lambda or other microservices. The biggest advantage comes from the fact that you are relieved of most of the plumbing work. With a simple declarative JSON you just wire up all of the microservices instead of having to manually configure SQS, SNS and IAM role amends for each of the lambdas to work with these services.

Here is what you would normally need to wire the microservices up. You would create and manage each of the resources below by hand. This requires good amount of time investment.

  • Lambdas
  • SNS
  • SQS

If you have a number of microservices to be promoted and deployed using Code Pipeline, here is a trick that you might find useful.

Pre-requisites

  • Lambda functions already created.
  • Build artifacts for Lambdas built and stored in S3 ready for promotion.
  • jq — json query tool
  • AWS S3
  • AWS Code Pipeline
  • AWS Code Build

JSON config

test-manifest.json file to map all versions for each microservice that needs promotion.

[
{
"function_name" : "$environment-microservice-name-1",
"version" : "315edca3b24c3a313d628b9550076220ee057bd0",
"zip_key" : "microservice_1/lambda_microservice_1-"
},
{
"function_name" : "$environment-microservice-name-2",
"version" : "4845f0ceccba553a84436a6a432889b333d6509d",
"zip_key" : "microservice_2/lambda_microservice_2-"
}
]

Lambda artifacts

The naming structure I followed was as follows

s3://<dev-artifacts-bucket>/<microservice_name>/lambda_<microservice_name>-<COMMIT_SHA>.zip

for example…

When you use step functions with lambda microservices, it may be necessary in some cases to execute specific versions of lambdas. In short, lambda microservices with polymorphic behaviour.

This kind of requirement could be common in Machine Learning. This bit I am not entirely sure as I am still new to ML. However, this problem is interesting as the alternative would require you to run different instances of same lambdas in your environment to cater to different sources. We have come across such a requirement where the source dictates which algorithms to trigger in a flow.

The algorithms are mostly…

So the intention of this blog is to de-clutter AWS for business audience. I had some feedback from some of our clients that they really get overwhelmed with all the information and jargon thrown at them.

What is AWS?

It is infrastructure hosted by Amazon to run your software applications and to store your data.

Why use AWS?

Here are a few reasons :-

  1. Buying hardware and keeping them up to date is expensive.
  2. Running complex large scale applications which is the norm nowadays is difficult on premises
  3. Overall cost of running is lower in AWS cloud as you only pay for what you use instead…

The dynamics of learning and application of it has completely changed in the 21st century. Years ago a wise man had said to me — “always keep yourself in learning mode”. In the bestseller Robert Kiyosaki has mentioned that the ability to unlearn old stuff and learn new stuff will dictate your success in this century.

Fundamental things have changed in past couple of decades :-

  1. Just in time education did not exist — In old days you would get a degree and you would mostly use what you had learnt all your life. You would gain experience but most…

In most AWS deployments it is common to encounter a scenario where you may need name resolution across VPCs or between on-prem and VPCs.

This article highlights the nuances of using a few patterns for certain use cases.

Before we begin, in case you are not familiar, any DNS query from any of the instances within a VPC would go via the +2 address in that VPC subnet. For example if the subnet range was 10.2.0.0/24 then the DNS queries will go via 10.2.0.2 by default.

THE THING SHADOW

Courtesy John Carpenter’s horror movie “The Thing”

When you read “The Thing” it always sounds scary because it reminds of the horror movie. The Thing Shadow sounds similar. I was amused when AWS called “devices” as “things”. Hopefully it will not put you off from reading further. Apologies for the dramatic poster! The Thing Shadow is not as scary.

In part 1 we discussed how to get the message from the device across to AWS IoT core and vice versa. In this blog we will delve deeper into the concept of device shadows.

In any IoT system you would have devices sending stream of…

Siddharth Malani

AWS Cloud Architect, AWS Partner Ambassador for MODIS Consulting. 4 x AWS Pro certs, Terraform Certified

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store