This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | Initializing the backend... | |
| 2021/11/01 17:53:38 [DEBUG] New state was assigned lineage "cda351b1-59de-0f34-81e8-65124caba103" | |
| 2021/11/01 17:53:38 [WARN] Log levels other than TRACE are currently unreliable, and are supported only for backward compatibility. | |
| Use TF_LOG=TRACE to see Terraform's internal logs. | |
| ---- | |
| 2021/11/01 17:53:38 [INFO] AWS Auth provider used: "EnvProvider" | |
| 2021/11/01 17:53:38 [DEBUG] Trying to get account information via sts:GetCallerIdentity | |
| 2021/11/01 17:53:38 [DEBUG] [aws-sdk-go] DEBUG: Request sts/GetCallerIdentity Details: | |
| ---[ REQUEST POST-SIGN ]----------------------------- | |
| POST / HTTP/1.1 | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | const echoPostRequest = { | |
| url: 'https://<my url>.auth0.com/oauth/token', | |
| method: 'POST', | |
| header: 'Content-Type:application/json', | |
| body: { | |
| mode: 'application/json', | |
| raw: JSON.stringify( | |
| { | |
| client_id:'<your client ID>', | |
| client_secret:'<your client secret>', | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import { mocked } from 'ts-jest/utils'; | |
| import { Handler } from 'aws-lambda'; | |
| import { middyfy } from '@libs/lambda'; | |
| jest.mock('@libs/lambda'); | |
| describe('hello', () => { | |
| let main; | |
| let mockedMiddyfy: jest.MockedFunction<typeof middyfy>; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import middy from '@middy/core'; | |
| import { APIGatewayProxyEvent, APIGatewayProxyResult } from 'aws-lambda'; | |
| import { formatJSONResponse } from './apiGateway'; | |
| import { AppError } from './appError'; | |
| import MiddlewareFunction = middy.MiddlewareFunction; | |
| export const apiGatewayResponseMiddleware = (options: { enableErrorLogger?: boolean } = {}) => { | |
| const after: MiddlewareFunction<APIGatewayProxyEvent, any> = async (request) => { | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import { DynamoDB } from 'aws-sdk'; | |
| import { ref } from './intrinsic'; | |
| import cloudformationResources, { MyTable } from './resources'; | |
| export default { | |
| handler:'create.main', | |
| environment: { | |
| TABLE_NAME: ref(cloudformationResources, MyTable) | |
| }, | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import { | |
| CloudFormationResource, | |
| CloudFormationResources, | |
| } from 'serverless/aws'; | |
| import { findKey } from 'lodash'; | |
| interface CloudFormationReference { | |
| Ref: string; | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import { DynamoDB } from 'aws-sdk'; | |
| export default { | |
| handler:'create.main', | |
| environment: { | |
| TABLE_NAME: { | |
| Ref: 'MyTable' | |
| } | |
| }, | |
| events: [ | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | export { default as hello } from './hello'; | |
| export { default as goodbye } from './goodbye'; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | export default { | |
| hello: { | |
| handler: 'index.hello' | |
| }, | |
| goodbye: { | |
| handler: 'index.goodbye' | |
| } | |
| }; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | const { SQS } = require('@aws-sdk/client-sqs'); | |
| const sqs = new SQS(); | |
| const handler = async (event) => { | |
| console.log('event', event); | |
| const { id, title } = JSON.parse(event.body); | |
| await sqs.sendMessage({ | |
| QueueUrl: process.env.QUEUE_URL, | 
NewerOlder