v3.7.0
版本发布时间: 2024-08-29 16:53:25
localstack/localstack最新发布版本:v3.7.2(2024-09-06 20:47:10)
Summary
LocalStack 3.7 brings significant updates including Lambda Debug Mode for enhanced debugging, support for DMS Serverless, improved SES functionality, and new state management options through Cloud Pods. Additional configuration options for Lambda, EKS and EC2 services alongside several enhancements in the Web Application experience enhance both flexibility and efficiency in local development and testing environments.
AWS Features
- Support for DMS Serverless is now available and it can be used for the sources and targets that LocalStack already supports, and that are also supported by AWS. (🌟 enterprise)
- Support for a new preview Lambda Event Source Mapping (ESM) implementation is now available behind the feature flag
LAMBDA_EVENT_SOURCE_MAPPING=v2
. - S3 provider now supports Conditional Writes that can check for the existence of an object before creating it.
Enhancements
-
Introduction of Lambda Debug Mode, a new preview feature to enhance your Lambda debugging experience. Key features include:
- Automatic Timeout Management: Integrates with API Gateway and Lambda to prevent function timeouts during debug sessions, giving developers more time to connect remote debuggers and examine function behavior.
- Multi-Function and Version Debugging: Enables the debugging of multiple Lambda functions simultaneously.
The new Lambda Debug Mode can be activated using the
LAMBDA_DEBUG_MODE=1
configuration variable. -
LocalStack now supports configurable debugging sessions through Lambda Debug Mode, which allows you to specify settings for debugging each Lambda function. Key configuration options include:
- Remote Debugger Port: Configure the debug port for each Lambda function version.
- Automatic Timeout Handling: Set up the default automatic timeout handling feature of Lambda Debug Mode.
Lambda Debug Mode can be configured by mapping your configuration file to the
LAMBDA_DEBUG_MODE_CONFIG_PATH
variable. This mode automatically extends the Lambda container startup timeouts to provide ample time for attaching a remote debugger. -
S3 provider now supports SSE-C parameter validation. However, LocalStack does not support the actual encryption and decryption of objects using SSE-C.
-
CloudFormation provider now emits
*_IN_PROGRESS
events, improving the visuals when using CDK with LocalStack. -
SES provider now supports the following enhancements:
- Improved SES provider to match AWS functionality more closely.
-
DescribeActiveReceiptRuleSet
now handles absent rule sets appropriately. -
DeleteReceiptRuleSet
now requires prior deactivation. - Enhanced error messaging and input validation for
SetActiveReceiptRuleSet
.
-
Support for custom URL aliases for Lambda Function URLs is now available in LocalStack. This feature allows users to assign custom IDs to either the
$LATEST
version of a function or to an existing version alias. -
LocalStack now supports prebuilding Lambda images before execution, which increases the cold start time but reduces the time until the Lambda function is ACTIVE. This preview feature is controlled by the
LAMBDA_PREBUILD_IMAGES
configuration variable. -
CloudFormation provider now supports the following enhancements:
- Users can now specify MFA configurations directly in the resource definition for
AWS::Cognito::UserPool
. (🌟 pro) -
ArchivePolicy
settings are now supported inAWS::SNS::Topic
resources. - Default tags can now be configured for
AWS::EC2::SecurityGroup
. - Users can now import existing EC2 SSH key pairs using the
AWS::EC2::KeyPair
resource.
- Users can now specify MFA configurations directly in the resource definition for
-
LocalStack now supports idempotent
StartExecution
operations against already runningSTANDARD
Step Functions state machines with identical input. -
LocalStack now supports setting an SQS queue’s
RedrivePolicy
to an empty string, which will completely remove it from the queue’s Attributes map. -
LocalStack now includes more robust checks for the Lambda provider’s
function_name
andqualifier
validations, enhancing AWS parity and coverage of naming edge cases. -
A new configuration variable
EKS_K8S_PROVIDER
is now supported with two options:k3s
(default, using k3d) andlocal
(using a mounted kubeconfig). The presence of kubeconfig at/root/.kube/config
no longer influences provider selection. However, an explicit warning is issued if it's missing when using thelocal
option. Kubeconfig files at~/.kube/config
are not automatically mounted; users must manually mount them if necessary. (🌟 pro) -
The following API operations are now available in the Resource Access Manager (RAM) provider: (🌟 pro)
-
The following API operations for EventBridge pipes are now available in the EventBridge Pipes: (🌟 pro)
-
LocalStack now supports setting the
UserData
field ofRunInstances
to a shell script that will be executed at the time of VM startup in the EC2 Libvirt VM manager. (🌟 pro) -
Users should be able to use LocalStack in any region. It includes the regular AWS regions, but also regions in the China, GovCloud and ISO-partitions. (🌟 enterprise)
-
You can now use the
EC2_HYPERVISOR_URI
configuration variable to set the Libvirt connection URI, indicating the hypervisor host for the EC2 Libvirt VM manager. Currently, only QEMU drivers are supported. (🌟 pro)
LocalStack Features
- Cloud Pods now offer various strategies for integrating states into your LocalStack container. To activate these merge strategies, set
--strategy <strategy>
while loading the Cloud Pod. The available strategies include:-
overwrite
: This strategy clears the existing state and loads the new state from the Cloud Pod, completely resetting the LocalStack state. -
account-region-merge
(default): This strategy merges services based on account and region pairs, attempting to combine states from both the current state and the Cloud Pod for the same account and region. -
service-merge
: This strategy merges services at the account-region level, provided there’s no overlap in resources, and prioritizes the loaded resources during merging. (🌟 pro)
-
- Cloud Pods S3 remotes now support prefixes in the S3 URL. (🌟 pro)
- LocalStack now supports previewing the changes that would occur when loading a Cloud Pod using the
--dry-run
flag. The result depends on the selected merge strategy, which is displayed on the console, and no changes are made to the LocalStack state. (🌟 pro) - Cloud Pods now have folder support for S3 remote storage. Users would need to set their custom remote, and then specify the destination bucket with folders. (🌟 pro)
- Support for fetching LocalStack container logs from an Ephemeral Instance is now available. After creating an Ephemeral Instance, you can navigate to the Logs tab to inspect the logs for debugging and analysis. (🌟 pro)
- LocalStack Extensions are now embedded and integrated into the LocalStack Web Application. You can use extensions, like AWS Replicator and Mailhog, directly from our Web Application, centralizing all necessary tools in one place. (🌟 pro)
- LocalStack Chaos Engineering dashboard now uses the Chaos API. (🌟 enterprise)
- Support for the
--template
option in thelocalstack extensions dev new
command is now available, allowing you to specify which template you wish to use. (🌟 pro) - LocalStack now provides managed DevContainer Templates for streamlined setup:
- LocalStack Docker-in-Docker: Configures a DevContainer with LocalStack running internally.
- LocalStack Docker-outside-of-Docker: Establishes a DevContainer communicating with an external LocalStack instance on the same Docker network.
What's Changed
Exciting New Features 🎉
- fix APIGW path converter with prepended multiple slashes by @bentsku in https://github.com/localstack/localstack/pull/11268
- add APIGW NG composite handler by @bentsku in https://github.com/localstack/localstack/pull/11257
- upgrade ffmpeg to use version 7.0.1 by @sannya-singal in https://github.com/localstack/localstack/pull/11294
- Add rewriter for invalid regions in the handler chain by @dfangl in https://github.com/localstack/localstack/pull/10912
- Feature/EventStudio: patch put events by @maxhoheiser in https://github.com/localstack/localstack/pull/11291
- Fix/EventStudio: Remove event bus field before transformers by @maxhoheiser in https://github.com/localstack/localstack/pull/11300
- Add aliasing support for custom predictable Lambda URLs by @gregfurman in https://github.com/localstack/localstack/pull/11272
- fix Lambda custom aliased URL flaky test by @gregfurman in https://github.com/localstack/localstack/pull/11316
- Lambda Event Source Mapping (ESM) v2 by @joe4dev in https://github.com/localstack/localstack/pull/11267
- Lambda DevX, Introducing Lambda Debug Mode by @MEPalma in https://github.com/localstack/localstack/pull/11301
- implement SSE-C encryption for S3 by @bentsku in https://github.com/localstack/localstack/pull/11358
- implement IfNoneMatch for PutObject and CompleteMultipartUpload by @bentsku in https://github.com/localstack/localstack/pull/11402
- [SFN] Support for Singleton Literal Array Access Unpacking by @MEPalma in https://github.com/localstack/localstack/pull/11369
- switch versioning to setuptools_scm by @alexrashed in https://github.com/localstack/localstack/pull/11355
- remove CFn legacy template deployer by @pinzon in https://github.com/localstack/localstack/pull/11414
- [Lambda DevX] Introducing Lambda Debug Mode Config by @MEPalma in https://github.com/localstack/localstack/pull/11363
- [Lambda DevX] Control Lambda Container Startup Timeout when In Lambda Debug Mode by @MEPalma in https://github.com/localstack/localstack/pull/11398
- [Lambda DevX] Remove deprecated utils file by @MEPalma in https://github.com/localstack/localstack/pull/11425
Other Changes
- update release banner in README [3.6] by @HarshCasper in https://github.com/localstack/localstack/pull/11264
- add new folder Matcher in test selection for conftest.py by @bentsku in https://github.com/localstack/localstack/pull/11265
- fix flaky transcribe tests by pre-downloading dependencies by @bentsku in https://github.com/localstack/localstack/pull/11261
- fix cloudwatch get_metric_data for multiple dimensions by @steffyP in https://github.com/localstack/localstack/pull/11270
- fix warnings for Dockerfiles by @alexrashed in https://github.com/localstack/localstack/pull/11277
- fix: replace
DEVELOP
mode by @simonrw in https://github.com/localstack/localstack/pull/11285 - Change default for LAMBDA_DEV_PORT_EXPOSE on macOS in host mode by @joe4dev in https://github.com/localstack/localstack/pull/11280
- fix Kinesis CBOR date encoding for AWS SDK v2 by @alexrashed in https://github.com/localstack/localstack/pull/11286
- fix version.py glob after source package move by @alexrashed in https://github.com/localstack/localstack/pull/11290
- fix ARN construction for APIGW NG get_source_arn by @bentsku in https://github.com/localstack/localstack/pull/11295
- fix S3 pre-signed issue importing moto in S3 image by @bentsku in https://github.com/localstack/localstack/pull/11297
- SES: Add support for feedback campaign tags by @viren-nadkarni in https://github.com/localstack/localstack/pull/11284
- Fixes for proper ARN generation / testing by @dfangl in https://github.com/localstack/localstack/pull/11296
- Rework AssetDirectory to use pathlib.Path by @giograno in https://github.com/localstack/localstack/pull/11281
- fix APIGW double slashes between stage and path by @bentsku in https://github.com/localstack/localstack/pull/11304
- Simplify publishing analytics of new LocalStack editions by @silv-io in https://github.com/localstack/localstack/pull/11309
- Add test for deleting an alias associated with a Lambda URL by @gregfurman in https://github.com/localstack/localstack/pull/11288
- add APIGW NG workaround for AccessDenied exception by @bentsku in https://github.com/localstack/localstack/pull/11317
- Upgrade pinned Python dependencies by @pinzon in https://github.com/localstack/localstack/pull/11322
- improve X-Amz-Trace-Id for APIGW NG by @bentsku in https://github.com/localstack/localstack/pull/11327
- Cfn parameters support list by @cloutierMat in https://github.com/localstack/localstack/pull/11330
- add support for
Number
type param in!Sub
in cfn templates by @sannya-singal in https://github.com/localstack/localstack/pull/11315 - Add lambda prebuild option to CLI env vars, readd docker build make target by @dfangl in https://github.com/localstack/localstack/pull/11318
- fix APIGW CFN Stage with Stage Variables casing by @bentsku in https://github.com/localstack/localstack/pull/11344
- Provide regions to various inter-service communication clients by @dfangl in https://github.com/localstack/localstack/pull/11328
- CFn: support importing existing EC2 SSH keys by @simonrw in https://github.com/localstack/localstack/pull/11345
- Fix Lambda ESM lifecycle and stream poller exceptions by @joe4dev in https://github.com/localstack/localstack/pull/11331
- Unify ESM failure destinations and Pipes DeadLetterConfig by @joe4dev in https://github.com/localstack/localstack/pull/11337
- fix test_import_with_stage_variables for multi account by @bentsku in https://github.com/localstack/localstack/pull/11353
- Automatically convert props in resource provider botocore calls by @dominikschubert in https://github.com/localstack/localstack/pull/11310
- APIGW NG: small cleanup by @bentsku in https://github.com/localstack/localstack/pull/11349
- Event filtering JSON detection for ESM v2 and Pipes by @joe4dev in https://github.com/localstack/localstack/pull/11354
- Fix missing CFN_PER_RESOURCE_TIMEOUT var by @stemwinder in https://github.com/localstack/localstack/pull/11340
- CFn: better context on boto client errors by @simonrw in https://github.com/localstack/localstack/pull/11338
- add config for DMS to analytics env reporting by @steffyP in https://github.com/localstack/localstack/pull/11368
- add fix for step function activity tags by @pinzon in https://github.com/localstack/localstack/pull/11347
- fix postgresql in ci by @cloutierMat in https://github.com/localstack/localstack/pull/11376
- Apigw ng refactor deployment store by @cloutierMat in https://github.com/localstack/localstack/pull/11372
- Fix SQS handling of empty Redrive Policy attribute by @gregfurman in https://github.com/localstack/localstack/pull/11385
- add support for default tags AWS::EC2::SecurityGroup by @pinzon in https://github.com/localstack/localstack/pull/11371
- add support for ArchivePolicy in AWS::SNS::Topic by @pinzon in https://github.com/localstack/localstack/pull/11370
- Bump moto-ext to 5.0.13.post1 by @viren-nadkarni in https://github.com/localstack/localstack/pull/11332
- fix ASF upgrades by upgrading botocore pins and dependency locks by @alexrashed in https://github.com/localstack/localstack/pull/11394
- Add new flag for mounting dependencies into the container by @simonrw in https://github.com/localstack/localstack/pull/11388
- Add idempotency when calling StartExecution in Standard Step Functions by @gregfurman in https://github.com/localstack/localstack/pull/11118
- Update lambda init binary to v0.1.29-pre by @dfangl in https://github.com/localstack/localstack/pull/11399
- APIGW: add better validation for PutIntegration and PutIntegrationResponse by @bentsku in https://github.com/localstack/localstack/pull/11400
- Apigw ng http deployment by @cloutierMat in https://github.com/localstack/localstack/pull/11401
- Update CODEOWNERS by @localstack-bot in https://github.com/localstack/localstack/pull/11404
- Add MessageAttributes to SQS messages when executed via Step Function by @gregfurman in https://github.com/localstack/localstack/pull/11405
- fix CopyObject not copying tag of current object by @bentsku in https://github.com/localstack/localstack/pull/11403
- Use tags to support custom resource IDs for VPC, Subnet, and SecurityGroup resources by @RobertLucian in https://github.com/localstack/localstack/pull/11361
- CloudWatch: Add missing response fields by @viren-nadkarni in https://github.com/localstack/localstack/pull/11411
- Lambda: improve function name and qualifier validation by @gregfurman in https://github.com/localstack/localstack/pull/11366
- Updated parameter mapper typing by @cloutierMat in https://github.com/localstack/localstack/pull/11413
- cloudwatch: check amount of datapoints, refactor database-locks by @steffyP in https://github.com/localstack/localstack/pull/11408
- Use the correct image for diagnostic endpoint by @dfangl in https://github.com/localstack/localstack/pull/11396
- Refactor/Events: add localstack_only test markers for v1 only tests by @maxhoheiser in https://github.com/localstack/localstack/pull/11382
- CFn: show CDK stack events by @simonrw in https://github.com/localstack/localstack/pull/11406
- apigw ng request parameter handler by @cloutierMat in https://github.com/localstack/localstack/pull/11423
- Fix CFn bug when loading custom resources by @simonrw in https://github.com/localstack/localstack/pull/11422
- APIGW NG: update UpdateApi status code by @bentsku in https://github.com/localstack/localstack/pull/11424
- Modify certificate download URL to new endpoint by @dfangl in https://github.com/localstack/localstack/pull/11426
New Contributors
- @stemwinder made their first contribution in https://github.com/localstack/localstack/pull/11340
- @RobertLucian made their first contribution in https://github.com/localstack/localstack/pull/11361
Full Changelog: https://github.com/localstack/localstack/compare/v3.6.0...v3.7.0