Releases: LambdaSharp/LambdaSharpTool
λ# - Geminus (v0.7.0.7) - 2020-01-31
Fixes
- LambdaSharp CLI
lash builddid not properly convert\in.csprojfiles on non-Windows operating systems, which caused a false-negative when trying to detect changes to function projects.- Replaced locally patched
SharpZipLibassembly with nuget version since the local patch was merged and published in v1.2.0 - Fixed an issue where a function project would be recompiled every time even when no changes were made.
- Fixed an issue where cached information was stored in the wrong application folder.
λ# - Geminus (v0.7.0.6) - 2019-12-12
New Features
- LambdaSharp CLI
lash initnow prompts to create a default AWS profile when none exists.
Fixes
- LambdaSharp CLI
- Fixed an issue where a stack update was skipped when only the parameter values changed.
- Fixed an issue in the WebSocket logging configuration.
λ# - Geminus (v0.7.0.5) - 2019-10-25
Fixes
- LambdaSharp CLI
- Fixed an issue that caused
lash buildto fail on C# projects which contained declarations with anExcludeattribute.
- Fixed an issue that caused
λ# - Geminus (v0.7.0.4) - 2019-10-17
New Features
- LambdaSharp CLI
lash initnow detects if a new, compatible version ofLambdaSharp.Coreexists when updating a deployment tier.lash buildnow checks if an existing function package is up to date and therefore compilation can be skipped.- Added
--force-buildoption tobuild,publish, anddeployto rebuild without incremental compilation or caching all projects in a module. lash util download-cloudformation-specnow stores the downloaded CloudFormation specification into the application data folder when not running in contributor mode, which makes it possible to access new CloudFormation resources without updatinglash.- Module output values are now highlighted. Standard module output values (e.g.
ModuleChecksum) are omitted unlesslashis run in verbose mode. - All commands with the
--aws-profileoption now also support--aws-regionto override the region of the AWS profile. - (experimental) Cache information about deployment tier, AWS profile, and found manifests locally to reduce network latencies (requires
LAMBDASHARP_FEATURE_CACHINGenvironment variable to be set totrue)
Fixes
- LambdaSharp CLI
- Fixed parent module dependency on imports belonging to a nested module.
- Fixed issue when using
lash new functionon a module an!Includestatement. - Fixed
lash initre-prompting all parameters when--force-deployis used. - Fixed
lash initdeploying un-deployed LambdaSharp modules when--force-deployis used.
- LambdaSharp SDK
- Fixed an issue where an exception being reported more than once with a different severity level caused a duplicate-key exception.
ALambdaCustomResourceFunctionnow uses exponential back-off when writing the invocation result back to pre-signed S3 URL.
λ# - Geminus (v0.7.0.3) - 2019-10-03
New Features
- LambdaSharp Module Syntax
- Added support for
AuthorizationType,AuthorizationScopes, andAuthorizerIdto REST API and WebSocket sources. - Update CloudFormation spec to v6.2.0.
- Added support for
- LambdaSharp CLI
- Enhanced
lash new resourceto proceed with unambiguous resource type matches or prompt to disambiguate.
- Enhanced
Fixes
- LambdaSharp CLI
- Use function name for Lambda permissions instead of ARN b/c of 64 character limit.
- Fixed missing CloudWatch log group for
Finalizerfunction. - Fixed issue where nested types caused issues for WebSocket models.
- Fixed
lash new function Finalizerto default to 900 seconds timeout. - Fixed issue where
ApiKeyRequiredwas not properly set for WebSocket sources. - Improved heuristic for identifying if a legacy CloudFormation stack belongs to the deployment tier.
- Generate a single Lambda permission resource per REST API/WebSocket to Lambda function combination to avoid exceeding the resource policy size limit.
LambdaSharp.S3.IOModule- Fixed an issue with empty zip packages.
- LambdaSharp Assemblies
- Added missing log comment when logging exception in asynchronous API Gateway endpoint invocation.
λ# - Geminus (v0.7.0.2) - 2019-09-20
Fixes
- Fixed an issue with legacy CloudFormation notification topics.
- Fixed an issue with build failing to abort after finding a type error during
util create-invoke-methods-schemainvocation. - Fixed an issue with
lash initnot resuming properly when the core services installation was stuck in bootstrap mode.
λ# - Geminus (v0.7.0.1) - 2019-09-12
Fixes
- Fixed an issue with enabling/disabling core services in a deployment tier.
Updated Documentation
- Added metadata to HTML pages.
λ# - Geminus (v0.7.0) - 2019-09-10
Geminus of Rhodes, was a Greek astronomer and mathematician, who flourished in the 1st century BC. An astronomy work of his, the Introduction to the Phenomena, still survives; it was intended as an introductory astronomy book for students. He also wrote a work on mathematics, of which only fragments quoted by later authors survive. (Wikipedia)
What's New
This release focuses on making it easy to share modules with others and streamlining the creation and upgrading of λ# deployment tiers. Prior to this release, λ# modules had to be made available in an S3 bucket for each region used by a deployment tier. In 0.7.0, the λ# CLI now automatically imports modules and their artifacts into the S3 bucket of the deployment tier, regardless of the origin region. This new behavior also safeguards against disruption should the original λ# module become unavailable at a later date since a copy is maintained in the deployment bucket. To further enhance deployment consistency, external modules are only imported during the publishing phase. The deployment phase relies entirely on the modules available in the S3 bucket of the deployment tier.
Upgrade Procedure from v0.6.1 to v0.7.0
- Ensure all modules are deployed with v0.6.1 or later
- Upgrade λ# CLI to v0.7.0
dotnet tool uninstall -g LambdaSharp.Tooldotnet tool install -g LambdaSharp.Tool
- Upgrade λ# Deployment Tier (replace
Sandboxwith the name of the deployment tier to upgrade)lash init --tier Sandbox --allow-upgrade
- Delete the λ# CLI profile CloudFormation stack if the CLI profile is not used by any other deployment tiers
- Locate the λ# CLI profile stack in the AWS Console (starts with
LambdaSharpTool-) - Empty the associated S3 bucket named DeploymentBucket
- Delete the CloudFormation stack
- Locate the λ# CLI profile stack in the AWS Console (starts with
BREAKING CHANGES
λ# Module
- The
Namespace:declaration has been renamed toGroup:. - Module references in
Using:andNested:declarations now require an origin suffix. For example,LambdaSharp.S3.IO:0.5must now be written asLambdaSharp.S3.IO:0.5@lambdasharp.
λ# Core Services
The DefaultSecretKey was removed from λ# Core Services. While it was convenient, it introduced a hard relationship between the KMS key and the lifecycle of the λ# Core Services. The better approach is to entrust the account owner with managing the KMS lifecycle. In addition, it was also a monthly recurring cost item, which was unnecessary when not required.
A few Lambda related error messages have been rephrased to make it clearer they related to the execution of Lambda functions.
Task timed out after 15.02 secondsis nowLambda timed out after 15.02 secondsProcess exited before completing requestis nowLambda exited before completing requestProcess ran out of memory (Max: 128 MB)is nowLambda ran out of memory (Max: 128 MB)Process nearing execution limits (Memory 80.12 %, Duration: 91.23 %)is nowLambda nearing execution limits (Memory 80.12 %, Duration: 91.23 %)
λ# CLI
- The
lash configcommand has been removed. Its functionality has been integrated into thelash initcommand to streamline the setup process, resulting in a single deployment tier stack. - The concept of the CLI profile is gone. Therefore the
--cli-profileoption is no longer supported. - With support of resolving λ# modules from third-party S3 buckets by using the
@originsuffix on module names, there is no need to pre-register S3 buckets anymore, which makes the--module-bucket-namesobsolete. - The deployment tier does not support the SNS topic for CloudFormation updates, which means the
--deployment-notifications-topicoption is no longer supported. - The λ# CLI will now fail to publish a stable version of a module when the
git-shais prefixed withDIRTY-, which indicate uncommitted local changes. This behavior can be overwritten with--force-publish. - The
.csprojfile generated bylash new functioncan now dynamically support contributor mode (i.e. using a local λ# git checkout), which makes the--use-project-referenceand--use-nuget-referenceobsolete. - The options for
lash tier coreserviceswere changed from--enableto--enabledand from--disableto--disabledto make them consistent with thelash initcommand.
λ# Assemblies
ALambdaFunction.InfoStruct.ModuleOwnerhas been renamed toALambdaFunction.InfoStruct.ModuleNamespaceALambdaFunction.DefaultSecretKeyIdhas been removed- The physical ID returned by
ALambdaFinalizerFunctionis now a constant (Finalizer:Module) instead of being based on the checksum of the original template. The latter proved too risky, because it could accidentally trigger a CloudFormation delete resource event when not expected.
New λ# CLI Features
Init Command
The lash init command has been redesigned to streamline the setup and configuration of a deployment tier.
Running lash init --quick-start will create a new deployment tier without any prompts. The newly created tier has no λ# Core Services, which means it sets up quickly and at no monthly cost. In addition, an empty deployment tier name is now supported, which means using the --tier option--or the LAMBDASHARP_TIER environment variable--is now optional.
The deployment tier can be upgraded to use λ# Core Services by running lash init --core-services enabled. Similarly, a deployment tier can also be downgraded by running lash init --core-services disabled assuming none of the deployed modules rely on them. Otherwise, first run the lash tier coreservices --disabled command.
Build Command
The lash build command has two new options for advanced use cases. First, is the --module-version, which sets the version of the module being compiled. This option makes it possible to tie the module version to an environment variable or otherwise supply it without modifying the module source file. Second, the --module-build-date, which is used to override the default build date of the module. This option is useful to ensure that the generated CloudFormation file is deterministic, which is required for some validation scenarios.
Publish Command
The lash publish command has a new option to override the module origin information using --module-origin. By default, the module origin for a newly published module is the name of the deployment bucket. However, it may be sometimes necessary to publish a new version of a module that originated from somewhere else, such as deploying an urgent fix. With the --module-origin option, it is possible to publish a module into the S3 bucket of the deployment tier, while making it look like it was imported. As a result, all subsequent deployments will resolve their dependencies to this new module. The imported module and its artifacts are annotated with a metadata field (x-amz-meta-lambdasharp-origin) that describes their true origin.
The lash publish command is responsible for uploading the module artifacts to the deployment bucket, as well as importing all dependencies. Modules from a foreign origin can also be imported explicitly by this command.
Using PowerShell/Bash:
lash publish LambdaSharp.S3.Subscriber:0.7.0@lambdasharpThe following text should appear (or similar):
LambdaSharp CLI (v0.7.0) - Publish LambdaSharp module
=> Imported LambdaSharp.S3.Subscriber:0.7.0@lambdasharp
Done (finished: 8/16/2019 10:27:01 AM; duration: 00:00:04.5205374)
To accommodate combining modules from various origins in a single S3 deployment bucket, the structure of the S3 keys had to be revisited. All published/imported modules and their artifacts now have the following prefix {Module::Origin}/{Module::Namespace}/{Module::Name}, which ensures there will never be any conflicts, since S3 bucket names (i.e. the module origin) is guaranteed to be globally unique. The module manifest--which describes the parameters, resource type definitions, dependencies, and artifacts--is located at {Module::Origin}/{Module::Namespace}/{Module::Name}/{Module::Version}. The module artifacts, across all versions, are located at {Origin}/{ModulePrefix}/{ModuleSuffix}/.artifacts/.
Deploy Command
The lash deploy command now takes multiple values for the --xray option. Without any value, the --xray option only enables AWS X-Ray for the root module being deployed. Optionally, AWS X-Ray can also be enabled for the root module and all nested modules using --xray:allmodules.
Additionally, AWS X-Ray is now supported for Lambda functions, AWS SDK calls, public HTTP calls (when using the [ALambdaFunction.HttpClient] property(xref:ALambdaFunction.HttpClient)) and API Gateway endpoints, providing deeper insights into
New Function Command
The lash new function command has been enhanced with types for C# functions. It can now create the scaffolding for functions to handle API Gateway, custom CloudFormation resources, SQS queues, scheduled CloudWatch events, SNS topics, WebSocket, module finalizer, and generic requests by using the --type option. If no type is provided, the λ# CLI will prompt for one. In addition, the --memory and --timeout options have been added. When omitted, they default to 256 (MB) and 30 (seconds), respectively.
The generated .csproj file was updated to make it easier for contributors to deploy modules with their latest local changes by conditionally referencing the λ# nuget package or local λ# project depending on the LAMBDASHARP environment variable. This behavior was achieved by using conditionals in the .csproj file.
<ItemGroup>
<PackageReference Condition="'$(LAMBDASHARP)'==''" I...λ# - Favorinus (v0.6.1) - 2019-09-05
BREAKING CHANGES
- Removed automatic dependency DefaultSecretKey to enable streamlined upgrade to v0.7.0.
Fixes
- Fixed a JSON schema issue when using enum property type.
λ# - Favorinus (v0.6.0.3) - 2019-07-01
New Features
- Added
--decryptoption tolash encrypt, which decrypts the supplied value before encrypting it again. Useful when changing secret keys. - Enhanced
lash tier coreservicesto also show nested stacks, but ignore them when using either the--enableor--disableoptions.
Fixes
- Fixed an issue where the IAM policy for using secret keys was not created/updated before the embedded
DecryptionSecretfunction was invoked, leading to a CloudFormation failure.