Makefile 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. PROFILE = test-profile
  2. REGION = eu-west-3
  3. URL = http://localhost:4566
  4. AWSOPTS = --profile $(PROFILE) --region $(REGION)
  5. SQSOPTS = --queue-url $(URL)/000000000000/dummy-queue
  6. SQS = aws --endpoint-url=$(URL) sqs $(AWSOPTS)
  7. QNAME = dummy-queue
  8. BODY = '{"event_id": "7456c8ee-949d-4100-a0c6-6ae8e581ae15", "event_time": "2019-11-26T16:00:47Z","data": {"test": 83411}}'
  9. clean:
  10. docker compose down
  11. rm -fr volume
  12. configure:
  13. aws configure set aws_access_key_id "dummy" --profile $(PROFILE)
  14. aws configure set aws_secret_access_key "dummy" --profile $(PROFILE)
  15. aws configure set region $(REGION) --profile $(PROFILE)
  16. aws configure set output "table" --profile $(PROFILE)
  17. create-queue: configure
  18. $(SQS) create-queue --queue-name $(QNAME) --output table
  19. lint:
  20. staticcheck
  21. receive:
  22. $(SQS) receive-message $(SQSOPTS) --output json
  23. delete:
  24. $(SQS) delete-message $(SQSOPTS) --receipt-handle "ODhkYTI2ZjQtNGE4YS00NmFhLTliM2UtNTNhNWVjYjVmMmYwIGFybjphd3M6c3FzOmV1LXdlc3QtMzowMDAwMDAwMDAwMDA6ZHVtbXktcXVldWUgZmE2MDExY2UtNTBhMS00Y2EyLTkxYTktMmMxMmEwZGE4YTczIDE2NzI3NTk2NzEuNzg1MTU0Ng=="
  25. send:
  26. $(SQS) send-message $(SQSOPTS) --message-body $(BODY)
  27. list-queues:
  28. $(SQS) list-queues $(AWSOPTS)