aws-architect
Advanced tools
Comparing version 6.7.66 to 6.7.67
@@ -67,4 +67,7 @@ interface PackageMetadata { | ||
constructor(packageMetadata: PackageMetadata, apiOptions: ApiOptions, contentOptions: ContentOptions); | ||
publishZipArchive(options: PublishZipOptions): Promise<object>; | ||
publishLambdaArtifactPromise(options: PublishLambdaOptions): Promise<object>; | ||
/* CloudFormation */ | ||
// CloudFormation related handlers: | ||
validateTemplate(stackTemplate: object): Promise<object>; | ||
@@ -74,11 +77,30 @@ deployTemplate(stackTemplate: object, stackConfiguration: StackConfiguration, parameters: object): Promise<object>; | ||
configureStackSetForAwsOrganization(stackTemplate: object, stackSetConfiguration: OrganizationalStackSetConfiguration, parameters: object): Promise<object>; | ||
/* ****** */ | ||
/* API Gateway */ | ||
// Support for API Gateway stages | ||
deployStagePromise(stage: string, lambdaVersion: string): Promise<object>; | ||
removeStagePromise(stage: string, functionName: string): Promise<object>; | ||
publishAndDeployStagePromise(options: StageDeploymentOptions): Promise<object>; | ||
/* ****** */ | ||
/* Lambda Functions */ | ||
// Package a lambda and push it to S3 for deployment | ||
publishLambdaArtifactPromise(options: PublishLambdaOptions): Promise<object>; | ||
// Clean up Lambda functions versions that aren't being used | ||
cleanupPreviousFunctionVersions(functionName: string, forceRemovalOfAliases: string): Promise<object>; | ||
publishAndDeployStagePromise(options: StageDeploymentOptions): Promise<object>; | ||
// Deploy a new version of a lambda function alias | ||
deployLambdaFunctionVersion(options: StageDeploymentOptions): Promise<object>; | ||
// Run your lambda microservice locally | ||
run(port: number, logger: Function): Promise<object>; | ||
/* ****** */ | ||
/* S3 Websites using CloudFront */ | ||
// Deploy a new version of a website to S3 | ||
publishWebsite(version: string, options: WebsiteDeploymentOptions): Promise<object>; | ||
// Delete a version of the website from S3 | ||
deleteWebsiteVersion(version: string): Promise<object>; | ||
run(port: number, logger: Function): Promise<object>; | ||
/* ****** */ | ||
} | ||
export = AwsArchitect; |
25
index.js
@@ -198,2 +198,27 @@ let archiver = require('archiver'); | ||
AwsArchitect.prototype.deployLambdaFunctionVersion = async function(options = {}) { | ||
let stage = options.stage; | ||
let stageName = getStageName(stage); | ||
let functionName = options.functionName; | ||
let bucket = options.deploymentBucketName || this.deploymentBucket; | ||
let deploymentKey = options.deploymentKeyName; | ||
if (!stage) { throw new Error('Deployment stage is not defined.'); } | ||
try { | ||
const lambda = await this.LambdaManager.PublishNewVersion(functionName, bucket, deploymentKey); | ||
const lambdaArn = lambda.FunctionArn; | ||
const lambdaVersion = lambda.Version; | ||
await this.LambdaManager.SetAlias(functionName, stageName, lambdaVersion); | ||
return { | ||
LambdaResult: { | ||
LambdaFunctionArn: lambdaArn, | ||
LambdaVersion: lambdaVersion | ||
} | ||
}; | ||
} catch (failure) { | ||
throw { Error: 'Failed to create and deploy updates.', Details: failure }; | ||
} | ||
}; | ||
AwsArchitect.prototype.publishAndDeployStagePromise = AwsArchitect.prototype.PublishAndDeployStagePromise = async function(options = {}) { | ||
@@ -200,0 +225,0 @@ let stage = options.stage; |
{ | ||
"name": "aws-architect", | ||
"version": "6.7.66", | ||
"version": "6.7.67", | ||
"description": "AWS Architect is a node based tool to configure and deploy AWS-based microservices.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -115,2 +115,10 @@ # AWS Architect | ||
// Deploy just a new version of a lambda function | ||
deployLambdaFunctionVersion(options) { | ||
// options.stage | ||
// options.functionName | ||
// options.deploymentBucketName | ||
// options.deploymentKeyName | ||
} | ||
// Removes a deployed stage, to be used on pull-request created stages (API gateway has a limit fo 5 stages) | ||
@@ -117,0 +125,0 @@ removeStagePromise(stage) {...} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
143071
2681
184