0
votes

When I upload a Lambda function to AWS, via Eclipse/STS, it picks up an S3 bucket dynamically & uploads it to that bucket. In some cases it picks up an S3 bucket which I would have created for (say) only media storage.

  1. In such cases is it ok to change the location of the lambda to a preferred S3 bucket ?
  2. What would happen if at one instance I upload a lambda to S3 bucket 'A', then during a later instance, I upload the Lambda to another S3 bucket 'B'?
  3. Will this create any reference issues ?
  4. Will the Lambda be stored in both the buckets , latest in both ? or older version in A & latest version on B ?
1
The documentation for the Eclipse plug-in suggests that it prompts you for the "S3 bucket for Function Code": docs.aws.amazon.com/toolkit-for-eclipse/v1/user-guide/…jarmod
Yes, however, the Eclipse UI picks up a bucket from the list of buckets it finds in your AWS profile (not sure on what basis). I never really created buckets for Lambda functions when I started out,due to lack of knowledge, so I let AWS Wizard choose.javatogo

1 Answers

2
votes

The Lambda function deployment file is just stored in S3 so it can be in a location that the Lambda service can load it from. Once the Lambda service loads it from S3 once, the file in S3 is never used again and can safely be deleted.

It is definitely safe, and preferable, to change the the S3 bucket being used to the bucket you prefer. I don't use Eclipse, but I find it ridiculous that it would just pick a bucket randomly. Surely there is a setting somewhere to tell it what bucket to use.