AWS CDK 101 using TypeScript

ko-fi


๐Ÿš€ AWS CDK 101 ๐ŸŽก setup and bootstrapping

In this article, we will start from the very basics of cdk, starting from bootstrapping cdk toolkit and why it is essential before we deploy our stack and I will try to summarise my understanding in this.

๐Ÿ”— dev to @aravindvcyber


๐Ÿ„ AWS CDK 101 ๐ŸŒธ - lambda & CDK watch

In this article let us build necessary components which we need to setup a basic lambda stack which will be used in later in subsequent articles to act us a web hook taking some data into our ecosystem from other demo projects.

๐Ÿ”— dev to @aravindvcyber


๐Ÿ“ก AWS CDK 101 โ›„๏ธ - API Gateway construct usage, throttle, quota, usage plans, api keys

In this article let us introduce an API Gateway in front of our basic lambda function which we have created in our last article above listed above.

๐Ÿ”— dev to @aravindvcyber


โ›ณ AWS CDK 101 ๐ŸŠ - Building Constructs and Simple counter store in dynamodb

In this article, let us introduce a new construct which would help us in tracking the invocation of the simple lambda function which we have created in our last article above and let us name this event counter.

Here we will also use dynamodb table to setup a simple counting store besides a general overview about constructs.

๐Ÿ”— dev to @aravindvcyber


๐Ÿ‚ AWS CDK 101 ๐ŸŒบ - Jest testing with TDD approach for our construct

In this article, let us introduce writing jest test cases that would help us in testing our construct which we have created in our previous article above.

๐Ÿ”— dev to @aravindvcyber


๐Ÿšฃโ€โ™‚๏ธ AWS CDK 101 ๐Ÿฆ‹ - CodeCommit, CodePipeline and CodeBuild

In this article, let us introduce writing a simple codepipeline i.e. CI/CD setup for our solution. This would help us in deploying the stack, to various environments, which we have created in our previous CDK article

๐Ÿ”— dev to @aravindvcyber


๐ŸŽ  AWS CDK 101 - ๐Ÿš„ Cloudwatch Metrics Filter with Dimensions and Alarms connected to ChatOps

In this article, let us introduce observability and monitoring into our stack. This we could achieve by using Cloudwatch logs and building our custom dashboard and widgets into it by setting alarms to continuously log and monitor our stack in a single place. Additionally, we could use the cloud watch events to trigger an action or set Cloudwatch alarm to trigger a specific notification to the appropriate monitoring channels. In this demo, we will wire up our alarm to send a message to our private slack channel as follows.

๐Ÿ”— dev to @aravindvcyber


๐Ÿ’– AWS CDK 101 - ๐ŸŒ๏ธโ€โ™€๏ธ Scalable event-driven processing using Eventbridge and SQS

In this article, let us refactor our existing counter construct which is triggering the current synchronous backend processor into an event-driven scalable solution by introducing an event bridge that pushes new messages into the dedicated queue which can be processed by a backend processor which writes the data to dynamodb.

๐Ÿ”— dev to @aravindvcyber


๐Ÿ‡ AWS CDK 101 - ๐Ÿญ StateMachine and StepFunctions replacing our SQS based lambda trigger

In this article, let us refactor our previous event rule which targets messages to a queue that triggers lambda directly into a new rule which will invoke a state machine, which will, in turn, invoke our lambda as a step function.

๐Ÿ”— dev to @aravindvcyber


๐Ÿฌ AWS CDK 101 - ๐Ÿ”ฌ Adding Queue to buffer our stepfunction directly invoking lambda

In this article, let us refactor our previous stepfunction which directly invokes our lambda function by adding a similar queue that triggers lambda indirectly with a batch size limit. This could help us achieve better optimization in lambda concurrency like one in our previous article.

๐Ÿ”— dev to @aravindvcyber


๐Ÿคก AWS CDK 101 - ๐Ÿคพโ€โ™‚ Using layers in Lambda functions and saving JSON to S3

In this article, let us refactor our previous stepfunction which directly invokes our lambda function by adding a similar queue that triggers lambda indirectly with a batch size limit. This could help us achieve better optimization in lambda concurrency like one in our previous article.

๐Ÿ”— dev to @aravindvcyber


๐Ÿ“ฑ AWS CDK 101 - ๐Ÿ‘ฏ Fetching JSON from S3 through stepfunction

In this article, let us refactor one of our previous step functions which invoked lambda which puts records to dynamo using full message from the event data, into one which can read message data from s3 with keys during the event data. Also, this is a direct follow-up to my previous article mentioned above.

๐Ÿ”— dev to @aravindvcyber


๐Ÿš AWS CDK 101 - ๐Ÿฌ Fetching JSON from dynamodb vs S3 through stepfunction

In this article, let us refactor our previous step functions which were using S3-based storage to retrieve the JSON data for processing into a more performant dynamodb-based one. Both have their advantages compared to another one, so we have to choose them wisely based on the expected turnaround.

๐Ÿ”— dev to @aravindvcyber


๐Ÿ‰ AWS CDK 101 - ๐Ÿ‡ Using batched dynamodb stream to delete item on another dynamodb table

In this article, let us add a new async batch integration to our message dynamodb table which will help us to delete the processed records from the staging dynamodb table.

๐Ÿ”— dev to @aravindvcyber


๐ŸŒบ AWS CDK 101 - ๐Ÿš‚ Dynamodb streams triggering batch deleteItem on dynamodb table

In this article, let us refine my previous article which demonstrated making use of a batch of dynamodb stream to delete items from another table. Here we convert the simple deleteItem action into a batchWrite action, which has great advantages.

๐Ÿ”— dev to @aravindvcyber


โ˜”๏ธ AWS CDK 101 - โ›…๏ธ Dynamodb streams triggering batch deleteObjects S3

In this article, let us add a simple integration making use of dynamodb streams to perform batch delete objects in S3 which we have created in our earlier articles, and understand how it is more performant than a single S3 delete object call.

๐Ÿ”— dev to @aravindvcyber


๐Ÿ’ฅ AWS CDK 101 - ๐Ÿฃ Event source mapping with Cfn property override

In this article, we will be making a simple change in our CDK stack which eventually helps us with more optimization and control in processing streams. The high-level configuration which we have made to connect dynamodb streams event source with lambda in the last two articles will be optimized using event source mapping L2 construct with simple override with its cfn L1 construct as well.

๐Ÿ”— dev to @aravindvcyber


๐Ÿ„ AWS CDK 101 - ๐Ÿฒ GraphQL using AppSync with dynamodb

In this article, we will be introducing a data access layer as a wrapper on top of our dynamodb table. Here specifically we have chosen graphql using AWS appsync to perform basic list items and get an item from dynamodb.

๐Ÿ”— dev to @aravindvcyber


๐Ÿคนโ€โ™‚ AWS CDK 101 - ๐Ÿ„ GraphQL Mutations using AppSync with dynamodb

In this article, we will be introducing a data access layer as a wrapper on top of our dynamodb table. Here specifically we have chosen graphql using AWS appsync to perform mutations in our dynamodb table.

๐Ÿ”— dev to @aravindvcyber


๐Ÿ‰ AWS CDK 101 - ๐Ÿฅ’ Cross region putEvents across accounts using Eventbridge for Event-Forwarder project

In this article, we will be using the default event bus only since we are trying to source the cloud formation events for the above-mentioned project. And future use forward events from other regions or accounts to this event bus.

๐Ÿ”— dev to @aravindvcyber


๐Ÿฌ AWS CDK 101 -๐Ÿ  Send message across accounts using SNS topic and SQS

In this article, let us make one more addition to our stack by retrieving the dlq messages from the remote stack across regions to our common processor region using sns and sqs.

๐Ÿ”— dev to @aravindvcyber


๐Ÿ‹ AWS CDK 101 - ๐Ÿฆ‹ SAM local to test and debug lambda function

In this article, we will be setting up sam local to perform integration test and debugging of the lambda. We need to get this since after performing numerous iterations with cdk deploy and validating the cloud watch logs, I wanted to find something which i could leverage to be capable of find the bugs prior to release.

๐Ÿ”— dev to @aravindvcyber aws-cdk-101-sam-local-to-test-and-debug-lambda-function-1afj


๐Ÿ’ฅ AWS CDK 101 - ๐Ÿ’ซ Dynamodb Local setup and integrating with sam invoke

In this article, we will setup Dynamodb local which will not only be a cool integration setup to inspect in locally, but also it can help to understand the dynamodb data model using NoSQL workbench and various other data modelers.

๐Ÿ”— dev to @aravindvcyber aws-cdk-101-dynamodb-local-setup-and-integrating-with-sam-invoke-527f


ko-fi