question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

(logs): Importing log group ignores region

See original GitHub issue

What is the problem?

Per this comment

It’s a bug in the LogGroup.fromLogGroupArn() method - you can see here that the region is not passed from the ARN to the returned Resource, like it should be (here’s a working example).

Blocks: #17747

Reproduction Steps

Same as in #

What did you expect to happen?

When imported log group’s region is referenced incorrect region is taken into account. A region coming from log group’s ARN ought to be taken into account instead of region of the stack.

What actually happened?

Region of the stack where log group is imported in is taken into account.

CDK CLI Version

1.134

Framework Version

No response

Node.js Version

17.1.0

OS

Linux

Language

Typescript, Python, .NET, Java, Go

Language Version

No response

Other information

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
skinny85commented, Jan 3, 2022

@NGL321 apart from the fact I have submitted a PR against master I don’t know how to publish a change against v2. Would that be sufficient?

The change will make it to v2 automatically - we have an automated job that merges master to v2-main periodically. So, no need to do anything to get this in v2.

0reactions
github-actions[bot]commented, Jan 4, 2022

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Working with log groups and log streams - AWS Documentation
When you install the CloudWatch Logs agent on an Amazon EC2 instance using the steps in previous sections of the Amazon CloudWatch Logs...
Read more >
Guide: How to centralize and analyze AWS logs - Coralogix
Part 4 – AWS Centralized Logging. Logs are generated regionally by AWS services so the best practice is to funnel all regional logs...
Read more >
CloudWatchLogs — Boto3 Docs 1.26.33 documentation - AWS
Log group names must be unique within a Region for an Amazon Web Services account. Log group names can be between 1 and...
Read more >
Import Logs From An Amazon S3 Bucket - DataSet
This Solution describes how to import log files which are deposited in an ... Consider a folder structure that organizes logs by district...
Read more >
CloudWatch log groups should be encrypted with customer ...
Create a KMS key and allow CloudWatch logs access. aws kms create-key --policy '{"Version":"2012-10- ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found