tomdale / lambda-packager

Builds dependencies for Node.js Lambda functions
145 stars 14 forks source link

S3Bucket Name #1

Open leoalves opened 8 years ago

leoalves commented 8 years ago

S3 Bucket names are unique inside the Amazon Infrastructure. In the CloudFormation-template blueprint for the lambda creation the name of the bucket and key are defined and I didn't see an option to change it in the code.

Had to manually change the S3Bucket option in the cloudformation-template.json to be able to deploy it. And create a S3 bucket with the same BucketName and Key.

sdemontfort commented 6 years ago

I had this same issue. Very frustrating and made the package basically unusable. Worked around the issue by creating a bucket myself in S3 with a dud output.zip file, then update this part of the CloudFormation template:

      "Properties": {
        "Handler": "handler.handler",
        "Role": { "Fn::GetAtt" : ["ExecutionRole", "Arn"] },
        "Runtime": "nodejs6.10", // Updated from `nodejs` to `nodejs6.10`
        "Timeout": "300",
        "Code": {
          "S3Bucket": "renamed-bucket-here",
          "S3Key": "output.zip"
        }