Skip to content

Instantly share code, notes, and snippets.

View kabootit's full-sized avatar

Kabootit kabootit

  • Washington D.C.
View GitHub Profile
import * as R from 'ramda';
import { Request, Response } from 'express';
import { StatusCodes } from 'http-status-codes';
import { ExternalAccountNature, ExternalAccountOwnerType } from '../../../lib/cft/externalAccount/types';
import { CFTUrl } from '../../../lib/cft/apiUrls';
import * as CFT from '../../../lib/cft';
import mapErrorMessageToFailureReason from '../../helpers/mapErrorMessageToFailureReason';
import { isLeadOwnedBankAccount, validateBankAccount } from '../../../lib/cft/enrollClient/helpers/enrollmentOperations/createAndValidateBankAccount';
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: >
ts-sam-test
Sample SAM Template for ts-sam-test
# More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst
Globals:
Function:
Timeout: 10
Runtime: ruby2.7
require 'json'
require 'aws-sdk-dynamodb'
require 'mail'
require 'aws-sdk-ses'
def respond(event:, context:)
event['Records'].each do |record|
ses_client = Aws::SES::Client.new(region: 'us-west-2')
db_client = Aws::DynamoDB::Client.new(region: 'us-west-2')
# Any import from src or main should be done inside setup_and_run function
# importing them here causes mock.patch to fail
import asyncio
import os
from typing import List, TypedDict
from unittest.mock import AsyncMock
from fastapi import testclient
import pytest
from unittest import mock