- Newest
- Most votes
- Most comments
#1 -- Do not use --guide option if you want to use your own s3 bucket. Use --debug option to see what happens during deployment. But make sure the default "samconfig.toml" file has resolve_s3 set to false.
First I let "sam deploy" create the s3 bucket; then I created my own bucket as a copy of this bucket with a nice name like "dotnet7-apps". Then tried again "sam deploy" using "dotnet7-apps" -- it worked nicely! Trying the other options of "sam deploy" one can configure the bucket like creating folders to save this 1 function, then another folder for another function, and so on.
#2 -- Unfortunately "sam deploy" uploads and publishes the lambda with a slightly different name than my original one, so at the end I would have to just publish the .NET 7 function, put the same trigger as the .NET 6 one and delete the .NET 6 (or better just remove its trigger until I verify the updated one is working as intended)
#3 -- At the moment I cannot do anything about this, looks that is the way "sam deploy" works for naming conventions. At least after the first deployment, subsequent deployments of the updated function go to the same services. "stack_name" can not be empty; that is the name of the stack in CloudFormation that corresponds to this lambda....no wonder it is prefixed to the lambda function name to identify it.
Right now I am trying to see if I can edit template.yaml to include in the "Outputs" section a link or whatever is called to my current EventBridge rule, that way the deployment is done in 1 shot and I don't have to go to AWS and manually do the link everytime.
Relevant content
- Accepted Answerasked a year ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 7 months ago