Photo by Campaign Creators on Unsplash

Problem: Update query with nested attributed. I was receiving ConditionalCheckFailedException when the nested attribute was null.

After some research I figure out a workaround to be able to set nested attributes even if the root attribute is null.

Before

const updateParams: DocumentClient.UpdateItemInput = {
TableName: tableName,
Key: { keyName },
ConditionExpression: "#storeNumber = :storeNumber",
UpdateExpression: “SET #storeStatus.#status = :newStoreStatus, #storeStatus.#updatedOn = :newStatusUpdatedOn”,
ExpressionAttributeNames: {
"#storeNumber": "storeNumber",
"#storeStatus": "storeStatus",
"#status": "status",
"#updatedOn": "updatedOn",
},
ExpressionAttributeValues: {
":storeNumber": storeNumber,
":newStoreStatus": "online",
":newStatusUpdatedOn": "2021-04-29T13:29:00.9360188+00:00",
},
},
};
const updateParams: DocumentClient.UpdateItemInput = {
TableName: tableName,
Key: { keyName },
ConditionExpression: "#storeNumber = :storeNumber",
UpdateExpression: "SET #storeStatus = :newStoreStatus",
ReturnValues: "UPDATED_NEW",
ExpressionAttributeNames…

TypeScript is a superset of JavaScript, meaning all valid JavaScript code is also valid TypeScript code. As the name says Type+Script, adds optional static typing to the language.

TypeScript saves you time catching errors and providing fixes before you run code, which makes this a great framework to write your lambda function.

Well, for me is a must use TypeScript instead of pure JavaScript.

Hands-on coding

To add TypeScript to an existing Create React App project, first install it:

npm install — save typescript @types/node @types/react @types/react-dom @types/jest

Rename each file from .js to .tsx and restart your development server!

Generate TypeScript configuration

npx tsc…


There are some strategies that you can adopt to deploy your application, the deployment strategies depend on the business model and organization goal.

Well, first of all, when you are choosing your deployment strategy, you should take into consideration the following topics:

  • Deployment time;
  • Zero Downtime (Yes/No);
  • Rollback;
  • Extra costs;
  • Reduction in current capacity;

Deployment strategies

Updates the application version without replacing any infrastructure components. Basically, all the instances are stopped, and then the latest version is installed.

Disadvantages

  • Application availability is affected;
  • Rollback (You need to install again the old version);


Photo by Joshua Aragon on Unsplash

Here you are going to learn how to initialize, configure, deploy and host an AWS Amplify Console, served via Amazon CloudFront to host static resources for your web application.

Architecture Overview


In this article, you are going to learn the best alternative for you to build and host your website. There are at least 4 alternatives for hosting your application on AWS. There is no correct one, it depends on your final goal.

Photo by Glenn Carstens-Peters on Unsplash

This is the easiest way to launch a low-cost website using AWS.

Typically the best for low to medium traffic websites with multiple authors and more frequent content changes, such as marketing websites, content websites, or blogs.

Basically, you build your website just with a few clicks, you choose the platform (Linux or Windows), SSD storage, a blueprint…


AWS Lambda does not natively support TypeScript. In this article, you are going to learn how to create a Typescript Lambda.

TypeScript is a superset of JavaScript, meaning all valid JavaScript code is also valid TypeScript code. As the name says Type+Script, adds optional static typing to the language.

TypeScript saves you time catching errors and providing fixes before you run code, which makes this a great framework to write your lambda function.

So you write code in TypeScript and then it’s converted in Node.js.

A Node.js lambda has better spin-up times than C# or Java.

Let's go for what…


You can use your own domain with Amazon for authentication. For this tutorial, I am going to use an external domain and not use route 53.

So, basically, you can set up a custom domain using route 53 or use another external provider for DNS management. As I already have a purchased domain and I was using another external provider for DNS management, it does not make sense to start all over again using route 53, so we are going to set up our Cognito with another external provider. I believe there are a lot of people in my situation.

Strategy


Microsoft already has a setup installer extension, that will add a new project type to Visual Studio, and then you can configure your setup.

Step by Step

1 — Open your solution on Visual Studio;

2 — Add a new project;

3 — Select Setup Wizard (Please install the extension first);

Add new project Wizard

4 — Set a project name;

5 —CLick create button;

6 — A File System (Setup) should appear;


If you missed the previous article about how to secure your .net desktop application, please check this link. There you will find why is so important to obfuscate your software.

Step by step

1 — Open your solution on Visual Studio or create a new one;

2 — Change the build solution to Release mode;

3 — Signs the assembly with a strong name;

  • Open project on Visual Studio;
  • Select the project, right-click and properties;
  • Go to the Signing tab;
  • Check Sign the assembly;
  • Select New;
  • Insert a key file name (do not insert a password, Dotfuscator do not use key files with…

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