This message was deleted.
# aws
s
This message was deleted.
p
Diagnostics: awss3BucketPolicy (bucket-policy): error: error using credentials to get account ID: error calling stsGetCallerIdentity InvalidClientTokenId: The security token included in the request is invalid. status code: 403, request id: 6a2edecb-806b-470e-929d-2aae4e8b0604
g
Running with
--debug --logtostderr
might provide some more information to help you troubleshoot.
👍 1
We generally don't recommend localstack as its not 100% compatible despite the project's efforts/goals.
p
interesting, that's good to know.
thanks for the debug command
yeah, it just doesn't look like it likes my attempt.
Copy code
pulumi config set aws:endpoints <http://localhost:4566>
might have to live with the fact that it won't work. Terraform seems works nicely against LocalStack. Some devs are starting to use Pulumi and figured it'd be something nice to showcase to them.
g
Maybe try singular
aws:endpoint
p
same error 😕
it's just not meant to be..
not sure if it matters or not but I'm not using LocalStack via the Docker container. Ran into some issues so I just ran it as
localstack start --host
f
Just started to try the same activity. The aws provider has an
Endpoints
property you can set in code https://www.pulumi.com/docs/reference/pkg/nodejs/pulumi/aws/#ProviderArgs-endpoints However each endpoint in individually specified https://www.pulumi.com/docs/reference/pkg/nodejs/pulumi/aws/types/input/#ProviderEndpoint ... which might be a bit monotonous to set them all to
Copy code
<http://localhost:4566>
Just got this working for me, going to explore further. It's .net/c# so convert to lang of choice.
Copy code
var providerArgs = new ProviderArgs
{
    Region = "eu-central-1",
    Endpoints = new[]
    {
        new ProviderEndpointArgs
        {
            S3 = "<http://localhost:4566>",
            Sts = "<http://localhost:4566>"
        }
    },
    S3ForcePathStyle = true,
    AccessKey = "ignored",
    SecretKey = "ignored"
};

var provider = new Provider("local-stack", providerArgs);

var defaultResourceOptions = new CustomResourceOptions
{
    Provider = provider,
};

var bucket = new Bucket("my-bucket", options: defaultResourceOptions);
q
Can't you set it in the YAML config file for the stack, sort of like..
Copy code
config:
  aws:endpoints:
    s3: ...
f
I'll try that too.
q
By the way.. I found a discussion, and a couple of links, here: https://github.com/pulumi/examples/issues/185