Giter Site home page Giter Site logo

serverless-aws-alias-example's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

serverless-aws-alias-example's Issues

Compatibility with shared API GW

@HyperBrain Thanks for the plugin.

I see that you had mentioned this plugin wouldn't work with the PR that enables reusing existing API GW's across multiple sls stacks.

Do you plan on updating the plugin to support that model anytime soon? Also, do you have any short-term recommendations or workarounds in the interim?

Issues while using serverless-aws-alias

Hi @HyperBrain
Context: I am trying to use serverless-aws-alias package to use it as a plugin and deploy 2 stages as versions (v1,v2) as aliases.
First of all, if I try to start the server by doing sls offline by using serverless-aws-alias, it throws the following error:

Error:
Error: Cannot find module '/home/ashwin/Documents/sls-playground/serverless-hello-world/node_modules/serverless/lib/plugins/aws/lib/monitorStack'
Require stack:
- /home/ashwin/Documents/sls-playground/serverless-hello-world/node_modules/serverless-aws-alias/index.js
- /home/ashwin/Documents/sls-playground/serverless-hello-world/node_modules/serverless/lib/utils/require-with-import-fallback.js
- /home/ashwin/Documents/sls-playground/serverless-hello-world/node_modules/serverless/lib/classes/plugin-manager.js
- /home/ashwin/Documents/sls-playground/serverless-hello-world/node_modules/serverless/lib/serverless.js
- /home/ashwin/Documents/sls-playground/serverless-hello-world/node_modules/serverless/scripts/serverless.js
- /home/ashwin/Documents/sls-playground/serverless-hello-world/node_modules/serverless/bin/serverless.js
- /home/ashwin/.nvm/versions/node/v16.15.1/lib/node_modules/serverless/bin/serverless.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue (/home/ashwin/Documents/sls-playground/serverless-hello-world/node_modules/@cspotcode/source-map-support/source-map-support.js:811:30)
    at Function.Module._resolveFilename (/home/ashwin/Documents/sls-playground/serverless-hello-world/node_modules/tsconfig-paths/src/register.ts:90:36)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at new AwsAlias (/home/ashwin/Documents/sls-playground/serverless-hello-world/node_modules/serverless-aws-alias/index.js:43:24)
    at PluginManager.addPlugin (/home/ashwin/Documents/sls-playground/serverless-hello-world/node_modules/serverless/lib/classes/plugin-manager.js:91:28)
    at /home/ashwin/Documents/sls-playground/serverless-hello-world/node_modules/serverless/lib/classes/plugin-manager.js:137:69
    at Array.forEach (<anonymous>)
    at PluginManager.loadAllPlugins (/home/ashwin/Documents/sls-playground/serverless-hello-world/node_modules/serverless/lib/classes/plugin-manager.js:137:44)
    at async Serverless.init (/home/ashwin/Documents/sls-playground/serverless-hello-world/node_modules/serverless/lib/serverless.js:146:5)
    at async /home/ashwin/Documents/sls-playground/serverless-hello-world/node_modules/serverless/scripts/serverless.js:614:7

Instead of the above plugin, If I use serverless-aws-alias-v3 plugin, I was able to start the server. And I am able to deploy the first version (v1). However, when I try to deploy v2, it says "Another resource with the same parent already exists". How to deploy multiple stages in AWS API gateway through this plugin? How to mitigate this?

Can you share any working examples?

deploy --alias fail due to AWS::Lambda::Version is not supported

When I try to update my alias with follow command:

node ./node_modules/serverless/bin/serverless deploy --alias uat

My CF stack update fail with follow error:

21:21:24 UTC+1300 | UPDATE_FAILED | AWS::Lambda::Version | TransactionDashapiLambdaVersionwpEeyV9wDnRLKYRD3XkwKYtOdI8WBZjxYEFe9pQ2eCw | Update to resource type AWS::Lambda::Version is not supported.

I have used above command to create the uat stage and update my function once successfully. But when I try to run the deploy command the 3rd time, this error happen. And my CF stack fail since then.

How can I fix this?

Thanks,

Alias always generates same stack

Hi there,

Serverless version: 1.17

For some reason I am always generating the same stack no matter what Alias I put on. I followed the installation instructions and it seems the Alias plugin is giving some feedback while deploying, but its always deploying / overwriting the same content with the same endpoints

I created first the first stage deploy
serverless deploy

And then I tried to create aliases for v1
serverless deploy --alias v1

and v2
serverless deploy --alias v2

But I always end up overwriting the API Gateway, Lambdas and everything
POST - https://{same_endpoint}.execute-api.eu-west-1.amazonaws.com/...

Any suggestion?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.