Hi,
We are trialing Atlassian localstack for mocking out Amazon Kinesis in our application.
I can start up the amazon services locally using the provided docker image.
I create a stream on my mocked Kinesis using the following command
aws --endpoint-url=http://localhost:4568 kinesis create-stream --stream-name "integration-test" --shard-count 1
I see the stream was created using the following command:
aws --endpoint-url=http://localhost:4568 kinesis describe-stream --stream-name "integration-test"
"StreamDescription": {
"StreamName": "integration-test",
"StreamARN": "arn:aws:kinesis:us-east-1:000000000000:stream/integration-test",
"StreamStatus": "ACTIVE"
}
The arn is arn:aws:kinesis:us-east-1:000000000000:stream/integration-test
I couldn't find any information in the wiki/readme how I go about setting up my credentials to point at this test stream?
In my tests I can configure the AWS_DEFAULT_REGION. I'm just wondering does anyone know how to configure a global account to match 000000000000 above? It keeps picking up my real amazon account from my credentials.
Also, I specify --endpoint-url in the amazon cli command above. Is it possible to set this globally so that it can be picked up by my aws sdk?
Its probably obvious to most but maybe updating the readme with some instructions how to create these to point at the mocked service
Cheers
export AWS_ACCESS_KEY_ID=foobar
export AWS_SECRET_ACCESS_KEY=foobar
--endpoint-url: It is currently not possible to specify the endpoint as an environment variable or global configuration. The main problem at this stage is that the endpoints are service-specific, i.e., will be different for each service. There has been a related feature request in the aws-cli repository, see this comment: https://github.com/aws/aws-cli/issues/1270#issuecomment-289890161I will update the documentation to cover the aspects above (in particular the point regarding credentials).
@pkelly03 There is now an awslocal CLI that allows you to call the local services as follows:
awslocal kinesis create-stream --stream-name "integration-test" --shard-count 1
awslocal kinesis list-streams
It can be installed via:
pip install awscli-local
The repository is here: https://github.com/localstack/awscli-local
Closing this issue for now, feel free to re-open if there are any other issues. Thanks
Most helpful comment
--endpoint-url: It is currently not possible to specify the endpoint as an environment variable or global configuration. The main problem at this stage is that the endpoints are service-specific, i.e., will be different for each service. There has been a related feature request in theaws-clirepository, see this comment: https://github.com/aws/aws-cli/issues/1270#issuecomment-289890161I will update the documentation to cover the aspects above (in particular the point regarding credentials).