Important: This tutorial assume you already has installed and know how to use, aws cli, kubectl and eksctl
eksctl create cluster --region us-west-1 --name express-api --version 1.25 --fargate
Note: This command create a stack in cloudformation
# Build stage | |
from node:18-alpine3.17 as build | |
WORKDIR /app | |
# Copy whole project | |
COPY ../../ . | |
# Install dependencies | |
RUN yarn install |
#======================# | |
# Without dependencies # | |
#======================# | |
#!/bin/bash | |
# This script will export all SSM parameters under a given path as environment variables | |
# It will also append the export statements to the ~/.bashrc file so that they are available on future logins | |
# Set some parameters |
Important: This tutorial assume you already has installed and know how to use, aws cli, kubectl and eksctl
eksctl create cluster --region us-west-1 --name express-api --version 1.25 --fargate
Note: This command create a stack in cloudformation
const dns = require('dns'); | |
const ips = ["XX.XX.XX.XX", "XX.XX.XX.XX"]; | |
exports.handler = (event, context, callback) => { | |
// context.callbackWaitsForEmptyEventLoop = false; | |
let body = JSON.parse(event.body); | |
var done = function(code, message) { | |
let response = { | |
"statusCode": code, | |
"body": JSON.stringify(message) | |
}; |
'use strict'; | |
var AWS = require('aws-sdk'); | |
var apigateway = new AWS.APIGateway(); | |
var docClient = new AWS.DynamoDB.DocumentClient(); | |
function generateApiKey() { | |
return 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'.replace(/[x]/g, function(c) { | |
var r = Math.random() * 36 | 0, | |
v = c == 'x' ? r : (r & 0x3 | 0x8); | |
return v.toString(36); |
const AWS = require('aws-sdk'); | |
const EC2 = new AWS.EC2(); | |
exports.handler = (event, context, callback) => { | |
const done = function(response) { | |
callback(null, response); | |
}; | |
const message = JSON.parse(event.Records[0].Sns.Message); | |
console.log(message); | |
const describeAddressesParams = { |
PORT=4000 | |
API_PROTOCOL=https | |
API_HOST=localhost | |
API_PORT=4001 | |
API_VERSION=v1 |
// SPDX-License-Identifier: MIT | |
pragma solidity >=0.8.0 <0.9.0; | |
contract RandomTestContract{ | |
string text; | |
function write(string calldata _text) public{ | |
text = _text; | |
} |
const ethSigUtil = require("@metamask/eth-sig-util"); | |
const address = '0x0'; | |
const message = 'Hi I am 0x0'; | |
const signature = '0x0'; | |
let checkSignature = (data, signature) => { | |
const params = { | |
data, | |
signature |