AWS Down 9/28/2022 Sometimes AWS gets errors. Now the Lambda page doesn't work. It's been pretty interesting. Our us-west-2 didn't work now, so we switched to us-east-1 and it works fine now. So multi-area deployment matters. In the real working environment. AWS 2022.09.29
Host a static website on S3 using AWS CDK If you’ve built a website, whether for personal or commercial use, you probably researched web hosting options. Lots of companies provide this kind of services. In this post, we will build a very simple website, and host it on Amazon S3 (Amazon storage service), which can be used to host a static website (a site that contains static content and client-side scripts). The interesting part is that .. AWS/CDK 2022.09.24
AWS CloudFormation Versioning The process of doing it = Creat lambda function version: - Default >> no versioning AWS/CDK 2022.06.29
[Fixed] CDK parameter doesn't read from parameter using ASL ASL = Amazon States Language (JSON-based) When I tried to deploy by copying some of the features of yml file (CloudFormation Template), the step function workflow kept failing because CDK is not a level 1 construct where I have to specify everything. CDK performs those parameters or input by itself. I just needed to specify some parts that will be required such as the DynamoDB Table name. Then, .. AWS/CDK 2022.06.18
CDK use existing CloudFormation Output Value in AWS Server + StepFunction import * as cdk from "aws-cdk-lib"; import * as lambda from 'aws-cdk-lib/aws-lambda' import * as sfn from 'aws-cdk-lib/aws-stepfunctions' export default class CdkStack extends cdk.Stack { constructor(scope?: Construct, id?: string, props: StackProps) { super(scope, id, props); // Get the CloudFormation Output value that is already existing in AWS Server with 'Export name' in Output values const .. AWS/CDK 2022.06.17
AWS CDK Basics Initalize the project Before writing any code for our CloudFormation to AWS CDK migration, we should initialise our AWS CDK project to get started. In a command-line shell, create a directory to contain the project, and go to that directory: mkdir my-cfn-cdk-migration cd my-cfn-cdk-migration In this directory, we will use the CDK command-line tool to initialise a project for Typescript. We use t.. AWS 2022.06.17
AWS CloudFormation vs AWS Cloud Development Kit(CDK) There are a few areas that may provide benefits: It is easier to build and use interfaces at a suitable level for a use case, rather than being forced into low-level details for pretty much everything with CloudFormation. Better default tooling. AWS CDK has a command-line tool that makes it rather easy to deploy, update, check for changes and delete Cloud infrastructure stacks. The default tooli.. AWS 2022.06.17
Tip: Connecting to localstack S3 using the JavaScript AWS SDK v3 I had some issues getting the v3 AWS SDK for JavaScript to communicate with localstack S3, but I found a solution! With the V2 JS SDK, the configuration object for the S3 client looks like: { "region": "eu-west-1", "endpoint": "http://localhost:4566", "s3ForcePathStyle": true } The last field tells the sdk not to use .hostname style connections, and instead puts the bucket in the path. For local.. AWS/Storage and Databases 2022.06.09
[AWS S3] @aws-sdk/s3-request-presigner This package provides a presigner based on signature V4 that will attempt to generate signed url for S3. Get Presigned URL with Client and Command You can generated presigned url from S3 client and command. Here's the example: JavaScript Example: const { getSignedUrl } = require("@aws-sdk/s3-request-presigner"); const { S3Client, GetObjectCommand } = require("@aws-sdk/client-s3"); const client =.. AWS/Storage and Databases 2022.05.07