Description
Is there an existing issue for this?
- I have searched the existing issues
Enhancement description
We are trying to simulate AWS S3 Inventory Generation for a S3 bucket in Localstack. https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage-inventory.html
We want to create an Inventory Configuration that will deliver the Inventory Report for the specified bucket inside a destination bucket. We then want to use the generated Inventory Report to test our product.
For this, we first create an Inventory Configuration as follows:
Request:
awslocal --endpoint-url=http://localhost:4566 s3api put-bucket-inventory-configuration --bucket bucket1 --id test-inventory --inventory-configuration='{"Destination":{"S3BucketDestination":{"AccountId":"test","Bucket":"inv-bucket","Format":"CSV"}},"IsEnabled":true,"Id":"test-inventory","IncludedObjectVersions":"All","Schedule":{"Frequency":"Daily"}}'
This returns 200 Success response. We expect this to have created Inventory Configuration for bucket 'bucket1' inside destination bucket 'inv-bucket' (both buckets already exist).
We then list the Inventory Configurations for bucket 'bucket1' as follows:
Request:
awslocal --endpoint-url=http://localhost:4566 s3api list-bucket-inventory-configurations --bucket bucket1
However, we get an empty response:
{
"IsTruncated": false
}
We then try to perform a GET for the Inventory Configuration with id 'test-inventory' that we created earlier for bucket 'bucket1' as follows:
Request:
awslocal --endpoint-url=http://localhost:4566 s3api get-bucket-inventory-configuration --bucket bucket1 --id test-inventory
This also returns an empty response:
{
"InventoryConfiguration": {}
}
This indicates that the following is not currently supported inside Localstack:
- Creating an Inventory Configuration
- Localstack generating Inventory Report and delivering it to the specified destination bucket
Are there plans to add this functionality? It would be useful to products that wish to use Localstack for testing S3 Inventory Reports (such as backup providers).
🧑💻 Implementation
No response
Anything else?
https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage-inventory.html
https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketInventoryConfiguration.html