-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d4b9a0a
commit 353bd0a
Showing
10 changed files
with
5,682 additions
and
2,548 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { SNSHandler } from "aws-lambda"; | ||
|
||
const inboxBucketARN = process.env.INBOX_BUCKET; | ||
|
||
export const handler: SNSHandler = async (event) => { | ||
console.log(JSON.stringify({ inboxBucketARN, event })); | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "@iac-aws/handlers", | ||
"dependencies": { | ||
"@aws-sdk/client-s3": "^3.267.0", | ||
"@aws-sdk/client-ses": "^3.267.0", | ||
"aws-lambda": "^1.0.7" | ||
}, | ||
"devDependencies": { | ||
"@types/aws-lambda": "^8.10.110" | ||
} | ||
} |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { Runtime } from "aws-cdk-lib/aws-lambda"; | ||
import { | ||
NodejsFunction as CDKNodejsFunction, | ||
NodejsFunctionProps as CDKNodejsFunctionProps, | ||
} from "aws-cdk-lib/aws-lambda-nodejs"; | ||
import { Construct } from "constructs"; | ||
import path from "path"; | ||
|
||
export interface NodejsFunctionProps extends CDKNodejsFunctionProps { | ||
// TODO | ||
// newrelicInstrumentation?: boolean; | ||
entry: string; | ||
} | ||
|
||
export class NodejsFunction extends CDKNodejsFunction { | ||
constructor(scope: Construct, id: string, { ...props }: NodejsFunctionProps) { | ||
super(scope, id, { | ||
runtime: Runtime.NODEJS_16_X, | ||
...props, | ||
entry: path.resolve(process.cwd(), props.entry), | ||
bundling: { | ||
minify: true, | ||
sourceMap: true, | ||
keepNames: true, | ||
...props.bundling, | ||
}, | ||
}); | ||
} | ||
} |
Oops, something went wrong.