@edsc/cdk-utils
v0.1.0
Published
Shared AWS CDK Resources and Utils for creating resources
Keywords
Readme
@edsc/cdk-utils
Shared AWS CDK Resources and Utils for creating resources.
Installation
npm install @edsc/cdk-utilsAvailable Constructs
- application.apiGateway
- application.apiOptionsMethod
- application.cloudfrontToCloudwatchFunction
- application.nodeJsFunction
- infrastructure.database
- infrastructure.lambdaSecurityGroup
- infrastructure.redis
- staticAssets.s3Site
Usage
import { application } from '@edsc/cdk-utils';
const graphqlLambdaFunction = new application.NodeJsFunction(this, 'GraphqlLambda', {
api: {
apiGatewayRestApi,
path: 'api',
methods: ['GET', 'POST'],
},
bundling,
entry: '../../src/graphql/handler.js',
environment,
functionName: 'graphql',
logDestinationArn: LOG_DESTINATION_ARN,
logGroupSuffix,
memorySize: 512,
role: iam.Role.fromRoleArn(this, 'GraphqlLambdaRole', applicationRole),
runtime,
securityGroups: [lambdaSecurityGroup],
stageName: STAGE_NAME,
vpc
});Development
To install:
npm installTo run the tests:
npm testContributing
See CONTRIBUTING.md
License
Copyright © 2007-2024 United States Government as represented by the Administrator of the National Aeronautics and Space Administration. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
