async-lambda-unstable 0.6.15__tar.gz → 0.6.16__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. async_lambda_unstable-0.6.15/README.md → async_lambda_unstable-0.6.16/PKG-INFO +20 -2
  2. async_lambda_unstable-0.6.15/PKG-INFO → async_lambda_unstable-0.6.16/README.md +8 -14
  3. {async_lambda_unstable-0.6.15 → async_lambda_unstable-0.6.16}/async_lambda/__init__.py +1 -1
  4. {async_lambda_unstable-0.6.15 → async_lambda_unstable-0.6.16}/async_lambda/controller.py +0 -6
  5. {async_lambda_unstable-0.6.15 → async_lambda_unstable-0.6.16}/async_lambda/models/task.py +6 -0
  6. {async_lambda_unstable-0.6.15 → async_lambda_unstable-0.6.16}/.gitignore +0 -0
  7. {async_lambda_unstable-0.6.15 → async_lambda_unstable-0.6.16}/async_lambda/build_config.py +0 -0
  8. {async_lambda_unstable-0.6.15 → async_lambda_unstable-0.6.16}/async_lambda/cli.py +0 -0
  9. {async_lambda_unstable-0.6.15 → async_lambda_unstable-0.6.16}/async_lambda/client.py +0 -0
  10. {async_lambda_unstable-0.6.15 → async_lambda_unstable-0.6.16}/async_lambda/config.py +0 -0
  11. {async_lambda_unstable-0.6.15 → async_lambda_unstable-0.6.16}/async_lambda/defer.py +0 -0
  12. {async_lambda_unstable-0.6.15 → async_lambda_unstable-0.6.16}/async_lambda/env.py +0 -0
  13. {async_lambda_unstable-0.6.15 → async_lambda_unstable-0.6.16}/async_lambda/middleware.py +0 -0
  14. {async_lambda_unstable-0.6.15 → async_lambda_unstable-0.6.16}/async_lambda/models/__init__.py +0 -0
  15. {async_lambda_unstable-0.6.15 → async_lambda_unstable-0.6.16}/async_lambda/models/api_response.py +0 -0
  16. {async_lambda_unstable-0.6.15 → async_lambda_unstable-0.6.16}/async_lambda/models/case_insensitive_dict.py +0 -0
  17. {async_lambda_unstable-0.6.15 → async_lambda_unstable-0.6.16}/async_lambda/models/events/__init__.py +0 -0
  18. {async_lambda_unstable-0.6.15 → async_lambda_unstable-0.6.16}/async_lambda/models/events/api_event.py +0 -0
  19. {async_lambda_unstable-0.6.15 → async_lambda_unstable-0.6.16}/async_lambda/models/events/base_event.py +0 -0
  20. {async_lambda_unstable-0.6.15 → async_lambda_unstable-0.6.16}/async_lambda/models/events/dynamodb_event.py +0 -0
  21. {async_lambda_unstable-0.6.15 → async_lambda_unstable-0.6.16}/async_lambda/models/events/managed_sqs_batch_event.py +0 -0
  22. {async_lambda_unstable-0.6.15 → async_lambda_unstable-0.6.16}/async_lambda/models/events/managed_sqs_event.py +0 -0
  23. {async_lambda_unstable-0.6.15 → async_lambda_unstable-0.6.16}/async_lambda/models/events/scheduled_event.py +0 -0
  24. {async_lambda_unstable-0.6.15 → async_lambda_unstable-0.6.16}/async_lambda/models/events/unmanaged_sqs_event.py +0 -0
  25. {async_lambda_unstable-0.6.15 → async_lambda_unstable-0.6.16}/async_lambda/models/mock/mock_context.py +0 -0
  26. {async_lambda_unstable-0.6.15 → async_lambda_unstable-0.6.16}/async_lambda/models/mock/mock_event.py +0 -0
  27. {async_lambda_unstable-0.6.15 → async_lambda_unstable-0.6.16}/async_lambda/payload_encoder.py +0 -0
  28. {async_lambda_unstable-0.6.15 → async_lambda_unstable-0.6.16}/async_lambda/py.typed +0 -0
  29. {async_lambda_unstable-0.6.15 → async_lambda_unstable-0.6.16}/async_lambda/util.py +0 -0
  30. {async_lambda_unstable-0.6.15 → async_lambda_unstable-0.6.16}/pyproject.toml +0 -0
@@ -1,3 +1,15 @@
1
+ Metadata-Version: 2.5
2
+ Name: async-lambda-unstable
3
+ Version: 0.6.16
4
+ Summary: A framework for creating AWS Lambda Async Workflows. - Unstable Branch
5
+ Author-email: "Nuclei, Inc" <engineering@nuclei.ai>
6
+ Requires-Dist: click>=8.0.0
7
+ Requires-Dist: typing-extensions>=4.0.0
8
+ Provides-Extra: local
9
+ Requires-Dist: boto3; extra == 'local'
10
+ Requires-Dist: flask<3.0.0,>=2.3.0; extra == 'local'
11
+ Description-Content-Type: text/markdown
12
+
1
13
  # async-lambda
2
14
 
3
15
  Async-lambda is a Python framework for building scalable, event-driven AWS Lambda applications with first-class support for asynchronous invocation via SQS queues. It provides a high-level abstraction for orchestrating Lambda functions, managing event triggers, and handling complex workflows with minimal boilerplate.
@@ -260,8 +272,14 @@ type, so adding or removing `image_uri` replaces each function, and CloudFormati
260
272
  function under the same custom name. The suffix lets the new function be created before the old one is
261
273
  deleted, so switching needs no manual deletion or downtime. Queue and schedule names are unchanged.
262
274
 
263
- Lambda layers and SnapStart are not supported on container images, so `layers` and `snap_start`
264
- raise an error at build time when `image_uri` is set.
275
+ Lambda layers are not supported on container images, so `layers` raises an error at build time when
276
+ `image_uri` is set. SnapStart (`snap_start=True`) is supported on container images that use an AWS
277
+ base image for Python 3.12+, Java 11+, or .NET 8+.
278
+
279
+ SnapStart only applies to published versions, never `$LATEST`. A task with `snap_start=True` sets
280
+ `AutoPublishAlias: live` and `AutoPublishAliasAllProperties: true`, so each deploy that changes any
281
+ function property (such as `Timeout` or `EphemeralStorage`) publishes a version. SAM points the task's event sources
282
+ (API Gateway, SQS, schedules) at the `live` alias. This works for ZIP and image functions.
265
283
 
266
284
  ### subnet_ids
267
285
 
@@ -1,15 +1,3 @@
1
- Metadata-Version: 2.5
2
- Name: async-lambda-unstable
3
- Version: 0.6.15
4
- Summary: A framework for creating AWS Lambda Async Workflows. - Unstable Branch
5
- Author-email: "Nuclei, Inc" <engineering@nuclei.ai>
6
- Requires-Dist: click>=8.0.0
7
- Requires-Dist: typing-extensions>=4.0.0
8
- Provides-Extra: local
9
- Requires-Dist: boto3; extra == 'local'
10
- Requires-Dist: flask<3.0.0,>=2.3.0; extra == 'local'
11
- Description-Content-Type: text/markdown
12
-
13
1
  # async-lambda
14
2
 
15
3
  Async-lambda is a Python framework for building scalable, event-driven AWS Lambda applications with first-class support for asynchronous invocation via SQS queues. It provides a high-level abstraction for orchestrating Lambda functions, managing event triggers, and handling complex workflows with minimal boilerplate.
@@ -272,8 +260,14 @@ type, so adding or removing `image_uri` replaces each function, and CloudFormati
272
260
  function under the same custom name. The suffix lets the new function be created before the old one is
273
261
  deleted, so switching needs no manual deletion or downtime. Queue and schedule names are unchanged.
274
262
 
275
- Lambda layers and SnapStart are not supported on container images, so `layers` and `snap_start`
276
- raise an error at build time when `image_uri` is set.
263
+ Lambda layers are not supported on container images, so `layers` raises an error at build time when
264
+ `image_uri` is set. SnapStart (`snap_start=True`) is supported on container images that use an AWS
265
+ base image for Python 3.12+, Java 11+, or .NET 8+.
266
+
267
+ SnapStart only applies to published versions, never `$LATEST`. A task with `snap_start=True` sets
268
+ `AutoPublishAlias: live` and `AutoPublishAliasAllProperties: true`, so each deploy that changes any
269
+ function property (such as `Timeout` or `EphemeralStorage`) publishes a version. SAM points the task's event sources
270
+ (API Gateway, SQS, schedules) at the `live` alias. This works for ZIP and image functions.
277
271
 
278
272
  ### subnet_ids
279
273
 
@@ -22,4 +22,4 @@ from .models.events.managed_sqs_event import ManagedSQSEvent as ManagedSQSEvent
22
22
  from .models.events.scheduled_event import ScheduledEvent as ScheduledEvent
23
23
  from .models.events.unmanaged_sqs_event import UnmanagedSQSEvent as UnmanagedSQSEvent
24
24
 
25
- __version__ = "0.6.15"
25
+ __version__ = "0.6.16"
@@ -624,12 +624,6 @@ class AsyncLambdaController:
624
624
  raise Exception(
625
625
  "Lambda layers cannot be used with container images (image_uri is set)."
626
626
  )
627
- if build_config.image_uri is not None and any(
628
- task.snap_start for task in self.tasks.values()
629
- ):
630
- raise Exception(
631
- "SnapStart cannot be used with container images (image_uri is set)."
632
- )
633
627
  # SAM Globals does not accept PackageType or ImageConfig, so image functions
634
628
  # carry their package properties individually (see AsyncLambdaTask.get_sam_template).
635
629
  package_properties = (
@@ -684,6 +684,12 @@ class AsyncLambdaTask(Generic[EventType, RT]):
684
684
  template[self.get_function_logical_id()]["Properties"]["SnapStart"] = {
685
685
  "ApplyOn": "PublishedVersions"
686
686
  }
687
+ template[self.get_function_logical_id()]["Properties"][
688
+ "AutoPublishAlias"
689
+ ] = "live"
690
+ template[self.get_function_logical_id()]["Properties"][
691
+ "AutoPublishAliasAllProperties"
692
+ ] = True
687
693
 
688
694
  if self.trigger_type in MANAGED_SQS_TASK_TYPES:
689
695
  dlq_task = self.get_dlq_task()