-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: implement code generated handler framework #28251
Merged
Merged
Changes from 1 commit
Commits
Show all changes
77 commits
Select commit
Hold shift + click to select a range
b983212
initial commit - framework, classes, constructors, modules
colifran 7145c7a
refactor
colifran dd2ff42
refactor and bug fixes
colifran f7b4593
initial setup for config file
colifran 2038bcf
updated outfile location and config format
colifran d888a5d
Merge branch 'main' into colifran/codegen-handler-framework
colifran c87613b
initial work on build script
colifran 6de2be2
refactor
colifran 5873fe4
migrated handler framework into custom resource handlers and updated …
colifran dccc985
migrated handler-framework into custom-resource-handlers
colifran 688a69d
imports for external modules
colifran c920b1e
refactored airlift custom resource handlers
colifran c78566a
formatting
colifran 0f8c8e5
exclude dist from compilation
colifran 00fc75a
code to generate custom super props
colifran ba9c570
path import and path literal in config
colifran 3f450da
remove cdk handler and runtime determiner
colifran ba044b6
compatible framework runtimes
colifran 43e60d7
singleton interface creation
colifran 8ef2e15
refactor for generate script
colifran 7ef5139
removed unneeded console log
colifran 0c45784
added to config
colifran 1647a82
no op
colifran 7da55a3
config
colifran 2210613
refactor for cdk handler changes and added immutable to property spec…
colifran 9d950d9
cdk-handler and runtime determiner
colifran e19f090
get or create cdk handler to force singleton cdk handler and migration
colifran 6712a4e
merge conflicts
colifran fd0b93f
refactor for cdk handler change and updated config
colifran bacd7b6
move runtime determiner and create runtime class to break circular de…
colifran ca3be84
renamed to custom resource framework
colifran 721c59f
migrate
colifran f2504ae
refactor
colifran 98cbe11
migrate
colifran aa3c176
migrate to codegen providers
colifran c89f470
airlift core to core
colifran b0e9ba4
core internal
colifran d6d5cbf
finished migrating core providers
colifran ca0ad0a
reverted drain hook change
colifran 2ca1f33
use lambda runtime and auto generate component name
colifran e036649
lambda runtime isdeprecated flag
colifran b8da22d
generate names better
colifran 13a0b48
formatting
colifran 1496b55
update custom resources to use auto generated names
colifran 972836b
remove console log
colifran 7b87231
drain hook revert
colifran c4a20ba
runtimes determiner testing
colifran 510bcaa
testing and empty readme
colifran a7b74e1
alpha
colifran 228aafd
runtime deprecated
colifran c3fdb61
naming
colifran 187c7df
refactor and naming update
colifran f857264
naming
colifran 2db1c20
docstring
colifran 3c81f54
fix framework unit tests
colifran cc69345
fix failures
colifran 034c7ce
unit tests
colifran 7ba9f86
selective import from core internal stack module
colifran 1db5e8c
formatting
colifran c11b42a
update importing modules
colifran 3744d65
documentation
colifran a64afe4
readme and naming
colifran 3a8757a
readme
colifran 7a326ca
fix unit tests
colifran 8582ad6
Merge branch 'main' into colifran/codegen-handler-framework
colifran cb75044
Merge branch 'main' into colifran/codegen-handler-framework
colifran 812ac0a
naming
colifran 7b3e7c1
name generator
colifran cf435a0
updated generated component names
colifran 4d25941
fixed unit tests with new naming
colifran e8f5a3a
reverted lambda runtime deprecated flag
colifran 46aa221
fix constructor props
colifran ab259ed
node18 as esbuild target
colifran 11f9476
readme
colifran f77cacf
readme
colifran dedc574
utils tests
colifran 2dffd0a
Merge branch 'main' into colifran/codegen-handler-framework
mergify[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
get or create cdk handler to force singleton cdk handler and migration
Signed-off-by: Francis <colifran@amazon.com>
- Loading branch information
commit e19f09073f2ede87a94ed0bfb8df04c776faa8e7
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
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
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
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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
import * as path from 'path'; | ||
import { Construct, Node } from 'constructs'; | ||
import * as cloudwatch from '../../../aws-cloudwatch'; | ||
import * as ec2 from '../../../aws-ec2'; | ||
|
@@ -8,14 +7,13 @@ import * as ssm from '../../../aws-ssm'; | |
import { | ||
CfnResource, | ||
CustomResource, | ||
CustomResourceProvider, | ||
CustomResourceProviderRuntime, | ||
Lazy, | ||
Resource, | ||
Stack, | ||
Stage, | ||
Token, | ||
} from '../../../core'; | ||
import { CrossRegionStringParamReaderProvider } from '../../../custom-resource-handlers/dist/aws-cloudfront/cross-region-string-param-reader-provider.generated'; | ||
|
||
/** | ||
* Properties for creating a Lambda@Edge function | ||
|
@@ -199,9 +197,7 @@ export class EdgeFunction extends Resource implements lambda.IVersion { | |
}); | ||
|
||
const resourceType = 'Custom::CrossRegionStringParameterReader'; | ||
const serviceToken = CustomResourceProvider.getOrCreate(this, resourceType, { | ||
codeDirectory: path.join(__dirname, '..', '..', '..', 'custom-resource-handlers', 'dist', 'aws-cloudfront', 'edge-function'), | ||
runtime: CustomResourceProviderRuntime.NODEJS_18_X, | ||
const serviceToken = CrossRegionStringParamReaderProvider.getOrCreate(this, resourceType, { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why const requestorFunction = new CertificateRequestCertificateRequestProvider(this, 'CertificateRequestorFunction', { For the previous CR, but Wouldn't it make sense to have the same API all the way around? |
||
policyStatements: [{ | ||
Effect: 'Allow', | ||
Resource: parameterArnPrefix, | ||
|
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's have the
timeout
default to 15 minutes.I don't think there's a good reason to set it shorter: we trust the code, and we'd rather the code finish (for whatever reason it's taking a long time), than accidentally timeout after 3 seconds or 1 minute or what have you, and us failing the deployment.