create_storage_location

create_storage_location()

Creates a bucket in Amazon S3 to store application versions, logs, and other files used by Elastic Beanstalk environments. The Elastic Beanstalk console and EB CLI call this API the first time you create an environment in a region. If the storage location already exists, CreateStorageLocation still returns the bucket name but does not create a new bucket.

See also: AWS API Documentation

Request Syntax

response = client.create_storage_location()
Return type
dict
Returns
Response Syntax
{
    'S3Bucket': 'string'
}

Response Structure

  • (dict) --

    Results of a CreateStorageLocationResult call.

    • S3Bucket (string) --

      The name of the Amazon S3 bucket created.

Exceptions

  • ElasticBeanstalk.Client.exceptions.TooManyBucketsException
  • ElasticBeanstalk.Client.exceptions.S3SubscriptionRequiredException
  • ElasticBeanstalk.Client.exceptions.InsufficientPrivilegesException

Examples

The following operation creates a new environment for version v1 of a java application named my-app:

response = client.create_storage_location(
)

print(response)

Expected Output:

{
    'S3Bucket': 'elasticbeanstalk-us-west-2-0123456789012',
    'ResponseMetadata': {
        '...': '...',
    },
}