Skip to content

Instantly share code, notes, and snippets.

@BenjaminKlatt
Created August 7, 2022 08:11
Show Gist options
  • Save BenjaminKlatt/3c9b9f61e3e086d157b2a299f50980b7 to your computer and use it in GitHub Desktop.
Save BenjaminKlatt/3c9b9f61e3e086d157b2a299f50980b7 to your computer and use it in GitHub Desktop.
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * as awsx from "@pulumi/awsx";
// Create an AWS resource (S3 Bucket)
const bucket = new aws.s3.Bucket("my-bucket");
// Export the name of the bucket
export const bucketName = bucket.id;
// Create the most simple AWS Lambda event handler on our bucket using magic functions.
bucket.onObjectCreated("docsHandler", (e) => {
console.log(e);
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment