This message was deleted.
# general
s
This message was deleted.
p
I followed up by typing
Copy code
pulumi up
it appears like Pulumi wrote a JSON file with the code but I was expecting something different... I stumbled upon LocalStack and am trying to get Pulumi to create an S3 bucket in my LocalStack environment.
I created an IAM user with an access key/secret key in my LocalStack environment and used the Pulumi Login with those creds. When I query my environment, I don't actually see the S3 bucket. All I see is that auto-generated JSON file.
Any help would be greatly appreciated!!
g
I have never tried, but AFAIK Pulumi uses the AWS CLI. So if e.g. "aws s3 ls" shows what you wants, it should also work with Pulumi, wouldn't it?
p
That's what I thought as well. Unfortunately, I didn't see the bucket get created when I used AWS CLI. 😕
g
So if you use AWS CLI, you see your local stack buckets?
p
That is correct. Well, I do this to see the LocalStack buckets:
Copy code
aws --endpoint-url=<http://localhost:4566> s3 ls
I also confirmed that that bucket was not created in my default AWS account that is referenced in my AWS credentials file
wait.. I might be an idiot.. haha..
I just looked at the
__main__.py
and all it has is
import pulumi
. No actual Python code to create the bucket. That's most likely my issue...
The
pulumi up
output along with the JSON made me think that it was somehow already created. I need to actually write the code in the
__main__.py
.
g
The AWS provider has an endpoints configuration parameter. Maybe that helps? https://github.com/pulumi/pulumi-aws/blob/c9547d53def228443aa350e8529bbc98096c3599/sdk/go/aws/provider.go
👍 1
You probably need to create a non-default provider and then pass that as last argument for your s3 calls.
Like const provider = new aws.Provider('local', { endpoints: [{ s3: 'http://localhost:4566/'}] } ) new aws.s3.Bucket('mybucket', {}, { provider: provider })
😮 1
p
sweet! Thanks for the link and example!!
hmm.. might be a little more difficult than I expected.. I'll keep reviewing.. I'm currently trying to use one of the Pulumi samples for creating a static website in S3. The website is a bonus, I just wanted to create the bucket to demo out to my team. https://github.com/pulumi/examples/tree/master/aws-py-s3-folder