-
Notifications
You must be signed in to change notification settings - Fork 59
add option to upload dependency layer to S3 first #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
| echo "Uploading dependencies to S3..." | ||
| aws s3 cp dependencies.zip s3://"${INPUT_S3_BUCKET_NAME}"/dependencies.zip | ||
| echo "Publishing dependencies from S3 as a layer..." | ||
| local result=$(aws lambda publish-layer-version --layer-name "${INPUT_LAMBDA_LAYER_ARN}" --content S3Bucket="${INPUT_S3_BUCKET_NAME}",S3Key=dependencies.zip) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the file key on S3 should be either configurable or derived from the lambda layer ARN; if the user has more than one lambda layer they would have to have different buckets for it which is not something we should force imo
| s3_bucket_name: | ||
| description: The S3 bucket name for the dependencies layer upload. | ||
| required: false | ||
| default: no-bucket-name-here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s3_bucket_name is then conditionally required, right? If use_s3 is true s3_bucket_name must be set. If the user does not set it, it will try to upload to no-bucket-name-here. I don't think this should be supported; the error messages might not make sense to the user, and there is a chance, however tiny, that someone owns this bucket.
Possible solutions:
- Remove
use_s3and only keeps3_bucket_namewhich would not have a default and if set, we upload to S3 - Add a conditional in the bash script to not upload to S3 if the
s3_bucket_nameis not explicitly set
Either way I don't think we should have a default value for this. What do you think?
No description provided.