Hello, When provisioning a lambda from a zip file...
# python
w
Hello, When provisioning a lambda from a zip file located in S3, and without a hash provided, pulumi will never update the layer. How can I force pulumi do delete and recreate a specific resource every time
pulumi up
runs?
f
It depends.. Is the s3 bucket also being managed by Pulumi? What does the code look like?
w
The S3 bucket is managed by another pulumi stack. What part of the code do you need ? Here's how I create the layer:
Copy code
# Create Lambda Layer
layer = lambda_.LayerVersion(
    resource_name="mylayer",
    layer_name="mylayer",
    compatible_runtimes=["python3.8"],
    description="Layer containing the dependencies for Lambda",
    s3_bucket=my_bucket_id,
    s3_key=f"{artifacts_path}/lambdalayer.zip",
)