Skip to content
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: added common helpers like redis,appsyncmergeapi,event bridge an… #13

Merged
merged 7 commits into from
Oct 5, 2023

Conversation

dineshSajwan
Copy link
Contributor

@dineshSajwan dineshSajwan commented Oct 4, 2023

Fixes #

Added following common/helpers construct.
# redis-helper.ts,
# appsyncmergedapi-helper.
# eventbridge-helper.ts
# updated vpc-helper.ts

Added Pattern aws-summarization-appsync-stepfn
# Initial Readme draft for summarization pattern construct.
# Architecture diagram.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.

.projenrc.ts Show resolved Hide resolved
src/common/helpers/appsyncmergedapi-helper.ts Show resolved Hide resolved
src/common/helpers/appsyncmergedapi-helper.ts Outdated Show resolved Hide resolved
src/common/helpers/appsyncmergedapi-helper.ts Outdated Show resolved Hide resolved
src/common/helpers/eventbridge-helper.ts Outdated Show resolved Hide resolved
krokoko
krokoko previously approved these changes Oct 5, 2023
Copy link
Collaborator

@krokoko krokoko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good for v1
Next pass we will add unit tests on helpers

Copy link
Collaborator

@scottschreckengaust scottschreckengaust left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What keeps the package-lock.json and yarn.lock in sync?

.projenrc.ts Show resolved Hide resolved
package-lock.json Outdated Show resolved Hide resolved
laithalsaadoon
laithalsaadoon previously approved these changes Oct 5, 2023
}

function getMergedAPIRole(scope: Construct, props: AppsyncMergedApiProps) {
return new iam.Role(scope, 'mergedapirole', {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A small nit pick, can we use camel case for resource names?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack.

* @param AppsyncMergedApiProps The props to be used by the construct
* @returns App sync merge api
*/
export function buildMergedAPI(scope: Construct, props: AppsyncMergedApiProps, logProps: LogConfigProps) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it a common convention to have two prop arguments? consider one Prop with a key-value of type LogConfigProps

import { Construct } from 'constructs';


export interface AppsyncMergedApiProps {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can some of these be strongly typed? then perhaps getting the ID's from the object properties later in the code (foo.cognitoUserPoolId)

const redisclustername = props.redisclustername || 'redisCluster';
const cacheNodeType = props.cacheNodeType || 'cache.r6g.xlarge';

let redisCulster = new elasticache.CfnCacheCluster(scope, 'redisCluster', {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! love the way you used the local functions here

Copy link
Collaborator

@scottschreckengaust scottschreckengaust left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove package-lock.json for now

Removed package-lock.json from the PR. Managed by projen but need to review it again to make sure there is only one package manager.

Signed-off-by: Dinesh Sajwan <[email protected]>
@dineshSajwan dineshSajwan merged commit b0a139a into main Oct 5, 2023
6 checks passed
@dineshSajwan dineshSajwan deleted the feature/summarization_construct branch October 5, 2023 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants