question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I want to get a media store container id.

See original GitHub issue

How do I get container id from AWS CDK Media Store?

Use Case

This job is very difficult. I wish you could make it easier to bring.

const container = new mediastore.CfnContainer(this, 'mediaStoreContainer', {
    containerName: 'MediaStoreContainer',
});

Proposed Solution

container.attrEndpoint
container.getAtt("EndPoint")

However, it is currently used in the same way as ${Token[TOKEN.89]} and is difficult to use. I wish I could see the string value right away.

Other

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
deathquincommented, Sep 6, 2021

You should be able to use Fn.split to obtain a substring from an attribute. For example:

// example endpoint: https://XXXXXXXX.data.mediastore.us-east-1.amazonaws.com
const container = new mediastore.CfnContainer(this, 'mediaStoreContainer', {
    containerName: 'MediaStoreContainer',
});

// here you will get XXXXXXXX.data.mediastore.us-east-1.amazonaws.com in deploy timing.
const endpointSuffix = Fn.split("//", container.attrEndpoint, 2)[1];
// here you will get XXXXXXXX (containerId)
const containerId = Fn.split(".", endpointSuffix, 6)[0]; 

I Confirmed. Thank you.

0reactions
github-actions[bot]commented, Oct 19, 2021

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Creating a container - AWS Elemental MediaStore
Open the MediaStore console at https://console.aws.amazon.com/mediastore/ . On the Containers page, choose Create container. For Container name, enter a name ...
Read more >
MediaStore — Boto3 Docs 1.26.29 documentation
An AWS Elemental MediaStore container is a namespace that holds folders and objects. You use a container endpoint to create, read, and delete...
Read more >
Container ID
Guidance: Enter the identifier or number for the containers used to store the specific media type, including the numbers on bound volumes and...
Read more >
Access media files from shared storage
To access media files that other apps have created, you must declare the appropriate storage-related permissions, and the files must reside in one...
Read more >
Run your image as a container
Now that we have the image, we can run that image and see if our application is running ... docker ps CONTAINER ID...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found