nullstone-io / nullstone

Nullstone is a customizable developer platform launched on your cloud accounts.
https://nullstone.io
MIT License
39 stars 1 forks source link

Fixed artifact push to lambda #75

Closed BSick7 closed 2 years ago

BSick7 commented 2 years ago

https://app.ora.pm/p/280750?c=9138409

This calculates the md5 hash for the uploaded content and adds as a header to s3:PutObject. This is required when the s3 bucket has object lock enabled.

Reproduced using current CLI, then confirmed fix with this branch:

$ go run nullstone/main.go push --source=../../Sandbox/nullstone/node-lambda/index.zip --app=test-lambda --env=sandbox
Performing application command (Org=nullstone, App=test-lambda, Stack=, Env=sandbox)

Identifying infrastructure for app "test-lambda"
    lambda arn: "arn:aws:lambda:us-east-1:522657839841:function:fuchsia-buffalo-nkuzu"
    lambda name: "fuchsia-buffalo-nkuzu"
    artifacts bucket: "artifacts-fuchsia-buffalo-nkuzu"
Uploading service-1d0200e9.zip to artifacts bucket
Upload complete