Skip to content

fix: Add a fake arn to Context #23

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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 24, 2021
Merged

fix: Add a fake arn to Context #23

merged 2 commits into from
Mar 24, 2021

Conversation

jfuss
Copy link
Contributor

@jfuss jfuss commented Feb 16, 2021

Issue #, if available:
#11

Description of changes:
Adds support for lambda-runtime-invoked-function-arn header.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Payload: bodyBytes,
CorrelationID: "invokeCorrelationID",
ID: uuid.New().String(),
InvokedFunctionArn: fmt.Sprintf("arn:aws:lambda:us-east-1:012345678912:function:%s", GetenvWithDefault("AWS_LAMBDA_FUNCTION_NAME", "test_function")),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: show we move the defaults such as test_function, default memory of 3008 etc to a constants.go ?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if that could be an issue or not, but are we sure this account number doesn't exist?
Do we have example/dummy account numbers for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mgrandis This is typically the account used as "fake" from what I have seen. I have no idea if it is a real account but we need something that looks like an account id. Do you have a better suggestion?

@sriram-mv Given this is likely not to change much at all. I am going to leave as is for now. Will keep an eye on this and refactor if this comes up again.

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

Successfully merging this pull request may close these issues.

3 participants