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

BCDA-8208: Fix S3 path parsing #960

Merged
merged 4 commits into from
Jun 24, 2024
Merged

BCDA-8208: Fix S3 path parsing #960

merged 4 commits into from
Jun 24, 2024

Conversation

kyeah
Copy link
Contributor

@kyeah kyeah commented Jun 24, 2024

🎫 Ticket

https://jira.cms.gov/browse/BCDA-8208

🛠 Changes

  • Fix S3 path parsing

ℹ️ Context

I observed failures with the lambdas attempting to list files in S3 within the bfdeft01 prefix. This is not the correct prefix — the team-specific IAM roles can only access specific subfolders (i.e. bfdeft01/bcda, bfdeft01/dpc, etc.) so the lambdas should be trying to list files within those subfolders.

When parsing the S3 prefix from the SQS event, it needs to split from the last separator instead of the first separator.

🧪 Validation

Deployed to Dev and verified successful import by uploading a file (I basically did this part of the integration test manually:

aws s3 cp --no-progress ../shared_files/synthetic1800MedicareFiles/test/T\#EFT.ON.ACO.NGD1800.DPRF.D181120.T1000009 \
s3://bfd-test-eft/bfdeft01/bcda/in/T.NGD.DPC.RSP.D$(date +'%y%m%d').T$(date +'%H%M%S')1.IN
but fixed the filename since it's using the DPC filename)

Successful lambda logs

Copy link
Contributor

@austincanada austincanada left a comment

Choose a reason for hiding this comment

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

LGTM

@kyeah kyeah merged commit e758d8f into main Jun 24, 2024
5 checks passed
@kyeah kyeah deleted the kev/fix-path-parsing branch June 24, 2024 20:02
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.

2 participants