AI tools I'm currently using

AI tools I'm currently using

I saw a tweet about AI tools a twitter user is using and it looked familiar. I was using most of these tools too.

I’ll share my quick thoughts on each of the AI tools I’m currently using. I’ll try to mention my favorite ones first.

  1. ChatGPT
    The holy grail tool that I use for brainstoring, learning, + so much more. This probably doesn’t need any explanation.

  2. Midjourney: Midjourney lets me generate images based on text. Super useful to use the generated art in sides, videos, blogs and more

  3. Eleven Labs: Gives real sounding text-to-speech output.

  4. Heygen.io: Lets me animate images by supplying audio. Syncs lips to the audo. Super useful. Haven’t tried the APIs yet but am looking to explore that next.

  5. RunwayML: it’s image to Video or text to video. The new Image to video in particular is very powerful.

  6. Canva: Great for web based graphic creation. I mostly use it for youtube thumbnails, blog graphics and social media banners

  7. Github copilot: I’m probably going to stop paying for github copilot and just use ChatGPT plus for code assist.

  8. Grammarly

    • I bought grammarly subscription before ChatGPT became available. Now I use ChatGPT to fix my english and writing. Grammarly is still better in some aspects but I don’t want to buy one more subscription without a clear value proposition.
  9. Adobe Creative Suite( Photoshop, After Effects + more)

  • I got this to have access to the photoshop generative fill but frankly don’t use the suite much. I have been looking at using the video making
Ramble 7/13/23 - My Experiences with Blockchain and AI

Ramble 7/13/23 - My Experiences with Blockchain and AI

I love both blockchain and AI, and I have delved deep into both of these fascinating technologies. Currently, I find myself captivated by the world of AI.

AI has a clear advantage when it comes to day-to-day applications. It is more readily applicable, whereas blockchain often requires users to learn new concepts and technologies. Convincing traditional art collectors to buy NFTs or persuading social apps to incorporate cryptocurrency for payments and tips requires a real resonance.

Existing businesses were initially skeptical about the potential of blockchain to enhance their operations. The magic of AI, on the other hand, has been witnessed by many, while the magic of blockchain has only been seen by a very few.

Digital artists have found a good platform to sell art with NFTs, and there are now several use cases of blockchain enhancing finance or making certain kinds of transactions easier than before.

However, blockchain has not made the case for a mainstream app. On the other hand, AI is right there at the forefront of the technological revolution. ChatGPT had 100 million+ users just two months after launch.

Why the AI bubble is better than the Blockchain bubble:

Broad Applicability: AI has applications in virtually every industry. Healthcare, finance, transportation, education, entertainment, and many more sectors are actively integrating AI technology into their operations. Blockchain, while revolutionary in its potential, primarily pertains to industries with significant data security and transactional needs like finance, supply chain, and legal contracts.

Research and Development: There is extensive ongoing research in the field of AI, with major breakthroughs happening regularly. While blockchain also receives research attention, AI has been around for a longer period, and its research domain is comparatively broader and more mature.

Integration with Existing Systems: AI technologies can often be integrated with existing systems, improving their capabilities. Blockchain often requires the creation of new systems or significant alterations to existing ones.

Regulatory Environment: While both AI and blockchain face significant regulatory hurdles, those faced by blockchain, particularly in the financial sector, can be especially steep due to concerns over fraud, money laundering, and financial stability.

Did you notice? The four points above were written by ChatGPT.

I’m still hopeful that blockchain will enhance certain areas of life, like being able to hold game collectibles in NFTs and being able to sell my hard-earned upgrades in a game via NFT transfers.

In summary, I love both AI and blockchain, but AI has proven to be more applicable in my experience.

AI Image Generation

AI Image Generation

DALL.E 2.

My first rodeo with AI image generation was with OpenAI DALL.E 2. I was blown away by DALL.E’s output. My prompt: “a Kathmandu street in the mt Everest region. There’s a yak and a yeti in the frame. Mountains are visible in the background.” gave me some realistic looking scenes from Nepal.

Stable Diffusion

Currently, my go-to for AI Image generation is using a MacOS app called DiffusionBee that creates images using Stable Diffusion. Stable Diffusion is a deep learning, text-to-image model released in 2022.

DiffusionBee: https://diffusionbee.com/

Midjourney

Midjourney is probably the best text-to-image generation AI progrom out there as of this writing. I have only used it a few times. The only way to generate image is to join their Discord Server and currently only paid subscribers can generate images. But the images are absolutely incredible. Cinematic scenes, fashion ideas and much more have been created with Midjourney. Here’s one of the twitter threads showing the power of Midjourney Version 5.1


I have a few to-do list items in terms of what I want to do with text-to-image generation. I’ll be sharing more updates on this blog and on Twitter. So follow me there @ravsau

AWS CDK workshop troubleshooting notes

AWS CDK workshop troubleshooting notes

CDK is a new way to manage infrastructure as code(IaC). It looked interesting but I never got to work with CDK much. I recently swithced my roles to become a software engineer at Amazon and we heavily use CDK for our CI/CD pipelines. So I need to practice and get better at using CDK. While doing this CDK pipeline workshop(link below), I ran into a bunch of issues. Here are my troubleshooting notes.

https://cdkworkshop.com/20-typescript/70-advanced-topics/200-pipelines

Issue 1: This CDK CLI is not compatible with the CDK library used by your application. Please upgrade the CLI to the latest version. (Cloud assembly schema version mismatch: Maximum schema version supported is 8.0.0, but found 9.0.0)

Uninstall the CDK version:

npm uninstall -g aws-cdk

Install specfic version which your application is using. For ex: CDK 1.158.0

npm install -g aws-cdk@1.158.0

Reference: https://stackoverflow.com/questions/66565550/how-to-solve-cdk-cli-version-mismatch


Issue 2: When trying to push code to codecommit you get this error error: src refspec main does not match any

Check the local branch name. If you’re trying to push to the main remote branch and your local branch is master you’ll run in to this error. Fix this by renaming the local branch to main and push to remote after that.

git master -m main
git push


Issue 3: TS2304: Cannot find blob

add the dom entry to the lib in tsconfig.json. Your tsconfig file should look like this

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
"compilerOptions": {
"target":"ES2020",
"module": "commonjs",
"lib": ["es2020", "dom"],
"outDir": "dist",
"resolveJsonModule": true,
},
"exclude": [
"coverage",
"node_modules",
"dist",
"tests"
]
}

Reference: https://stackoverflow.com/a/66275649

Tag Inheritance - A valuable CloudFormation feature

Tag Inheritance - A valuable CloudFormation feature

October 31, 2020

Tagging is a crucial aspect of Management and Governance of AWS Accounts of any individual or organization.

Here are some advantages of tagging your AWS resources:

  1. Organize AWS resources - Filter all resources with a particular tag
  2. Use tags for Cost Allocation - what Application costs the most?
  3. Use tags for automation - opt/in out your ec2 instances to stop in evenings/weekends
  4. Use tags for Access Control - Restrict EC2 API calls in resources tagged as Production

I got these four advantages from an AWS Documentation page. Click here to read more.

Now we have established that tagging is useful. Let’s look at how Cloudformation allows Tag Inheritance to simplify the tagging of resources in a stack.

In addition to any tags you define for an individual resource, AWS CloudFormation automatically creates the following stack-level tags with the prefix aws: :

  • aws:cloudformation:logical-id
  • aws:cloudformation:stack-id
  • aws:cloudformation:stack-name

All stack-level tags, including automatically created tags, are propagated to resources that AWS CloudFormation supports.

Reference:
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html

This feature makes tagging all your resources extremely simple when using Cloudformation to provision resources. Apply tags once at the stack level, and all the tags propagate to the supported Stack resources.

Let’s test this out!

Lab Template( Also available as a separate file on this folder). This template will only work in the US-east-1 region due to hardcoded AMI value

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
---
AWSTemplateFormatVersion: "2010-09-09"
Description: Create multiple AWS resources to test Cloudformation Tags propagation.

Resources:
SimpleInstance:
Type: AWS::EC2::Instance

Properties:
InstanceType: t2.micro
ImageId: ami-8c1be5f6

SimpleInstance1:
Type: AWS::EC2::Instance

Properties:
InstanceType: t2.micro
ImageId: ami-8c1be5f6

S3Bucket:
Type: AWS::S3::Bucket
Properties:
AccessControl: Private


2 Methods of deploying this template:

  1. You can use this template and add tags to the Cloudformation Stack from the AWS Management Console.
    OR
  2. You can use the AWS CLI.

Steps:

  • Download the template above ( also available as a separate file on this folder)

  • We will use AWS CLI way of adding tags to the Stack and verify the propagation of the tag to the individual resources. Make sure the template file name in the CLI command matches the Cloudformation template file name.

aws cloudformation create-stack --stack-name cfn-tags-test --template-body file://tags-test-multiple-resource.yaml --tags Key=ProjectID,Value=53 Key=Team,Value=Security


You can verify if Cloudformation propagated tags to each resource by using the AWS Management Console. This image below shows how the tags section looked for the S3 bucket created with the above CloudFormation template.

AWS Console Screenshot

Cleanup:
Make sure you delete your CloudFormation Stack to stop incurring charges.

aws cloudformation delete-stack --stack-name cfn-tags-test

Let me know if you have any questions.

CloudFormation and Soccer connection

October 31, 2020

I’m a soccer fan. When I first heard about CloudFormation this image was something that came to my mind.

After learning a few intermediate CloudFormation components like parameters and mappings and custom resources, this is how I think of CloudFormation now.

Some analogies between CloudFormation and Soccer:

  • In Soccer, to play a game, all you need is a ball. Similarly in Cloudformation, to launch a stack, the only section required in a template is a resources section with at least 1 resource.

  • Stack updates are like player substitution( or even a ball substitution) in a professional Soccer game

  • CloudFormation has certain limits just like a professional soccer game. The new per template limits for the maximum number of resources is 500 (previously 200), parameters is 200 (previously 60), mappings is 200 (previously 100), and outputs is 200 (previously 60). This is similar to max numbers of players in a soccer game ( 11 per side), max number of substitute on bench( 7), max allowed substitution per game (3).

I’ll add more analogies in the future when they come to me. If you have any suggestions, let me know in the comments.

By the way, you can read about the new limits for Cloudformation here which lets you work with more resources/parameters/outputs per template.

Hello Cloud World

This is my Cloud blog. Hello Cloud World!