Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Fn::Join resolves to [Object Object] #1013

Open
byroncoetsee opened this issue Jun 10, 2020 · 6 comments 路 Fixed by #1032
Open

Using Fn::Join resolves to [Object Object] #1013

byroncoetsee opened this issue Jun 10, 2020 · 6 comments 路 Fixed by #1032
Labels

Comments

@byroncoetsee
Copy link

Hey 馃槃

I'm trying to call one lambda from another one, using it's ARN. This works fine on AWS using Fn::join but it seems when using serverless-offline, it's resolved to [Object Object].

environment:
      getKeyARN:
        Fn::Join:
          - ':'
          - - 'arn:aws:lambda'
            - ${self:provider.region}
            - Ref: 'AWS::AccountId'
            - 'function'
            - ${self:service}-${self:provider.stage}-getKey

Then, when printing process.env while using serverless-offline, this shows:
getKeyARN: '[object Object]'
but should be showing the ARN obviously...

Works fine on AWS but not when running it through serverless-offline 馃槩

@chardos
Copy link
Collaborator

chardos commented Jun 15, 2020

I'll see if there's a fix for this, but for now, this plugin might help you:

https://www.serverless.com/plugins/serverless-pseudo-parameters/

@chardos
Copy link
Collaborator

chardos commented Jun 15, 2020

Ref: 'AWS::AccountId' is not going to exist in offline mode. Is that going to break your code?

@chardos chardos linked a pull request Jun 15, 2020 that will close this issue
@byroncoetsee
Copy link
Author

I can work around it by setting it manually in serverless.yml ... So, not the end of the world.
Thank you!

@chardos chardos linked a pull request Jun 23, 2020 that will close this issue
@juha-younite
Copy link

This bug has resurfaced after resolveJoins was removed in this refactor commit: e459110

Reason for removal was not stated, I wonder what it is?

@dnalborczyk dnalborczyk reopened this Nov 28, 2022
@mwillbanks
Copy link

Agreed; no fun.

@JetUni
Copy link

JetUni commented May 24, 2023

Just ran into this issue. @dnalborczyk, why was the fix removed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
6 participants