---
title: "Discussion on \"Cloud Integration Testing Made Easy: LocalStack + Testcontainers\" | Hashnode"
description: "Discussion on \"Cloud Integration Testing Made Easy: LocalStack + Testcontainers\". Cloud Integration Testing Made Easy with LocalStack and Testcontainers"
url: "https://hashnode.com/posts/cloud-integration-testing-made-easy-localstack-testcontainers/6489adeba0e90280411f2211"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Cloud Integration Testing Made Easy: LocalStack + Testcontainers](https://hashnode.localstack.cloud/cloud-integration-testing-made-easy-localstack-testcontainers?utm_source=hashnode&utm_medium=feed)

Cloud Integration Testing Made Easy with LocalStack and Testcontainers

Jun 14, 2023 · 10 min read · hashnode.localstack.cloud  
Read the article

-   [#testcontainers](https://hashnode.com/tag/testcontainers)
-   [#localstack](https://hashnode.com/tag/localstack)
-   [#aws](https://hashnode.com/tag/aws)
-   [#integration-test](https://hashnode.com/tag/integration-test)
-   [#testing](https://hashnode.com/tag/testing)

## Written by

[Anca G](https://hashnode.com/@Anca)

@Anca

  
[View profile](https://hashnode.com/@Anca)

## Responses 2

Markdown supported · ⌘↵ to post

[Paul McKay](https://hashnode.com/@pkmckay)

[Aug 22, 2024](https://hashnode.com/posts/cloud-integration-testing-made-easy-localstack-testcontainers/6489adeba0e90280411f2211/comment/66c71dddcdd5b7ce3d9c37bd)

I am definitely in need of a similar approach to create integration tests for a solution using Lambda / S3 / SQS.

I eagerly pulled the code and am attempting run the integration tests but failing at the first hurdle - getting an error when the Spring Context test is running:

Error resolving attributes for queue update\_shipment\_picture\_queue with strategy CREATE and queueAttributesNames \[\]

oftware.amazon.awssdk.core.exception.SdkClientException: Unable to execute HTTP request: Connection refused: no further information: localhost.localstack.cloud/127.0.0.1:4566

Unfortunately very new to using docker and integrating with AWS and unsure how to resolve - would you be able to provide any pointers?

Thanks

[David Smiles](https://hashnode.com/@avidd)

[Mar 25, 2024](https://hashnode.com/posts/cloud-integration-testing-made-easy-localstack-testcontainers/6489adeba0e90280411f2211/comment/6601652d7fa985f401aebe60)

Great article. Really interesting. I've forked the repo and attempted compile the code, but hitting a compilation error using Java 17 LTS. Is this the latest code? Kind regards, David

[Anca G](https://hashnode.com/@Anca)

[Mar 25, 2024](https://hashnode.com/posts/cloud-integration-testing-made-easy-localstack-testcontainers/6489adeba0e90280411f2211/comment/6601652d7fa985f401aebe60#reply-6601aac25ac886847b9bc6d8)

Hi David, thanks for reading and giving feedback! It's been a while since the demo was created, and it definitively needs an upgrade. The Lambda function was using Java 11 (as it was the latest runtime supported at the time), while the rest of the project is using 17. I'll have a look; I'm sure some improvements are due. In the meantime, can you please tell me a bit more about when/how you're experiencing the error and what the message is?

[David Smiles](https://hashnode.com/@avidd)

[Mar 25, 2024](https://hashnode.com/posts/cloud-integration-testing-made-easy-localstack-testcontainers/6489adeba0e90280411f2211/comment/6601652d7fa985f401aebe60#reply-6601fc3ae1eb2c1dad1bf131)

[Anca G](https://hashnode.com/@Anca) Hi Anca, I updated the POM to that latest dependencies and that resolved a lot of errors (Lombok being the main one needing updating).

All of the ShipmentServiceIntegrationsTest PASS.

However, the tests for MessageReceiverIntegrationTest and LambdaIntegrationTest are failing. Various connection related errors, plus errors creating Lambda functions and invalid JSONObjects.

Some of the value placeholders are not getting replaced correctly and then failing.

For example. Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'amazonS3Config': Injection of autowired dependencies failed

and

Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'aws.credentials.access-key' in value "${aws.credentials.access-key}"
