API Gateway and Lambda to generate S3 pre-signed URLS

Secured REST API that expose a Lambda function to generate S3 pre-signed URLs

API GatewayLambdaS3
import { Stack, StackProps } from 'aws-cdk-lib';
import { S3UploadPresignedUrlApi } from 'cdk-s3-upload-presignedurl-api';
import { Construct } from 'constructs';

export class S3UploadPresignedURLAPIStack extends Stack {
  constructor(scope: Construct, id: string, props?: StackProps) {
    super(scope, id, props);

    const uploadS3API = new S3UploadPresignedUrlApi(this, 'API');
  }
}

Download

git clone https://github.com/aws-samples/serverless-patterns
cd serverless-patterns/s3-upload-presignedurl-api-cdk-ts

Pattern repository

View on GitHub

Last updated on 26 Dec 2024

Edit this page