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

Already on GitHub? Sign in to your account

Provide initial functionality #4

Merged
merged 58 commits into from
May 31, 2024
Merged

Provide initial functionality #4

merged 58 commits into from
May 31, 2024

Conversation

dav3r
Copy link
Member

@dav3r dav3r commented Jul 18, 2022

🗣 Description

This PR contains the initial functionality for this Lambda, which is to scan a specified set of AWS accounts and publish files/objects (to an S3 bucket) containing the public IP addresses of EC2 instances or Elastic IPs that have been properly tagged.

💭 Motivation and context

We need a mechanism to publish egress IP info from a subset of our AWS accounts and this Lambda will allow us to do just that.

This is part of the work for:

This PR is related to the following:

🧪 Testing

In addition to passing all of the automated pre-commit checks, this code was successfully built and tested both manually (using the "Test" tab on the AWS Lambda web console) and in conjunction with the Terraform in the cisagov/publish-egress-ip-terraform repository.

✅ Pre-approval checklist

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • All relevant type-of-change labels have been added.
  • I have read the CONTRIBUTING document.
  • These code changes follow cisagov code standards.
  • All relevant repo and/or project documentation has been updated
    to reflect the changes in this PR.
  • All new and existing tests pass.

✅ Pre-merge checklist

  • Re-test to ensure Lambda is functioning as expected after all code changes during review.

✅ Post-merge checklist

  • Create a release.

@dav3r dav3r added documentation This issue or pull request improves or adds to documentation improvement This issue or pull request will add or improve functionality, maintainability, or ease of use labels Jul 18, 2022
@dav3r dav3r requested review from felddy, jsf9k and mcdonnnj as code owners July 18, 2022 20:33
@dav3r dav3r self-assigned this Jul 18, 2022
@dav3r
Copy link
Member Author

dav3r commented Jul 20, 2022

@jsf9k or @mcdonnnj - Any thoughts on adding publish_egress_ip.zip (the output of docker compose up build_deployment_package) to the .gitignore file? This is something that probably should be decided over in cisagov/skeleton-aws-lambda-python, but since I have this PR open now, I figured I'd ask here.

@jsf9k
Copy link
Member

jsf9k commented Jul 20, 2022

@jsf9k or @mcdonnnj - Any thoughts on adding publish_egress_ip.zip (the output of docker compose up build_deployment_package) to the .gitignore file? This is something that probably should be decided over in cisagov/skeleton-aws-lambda-python, but since I have this PR open now, I figured I'd ask here.

Sounds good to me. I agree that it should be in the skeleton.

@dav3r
Copy link
Member Author

dav3r commented Jul 21, 2022

@jsf9k or @mcdonnnj - Any thoughts on adding publish_egress_ip.zip (the output of docker compose up build_deployment_package) to the .gitignore file? This is something that probably should be decided over in cisagov/skeleton-aws-lambda-python, but since I have this PR open now, I figured I'd ask here.

Sounds good to me. I agree that it should be in the skeleton.

I realized that we already do this elsewhere and I'm not doing anything new here, so I added the .gitignore entry in 0d2eca3.

Copy link
Member

@mcdonnnj mcdonnnj left a comment

Choose a reason for hiding this comment

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

Some additional feedback based on changes that have been made (and some documentation items that I missed).

Copy link
Member

@mcdonnnj mcdonnnj left a comment

Choose a reason for hiding this comment

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

Thank you for implementing that change to the file header format. I have a question and a suggestion related to that change.

@dav3r dav3r requested a review from mcdonnnj August 9, 2022 19:59
@dav3r
Copy link
Member Author

dav3r commented Aug 17, 2022

@mcdonnnj - Can you please circle back to this review when you have a chance?

@dav3r dav3r requested a review from jsf9k August 26, 2022 19:28
@dav3r
Copy link
Member Author

dav3r commented Aug 27, 2022

@jsf9k - I re-requested your review since there has been a decent amount of change since your first review.

Copy link
Member

@mcdonnnj mcdonnnj left a comment

Choose a reason for hiding this comment

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

Better than ever! I had some best practices suggestions and a question for your consideration.

Copy link
Member

@mcdonnnj mcdonnnj left a comment

Choose a reason for hiding this comment

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

image

@dav3r dav3r added the hacktoberfest-accepted Pull request that should count toward Hacktoberfest participation label Oct 5, 2022
@dav3r dav3r force-pushed the first-commits branch from a9fa490 to 519b1cf Compare May 8, 2024 19:09
@dav3r dav3r requested a review from jasonodoom as a code owner May 8, 2024 19:09
Copy link
Member

@jsf9k jsf9k left a comment

Choose a reason for hiding this comment

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

Great work! I have some comments and suggestions, but nothing that should hold up this PR.

dav3r and others added 2 commits May 18, 2024 15:36
Co-authored-by: Shane Frasier <jeremy.frasier@gwe.cisa.dhs.gov>
Co-authored-by: Shane Frasier <jeremy.frasier@gwe.cisa.dhs.gov>
Copy link
Member

@mcdonnnj mcdonnnj left a comment

Choose a reason for hiding this comment

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

Some feedback items skimming through this again. Also a suggestion to update the lockfiles again for the final test pre-merge.

dav3r and others added 2 commits May 22, 2024 14:46
Copy link
Member

@mcdonnnj mcdonnnj left a comment

Choose a reason for hiding this comment

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

After more than just a skim I have some additional feedback for your consideration (sorry).

dav3r and others added 6 commits May 23, 2024 11:13
Co-authored-by: Nick <50747025+mcdonnnj@users.noreply.github.com>
Co-authored-by: Nick <50747025+mcdonnnj@users.noreply.github.com>
Co-authored-by: Nick <50747025+mcdonnnj@users.noreply.github.com>
Public access to items in the S3 bucket is configured in cisagov/publish-egress-ip-terraform.

Co-authored-by: Nick <50747025+mcdonnnj@users.noreply.github.com>
Co-authored-by: Nick <50747025+mcdonnnj@users.noreply.github.com>
…ch and replace

Co-authored-by: Nick <50747025+mcdonnnj@users.noreply.github.com>
@dav3r dav3r requested a review from mcdonnnj May 28, 2024 17:38
Copy link
Member

@mcdonnnj mcdonnnj left a comment

Choose a reason for hiding this comment

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

Some minor items for your consideration but otherwise this LGTM.

dav3r and others added 2 commits May 30, 2024 09:37
Co-authored-by: Nick <50747025+mcdonnnj@users.noreply.github.com>
…tch our example

Co-authored-by: Nick <50747025+mcdonnnj@users.noreply.github.com>
@dav3r dav3r merged commit 652ca17 into develop May 31, 2024
17 checks passed
@dav3r dav3r deleted the first-commits branch May 31, 2024 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation This issue or pull request improves or adds to documentation hacktoberfest-accepted Pull request that should count toward Hacktoberfest participation improvement This issue or pull request will add or improve functionality, maintainability, or ease of use
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants