This file contains 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 { Stack, StackProps} from 'aws-cdk-lib'; | |
import { Construct } from 'constructs'; | |
import * as lambda from 'aws-cdk-lib/aws-lambda-nodejs' | |
import * as apigateway from 'aws-cdk-lib/aws-apigateway' | |
import { LambdaIntegration } from './LambdaIntegration' | |
export class LegacyWrapperStack extends Stack { | |
constructor(scope: Construct, id: string, props?: StackProps) { | |
super(scope, id, props); |
This file contains 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 * as iam from 'aws-cdk-lib/aws-iam'; | |
import * as lambda from 'aws-cdk-lib/aws-lambda'; | |
import * as apigateway from 'aws-cdk-lib/aws-apigateway'; | |
export interface LambdaIntegrationOnePermissionOnlyOptions extends apigateway.LambdaIntegrationOptions { | |
restApi: apigateway.IRestApi | |
} | |
export class LambdaIntegration extends apigateway.LambdaIntegration { |
This file contains 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
'use strict'; | |
const AWS = require('aws-sdk'); | |
const S3 = new AWS.S3({ | |
signatureVersion: 'v4', | |
}); | |
const sharp = require('sharp'); | |
const BUCKET = process.env.BUCKET ? process.env.BUCKET : "mybucket"; | |
const URL = process.env.URL ? process.env.URL : "http://localhost:5858"; // for local development |
This file contains 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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"logs:CreateLogGroup", | |
"logs:CreateLogStream", | |
"logs:PutLogEvents" | |
], |