1
votes

I am faced with a challenge where the programmatic account does not have access to create resources. Usually serverless creates resources via Cloudformation by uploading a Cloudformation template and asking Cloudformation to create the stack. In this case, there will be no stack as such but the resources required will be already created for me. I want to deploy the lambda function and all code on the existing resources like API-gateway, S3 bucket, Lambda role, Lambda function which are already created manually.

Is it possible to bypass cloudformation ? Or Is it possible to mention all those resources in the serverless.yml with arn of each resource, where the serverless does not create a stack and just uploads the zip file to the S3 bucket and then unzips all code in the lambda function ?

1

1 Answers

0
votes

After doing a lot of research and also going through this thread, I have come to a conclusion that in serverless framework as of now there is no way to bypass Cloudformation as it uses Cloudformation to check if the resources are created or not. If they are not it will create it. Currently the only existing resource we can pass, is a Lambda role that can be used by the Lambda functions which are going to be deployed, a Cloudformation role, vpc ids, subnets and an s3 bucket. Here is the template of serverless.yml that includes all possible actions.